mirror of https://github.com/Icinga/icinga2.git
parent
5cd2bdcbcd
commit
0d3563ddaa
|
@ -259,6 +259,16 @@ if(NOT MSVC)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
check_cxx_compiler_flag("-flto" CXX_FLAG_LTO)
|
||||
|
||||
if(CXX_FLAG_LTO)
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_DEBUG} -flto")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_DEBUG} -flto")
|
||||
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_DEBUG} -flto")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_DEBUG} -flto")
|
||||
endif()
|
||||
|
||||
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h ESCAPE_QUOTES)
|
||||
|
||||
install(
|
||||
|
|
Loading…
Reference in New Issue