aboutsummaryrefslogtreecommitdiff
path: root/etc/lto.cmake
blob: 517ec144b9159e8ce42ac4ba8551028ac77d9934 (plain)
1
2
3
4
5
6
7
8
include(CheckIPOSupported)
check_ipo_supported(RESULT ipo_supported OUTPUT error)
if(ipo_supported)
    message(STATUS "IPO / LTO supported and enabled.")
    set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
else()
    message(STATUS "IPO / LTO not supported: <${error}>")
endif()