diff --git a/CMakeLists.txt b/CMakeLists.txt index 46215a0..12285ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,12 +16,12 @@ option(PRETTYTRACES "Whether full stacktraces should be included. Note that this set(LIBTYPE STATIC) if (SHARED) set(LIBTYPE SHARED) + if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + add_compile_options(-flto=thin) + add_link_options(-flto=thin) + endif () endif (SHARED) -if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - add_compile_options(-flto=thin) - add_link_options(-flto=thin) -endif () if (NOT WINDOWS) # Include debug symbols in all linux builds