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(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)
|
||||
# This doesn't play well with the packaging script that doesn't understand @rpath
|
||||
set(CMAKE_MACOSX_RPATH OFF)
|
||||
|
@ -292,6 +284,14 @@ if(APPLE)
|
|||
)
|
||||
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)
|
||||
add_definitions(-D_SECURE_SCL=0)
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||
|
|
Loading…
Reference in New Issue