From 9ba734ea14c610f54521f2faa30f048f0e4eadf9 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Tue, 1 Aug 2023 18:14:27 +1000 Subject: [PATCH] Ensure debug symbols on Clang and GCC --- source/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index e71ba21..18f3c45 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -227,8 +227,8 @@ ENDIF () # Set C/C++ compiler flags based on build environment... IF (STAR_COMPILER_GNU) - SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused -Wno-implicit-fallthrough -no-pie") - SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -Wall -Wextra -Wno-unused -Wno-implicit-fallthrough -no-pie") + SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -rdynamic -Wall -Wextra -Wno-unused -Wno-implicit-fallthrough -no-pie") + SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -rdynamic -Wall -Wextra -Wno-unused -Wno-implicit-fallthrough -no-pie") IF (STAR_SYSTEM_FAMILY_WINDOWS) SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mthreads") @@ -261,8 +261,8 @@ IF (STAR_COMPILER_GNU) SET (CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -Ofast") ELSEIF (STAR_COMPILER_CLANG) - SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wuninitialized -Wno-parentheses-equality -Wno-deprecated-declarations") - SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -Wall -Wextra -Wuninitialized -Wno-parentheses-equality -Wno-deprecated-declarations") + SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wl,-export_dynamic -Wall -Wextra -Wuninitialized -Wno-parentheses-equality -Wno-deprecated-declarations") + SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -Wl,-export_dynamic -Wall -Wextra -Wuninitialized -Wno-parentheses-equality -Wno-deprecated-declarations") IF (STAR_SYSTEM_MACOS) SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")