Clean-up CMake LTO
Honestly, considering the user can enable LTO by setting CMAKE_INTERPROCEDURAL_OPTIMIZATION, I might remove this option too...
This commit is contained in:
parent
84cc01b8f0
commit
216aec7caf
1 changed files with 6 additions and 6 deletions
|
@ -209,13 +209,13 @@ set_target_properties(CSE2 PROPERTIES
|
|||
|
||||
# Enable link-time optimisation if available
|
||||
if(LTO)
|
||||
if((${CMAKE_VERSION} VERSION_EQUAL 3.9) OR (${CMAKE_VERSION} VERSION_GREATER 3.9))
|
||||
include(CheckIPOSupported)
|
||||
|
||||
check_ipo_supported(RESULT result)
|
||||
|
||||
if(result)
|
||||
set_target_properties(CSE2 PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Link libraries
|
||||
|
|
Loading…
Add table
Reference in a new issue