From a280b7c073e8240a7565d76fbf3c8324f445ec0b Mon Sep 17 00:00:00 2001 From: Dimitris Panokostas Date: Tue, 7 Jan 2025 17:55:05 +0100 Subject: [PATCH] ci: add recommended compiler flags for macOS debug builds In order to use the profiler, Jetbrains recommend these flags for macOS Debug builds --- cmake/StandardProjectSettings.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/StandardProjectSettings.cmake b/cmake/StandardProjectSettings.cmake index e0cae9159..68ca74816 100644 --- a/cmake/StandardProjectSettings.cmake +++ b/cmake/StandardProjectSettings.cmake @@ -35,4 +35,8 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") include_directories("/usr/local/include") set(CMAKE_EXE_LINKER_FLAGS "-L/usr/local/lib -framework IOKit -framework Foundation -liconv") endif () + if (CMAKE_BUILD_TYPE MATCHES "Debug") + set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer") + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer") + endif () endif ()