Disable IPO when debugging
This commit is contained in:
parent
c6879b4359
commit
ed07924b0a
|
@ -6,12 +6,14 @@ project(aocpp
|
||||||
LANGUAGES C CXX
|
LANGUAGES C CXX
|
||||||
)
|
)
|
||||||
|
|
||||||
include(CheckIPOSupported)
|
if(NOT CMAKE_BUILD_TYPE MATCHES "^Debug$")
|
||||||
check_ipo_supported(RESULT result OUTPUT output)
|
include(CheckIPOSupported)
|
||||||
if(result)
|
check_ipo_supported(RESULT result OUTPUT output)
|
||||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
if(result)
|
||||||
else()
|
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||||
message(WARNING "IPO is not supported: ${output}")
|
else()
|
||||||
|
message(WARNING "IPO is not supported: ${output}")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(PkgConfig)
|
find_package(PkgConfig)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user