diff options
author | Stefan Werner <stefan.werner@tangent-animation.com> | 2018-04-24 14:23:52 +0300 |
---|---|---|
committer | Stefan Werner <stefan.werner@tangent-animation.com> | 2018-04-24 14:23:52 +0300 |
commit | 0ab30f9e391ae4497e5e8e4009db02f4bf58810a (patch) | |
tree | 3ab19a2caebb71af4aebf3cbde6769751259779c /build_files | |
parent | dac8b08f4cc2d832bd99d2397bcf73278286b30d (diff) |
Build deps: Fixed TBB build with GCC 6 and newer, turning off dead store elimination.
Diffstat (limited to 'build_files')
-rw-r--r-- | build_files/build_environment/patches/cmakelists_tbb.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/build_files/build_environment/patches/cmakelists_tbb.txt b/build_files/build_environment/patches/cmakelists_tbb.txt index 1be9ca25f6a..da9fd938943 100644 --- a/build_files/build_environment/patches/cmakelists_tbb.txt +++ b/build_files/build_environment/patches/cmakelists_tbb.txt @@ -88,6 +88,14 @@ elseif(WIN32) set(DISABLE_RTTI "/EHs- /GR- ") endif() +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + include(CheckCXXCompilerFlag) + check_cxx_compiler_flag("-flifetime-dse=1" SUPPORTS_FLIFETIME) + if (SUPPORTS_FLIFETIME) + add_definitions(-flifetime-dse=1) + endif() +endif() + # Linker export definitions if (WIN32) add_custom_command(OUTPUT tbb.def |