Disable IPO when debugging

This commit is contained in:
Eric Mertens 2022-11-18 23:33:30 -08:00
parent c6879b4359
commit ed07924b0a

View File

@ -6,12 +6,14 @@ project(aocpp
LANGUAGES C CXX
)
include(CheckIPOSupported)
check_ipo_supported(RESULT result OUTPUT output)
if(result)
if(NOT CMAKE_BUILD_TYPE MATCHES "^Debug$")
include(CheckIPOSupported)
check_ipo_supported(RESULT result OUTPUT output)
if(result)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
else()
else()
message(WARNING "IPO is not supported: ${output}")
endif()
endif()
find_package(PkgConfig)