adding LTO to tests

This commit is contained in:
Erik Frojdh
2021-11-24 17:40:14 +01:00
parent 77e610f5a5
commit b0a5a76065
6 changed files with 21 additions and 13 deletions

View File

@ -70,7 +70,11 @@ find_package(ClangFormat)
#Enable LTO if available
include(CheckIPOSupported)
check_ipo_supported(RESULT SLS_LTO_AVAILABLE)
message(STATUS "SLS_LTO_AVAILABLE:" ${SLS_LTO_AVAILABLE})
if (SLS_LTO_AVAILABLE)
message(STATUS "Building with link time optimization")
else()
message(STATUS "Link time optimization is not available")
endif()
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)