summaryrefslogtreecommitdiffstats
path: root/kmtrace/ConfigureChecks.cmake
blob: 476e63b246f624918fe66176197b30783fe966ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

##### check if GLIBC >= 2.1 compatible backtrace facility exists

if ( CMAKE_MAJOR_VERSION LESS "3" )
  check_symbol_exists( backtrace "execinfo.h" HAVE_BACKTRACE )
  if ( HAVE_BACKTRACE )
    set ( Backtrace_LIBRARY "" CACHE STRING "Library providing backtrace(3), empty for default set of libraries" )
    set ( Backtrace_HEADER "execinfo.h" CACHE STRING "Header providing backtrace(3) facility" )
  endif ()
else ()
  find_package( Backtrace )
  if ( Backtrace_FOUND )
    set ( HAVE_BACKTRACE 1 CACHE INTERNAL "" )
  endif ()
endif ()
if( NOT HAVE_BACKTRACE )
  tde_message_fatal( "bactrace function is required but not available on your system")
endif()