diff --git a/CMakeLists.txt b/CMakeLists.txt index 4279472..46215a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,11 @@ if (SHARED) set(LIBTYPE SHARED) 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 add_compile_options(-g -gfull -g3)