diff options
Diffstat (limited to 'build_files/build_environment')
-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 |