use `-flto=thin` as LTO compiler flag

This commit is contained in:
Jack Andersen 2016-09-30 12:41:55 -10:00
parent 64a88b3148
commit e3fcd6c481
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ set(SOURCES
# SSELegacy.cpp compiled separately to escape the effects of link-time optimization # SSELegacy.cpp compiled separately to escape the effects of link-time optimization
if(NOT MSVC) if(NOT MSVC)
set_source_files_properties(${SOURCES} PROPERTIES COMPILE_FLAGS "-msse4.1 -msse4.2 -std=c++14") set_source_files_properties(${SOURCES} PROPERTIES COMPILE_FLAGS "-msse4.1 -msse4.2 -std=c++14")
string(REPLACE "-flto" "" CUSTOM_FLAGS ${CMAKE_CXX_FLAGS}) string(REPLACE "-flto=thin" "" CUSTOM_FLAGS ${CMAKE_CXX_FLAGS})
if (CMAKE_OSX_DEPLOYMENT_TARGET AND NOT CMAKE_OSX_DEPLOYMENT_TARGET STREQUAL "") if (CMAKE_OSX_DEPLOYMENT_TARGET AND NOT CMAKE_OSX_DEPLOYMENT_TARGET STREQUAL "")
set(CUSTOM_FLAGS "${CUSTOM_FLAGS} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET} -O3 -msse3 -std=c++14") set(CUSTOM_FLAGS "${CUSTOM_FLAGS} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET} -O3 -msse3 -std=c++14")
else() else()