File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,8 @@ include(DispatchSanitization)
118118include (DispatchCompilerWarnings)
119119include (DTrace)
120120
121+ include (EnableFramePointers)
122+
121123# NOTE(abdulras) this is the CMake supported way to control whether we generate
122124# shared or static libraries. This impacts the behaviour of `add_library` in
123125# what type of library it generates.
Original file line number Diff line number Diff line change 1+ #
2+ # Including this file enables frame pointers, if we know how.
3+ #
4+
5+ include (CheckCompilerFlag)
6+
7+ # Check if the compiler supports -fno-omit-frame-pointer
8+ check_compiler_flag(C -fno-omit-frame-pointer SUPPORTS_NO_OMIT_FP)
9+
10+ # If it does, use it
11+ if (SUPPORTS_NO_OMIT_FP)
12+ add_compile_options ($<$<COMPILE_LANGUAGE:C,CXX>:-fno-omit-frame-pointer>)
13+ endif ()
You can’t perform that action at this time.
0 commit comments