Skip to content

Commit

Permalink
ci: add recommended compiler flags for macOS debug builds
Browse files Browse the repository at this point in the history
In order to use the profiler, Jetbrains recommend these flags for macOS Debug builds
  • Loading branch information
midwan committed Jan 7, 2025
1 parent 359e8e7 commit a280b7c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmake/StandardProjectSettings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()

0 comments on commit a280b7c

Please sign in to comment.