aboutsummaryrefslogtreecommitdiff
path: root/cmake/compiler/gcc
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2025-10-11 12:47:42 +0200
committerShauren <shauren.trinity@gmail.com>2025-10-11 12:47:42 +0200
commit2b38f40988d0e0fab5b86ba82812e79681c77363 (patch)
tree4effb500976907228439cda73f0510c24500be17 /cmake/compiler/gcc
parentccb078da03d40e769afe8c96a4bd0a48c5c23fb6 (diff)
Build: Enable debug format flag -ggdb3 instead of -g by default for debug builds
Diffstat (limited to 'cmake/compiler/gcc')
-rw-r--r--cmake/compiler/gcc/settings.cmake10
1 files changed, 3 insertions, 7 deletions
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