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 ()