Build deps: Fixed TBB build with GCC 6 and newer, turning off dead store elimination.

This commit is contained in:
Stefan Werner 2018-04-24 13:23:52 +02:00
parent dac8b08f4c
commit 0ab30f9e39
1 changed files with 8 additions and 0 deletions

View File

@ -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