Skip to content

Commit

Permalink
signal_debug: check for execinfo.h header
Browse files Browse the repository at this point in the history
  • Loading branch information
johnny-bit authored and TurboGit committed Sep 2, 2020
1 parent e0265dd commit c9866d7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ConfigureChecks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ if (HAVE_CPUID_H)
check_symbol_exists(__get_cpuid "cpuid.h" HAVE___GET_CPUID)
endif()

check_include_file(execinfo.h HAVE_EXECINFO_H)

if (OpenMP_FOUND)

set(CMAKE_REQUIRED_FLAGS ${OpenMP_C_FLAGS})
Expand Down
6 changes: 4 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -778,8 +778,10 @@ else(USE_GAME)
endif(USE_GAME)

if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_definitions("-DDT_HAVE_SIGNAL_TRACE")
message(WARNING "Enabling signal tracing.\nrunning `-d signal --d-signal-act print-trace` will print backlogs.\nthis is solely for developers!")
if(HAVE_EXECINFO_H)
add_definitions("-DDT_HAVE_SIGNAL_TRACE")
message(STATUS "Signal debug: print-trace possible")
endif(HAVE_EXECINFO_H)
endif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")

#
Expand Down

0 comments on commit c9866d7

Please sign in to comment.