Only enable LTO for release

This is how it was for the original implementation
pull/3003/head
AnyOldName3 4 years ago
parent 257a6b4629
commit 1dcea961c6

@ -399,8 +399,8 @@ if(OPENMW_LTO_BUILD)
include(CheckIPOSupported)
check_ipo_supported(RESULT HAVE_IPO OUTPUT HAVE_IPO_OUTPUT)
if(HAVE_IPO)
message(STATUS "LTO enabled")
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
message(STATUS "LTO enabled for Release configuration.")
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE)
else()
message(WARNING "Requested option OPENMW_LTO_BUILD not supported by this compiler: ${HAVE_IPO_OUTPUT}")
endif()

Loading…
Cancel
Save