diff --git a/CMakeLists.txt b/CMakeLists.txt index c0d46e43cc..da372ef7d5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -124,6 +124,11 @@ add_compile_definitions( if(CMAKE_SYSTEM_NAME STREQUAL Linux) check_symbol_exists(sched_getaffinity "sched.h" HAVE_SCHED_GETAFFINITY) add_compile_definitions($<$:HAVE_SCHED_GETAFFINITY>) + + # Pass -fno-omit-frame-pointer while compiling for better backtraces + add_compile_options( + "$<$:SHELL:-Xcc -fno-omit-frame-pointer>" + "$<$:-fno-omit-frame-pointer>") endif() # Precompute module triple for installation