Commit 758b931e authored by Vladimir Bespalov's avatar Vladimir Bespalov

Compilation: save debug info when compiling static lib with LTO

parent bff99ad5
......@@ -21,6 +21,11 @@ option(PISTACHE_BUILD_DOCS "build docs alongside the project" OFF)
option(PISTACHE_INSTALL "add pistache as install target (recommended)" ON)
option(PISTACHE_USE_SSL "add support for SSL server" OFF)
# require fat LTO objects in static library
if(CMAKE_CXX_FLAGS MATCHES "-flto")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffat-lto-objects")
endif()
if (PISTACHE_BUILD_TESTS)
find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment