* Initial commit for the builder * fix wx, use hack to install into /app * add some workarounds for /usr/local * fix up rest of paths * attempt to fix wxwebview undef * figure out why wxwidgets isnt getting its patches applied * do "proper" patching of wxwidgets * Flip the flag * actually append the /usr/local * restrict package finding to flatpak only * Update the destdir stuff for mpfr, gmp * Transfer over all the _destdir, again * update patch command for all other plats * initial ci check * what even happened * clear ci image * I doubt this will do anything * do cleanup after running each step * remove build objects for flatpak ci * compress debug info * Fix MacOS build * Try saving space after building deps * No debug info for now * Do debug info, use thin static archives * use BSD flag, not --thin * try building with lto * Use release, no debug info * remove lto * Revert the last 5 commits * It might require write perms * Revert "It might require write perms" This reverts commit 44cec58a5713cb5ebbc44e64e314b88b553b8f75. * Import fixes for merge * remove some patch stuff * the worst hack! * remove uneeded patches * Initial commit for the builder * note to self, go back to regular wx * attempt to fix wxwebview undef * do "proper" patching of wxwidgets * update patch command for all other plats * what even happened * -ldep_name-NOTFOUND is still here * concat patches * Build wx with flatpak * more wx shenatigans * fix a missing import * build wx with proper flags * fix imports and libs * trigger ci * try fixing mac and windows ci * remove duplicate definition of freetype * curl may not have openssl for a dep * has openssl been found? * force building * build images on apple * cleanup for review * cleanup cmake files --------- Co-authored-by: SoftFever <softfeverever@gmail.com>
79 lines
3.3 KiB
CMake
79 lines
3.3 KiB
CMake
# Copyright (c) 2020-2021 Intel Corporation
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
if (MINGW)
|
|
set(TBB_LINK_DEF_FILE_FLAG "")
|
|
set(TBB_DEF_FILE_PREFIX "")
|
|
elseif (APPLE)
|
|
set(TBB_LINK_DEF_FILE_FLAG -Wl,-exported_symbols_list,)
|
|
set(TBB_DEF_FILE_PREFIX mac${TBB_ARCH})
|
|
|
|
# For correct ucontext.h structures layout
|
|
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -D_XOPEN_SOURCE)
|
|
else()
|
|
set(TBB_LINK_DEF_FILE_FLAG -Wl,--version-script=)
|
|
set(TBB_DEF_FILE_PREFIX lin${TBB_ARCH})
|
|
endif()
|
|
|
|
# Add -Wno-error=stringop-overflow to fix GCC 12+ build as suggested on https://github.com/oneapi-src/oneTBB/issues/843#issuecomment-1152646035
|
|
set(TBB_WARNING_LEVEL -Wall -Wextra $<$<BOOL:${TBB_STRICT}>:-Werror> -Wfatal-errors -Wno-error=stringop-overflow)
|
|
set(TBB_TEST_WARNING_FLAGS -Wshadow -Wcast-qual -Woverloaded-virtual -Wnon-virtual-dtor)
|
|
|
|
# Depfile options (e.g. -MD) are inserted automatically in some cases.
|
|
# Don't add -MMD to avoid conflicts in such cases.
|
|
if (NOT CMAKE_GENERATOR MATCHES "Ninja" AND NOT CMAKE_CXX_DEPENDS_USE_COMPILER)
|
|
set(TBB_MMD_FLAG -MMD)
|
|
endif()
|
|
|
|
# Enable Intel(R) Transactional Synchronization Extensions (-mrtm) and WAITPKG instructions support (-mwaitpkg) on relevant processors
|
|
if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86|AMD64)")
|
|
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -mrtm $<$<AND:$<NOT:$<CXX_COMPILER_ID:Intel>>,$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},11.0>>>:-mwaitpkg>)
|
|
endif()
|
|
|
|
if (NOT MINGW)
|
|
set(TBB_COMMON_LINK_LIBS dl)
|
|
endif()
|
|
|
|
# Ignore -Werror set through add_compile_options() or added to CMAKE_CXX_FLAGS if TBB_STRICT is disabled.
|
|
if (NOT TBB_STRICT AND COMMAND tbb_remove_compile_flag)
|
|
tbb_remove_compile_flag(-Werror)
|
|
endif()
|
|
|
|
if (NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL Intel)
|
|
# gcc 6.0 and later have -flifetime-dse option that controls elimination of stores done outside the object lifetime
|
|
set(TBB_DSE_FLAG $<$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},6.0>>:-flifetime-dse=1>)
|
|
endif()
|
|
|
|
# Workaround for heavy tests and too many symbols in debug (rellocation truncated to fit: R_MIPS_CALL16)
|
|
if ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "mips")
|
|
set(TBB_TEST_COMPILE_FLAGS ${TBB_TEST_COMPILE_FLAGS} -DTBB_TEST_LOW_WORKLOAD $<$<CONFIG:DEBUG>:-mxgot>)
|
|
endif()
|
|
|
|
if (MINGW)
|
|
list(APPEND TBB_COMMON_COMPILE_FLAGS -U__STRICT_ANSI__)
|
|
endif()
|
|
|
|
# For some reason GCC does not instrument code with Thread Sanitizer when lto is enabled and C linker is used.
|
|
if (NOT TBB_SANITIZE MATCHES "thread")
|
|
set(TBB_IPO_COMPILE_FLAGS $<$<NOT:$<CONFIG:Debug>>:-flto>)
|
|
set(TBB_IPO_LINK_FLAGS $<$<NOT:$<CONFIG:Debug>>:-flto>)
|
|
endif()
|
|
|
|
# Disable lto flag
|
|
set(TBB_IPO_COMPILE_FLAGS "")
|
|
set(TBB_IPO_LINK_FLAGS "")
|
|
|
|
# TBB malloc settings
|
|
set(TBBMALLOC_LIB_COMPILE_FLAGS -fno-rtti -fno-exceptions)
|
|
set(TBB_OPENMP_FLAG -fopenmp)
|