From 207d4bd799f9c54e3c60dcaf5a06891f77aeab8b Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Thu, 31 Dec 2020 13:51:43 +0100 Subject: [PATCH] Reduce file size by only including relevant debug symbols for stacktraces. Signed-off-by: Deukhoofd --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d23136..a025d2a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,9 +16,10 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") add_compile_options(-fconcepts) endif () -if (NOT WINDOWS) +if (CMAKE_BUILD_TYPE MATCHES Release AND NOT WINDOWS) # Include debug symbols in all linux builds - add_compile_options(-g -gfull -g3) + message("Including debug symbols") + add_compile_options(-g -gline-tables-only) endif () include(CmakeConanSetup.cmake)