From 620a0afd2a0c69b479c2bdf6fc22ee5c6b449ea4 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Fri, 2 Aug 2024 12:04:42 -0700 Subject: [PATCH] Add debug symbols and frame pointer So that perf works out of the box. Leave it in the release artifacts/do whatever cpack does by default for now. --- CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f84e172..3c1b447 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,8 +31,14 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) "MinSizeRel" "RelWithDebInfo") endif() -add_compile_options(-fdata-sections -ffunction-sections -Wswitch-enum - -Werror=switch-enum -fPIC) +add_compile_options( + -fdata-sections + -ffunction-sections + -Wswitch-enum + -Werror=switch-enum + -fPIC + -g + -fno-omit-frame-pointer) set(full_relro_flags "-pie;LINKER:-z,relro,-z,now,-z,noexecstack") cmake_push_check_state()