aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmake/compiler/clang/settings.cmake10
-rw-r--r--cmake/compiler/gcc/settings.cmake10
2 files changed, 6 insertions, 14 deletions
diff --git a/cmake/compiler/clang/settings.cmake b/cmake/compiler/clang/settings.cmake
index 223e37799ea..49befa6f469 100644
--- a/cmake/compiler/clang/settings.cmake
+++ b/cmake/compiler/clang/settings.cmake
@@ -57,13 +57,9 @@ if(WITH_WARNINGS)
message(STATUS "Clang: All warnings enabled")
endif()
-if(WITH_COREDEBUG)
- target_compile_options(trinity-compile-option-interface
- INTERFACE
- -g3)
-
- message(STATUS "Clang: Debug-flags set (-g3)")
-endif()
+target_compile_options(trinity-compile-option-interface
+ INTERFACE
+ $<$<OR:$<CONFIG:Debug,RelWithDebInfo>,$<BOOL:${WITH_COREDEBUG}>>:-g3 -glldb>)
if(ASAN)
target_compile_options(trinity-compile-option-interface
diff --git a/cmake/compiler/gcc/settings.cmake b/cmake/compiler/gcc/settings.cmake
index 4861f48dccc..463cf1e47b4 100644
--- a/cmake/compiler/gcc/settings.cmake
+++ b/cmake/compiler/gcc/settings.cmake
@@ -41,13 +41,9 @@ if(WITH_WARNINGS)
message(STATUS "GCC: All warnings enabled")
endif()
-if(WITH_COREDEBUG)
- target_compile_options(trinity-compile-option-interface
- INTERFACE
- -g3)
-
- message(STATUS "GCC: Debug-flags set (-g3)")
-endif()
+target_compile_options(trinity-compile-option-interface
+ INTERFACE
+ $<$<OR:$<CONFIG:Debug,RelWithDebInfo>,$<BOOL:${WITH_COREDEBUG}>>:-ggdb3>)
if(ASAN)
target_compile_options(trinity-compile-option-interface