cmake: Move LTO settings lower in the file
This commit is contained in:
parent
925297d528
commit
fafb103c52
|
@ -230,14 +230,6 @@ if(NOT MSVC)
|
||||||
endif()
|
endif()
|
||||||
endif(NOT MSVC)
|
endif(NOT MSVC)
|
||||||
|
|
||||||
if(ENABLE_LTO)
|
|
||||||
check_and_add_flag(LTO -flto)
|
|
||||||
if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
|
|
||||||
set(CMAKE_AR gcc-ar)
|
|
||||||
set(CMAKE_RANLIB gcc-ranlib)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
# This doesn't play well with the packaging script that doesn't understand @rpath
|
# This doesn't play well with the packaging script that doesn't understand @rpath
|
||||||
set(CMAKE_MACOSX_RPATH OFF)
|
set(CMAKE_MACOSX_RPATH OFF)
|
||||||
|
@ -292,6 +284,14 @@ if(APPLE)
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(ENABLE_LTO)
|
||||||
|
check_and_add_flag(LTO -flto)
|
||||||
|
if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
|
||||||
|
set(CMAKE_AR gcc-ar)
|
||||||
|
set(CMAKE_RANLIB gcc-ranlib)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
add_definitions(-D_SECURE_SCL=0)
|
add_definitions(-D_SECURE_SCL=0)
|
||||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||||
|
|
Loading…
Reference in New Issue