Merge pull request #523 from edbaunton/cmake-have-symbolize
Allow CMake user to disable Symbolize functionality
This commit is contained in:
commit
dfc0e441c5
@ -25,6 +25,7 @@ option (PRINT_UNSYMBOLIZED_STACK_TRACES
|
|||||||
"Print file offsets in traces instead of symbolizing" OFF)
|
"Print file offsets in traces instead of symbolizing" OFF)
|
||||||
option (WITH_PKGCONFIG "Enable pkg-config support" ON)
|
option (WITH_PKGCONFIG "Enable pkg-config support" ON)
|
||||||
option (WITH_UNWIND "Enable libunwind support" ON)
|
option (WITH_UNWIND "Enable libunwind support" ON)
|
||||||
|
option (WITH_SYMBOLIZE "Enable symbolize module" ON)
|
||||||
|
|
||||||
if (NOT WITH_UNWIND)
|
if (NOT WITH_UNWIND)
|
||||||
set (CMAKE_DISABLE_FIND_PACKAGE_Unwind ON)
|
set (CMAKE_DISABLE_FIND_PACKAGE_Unwind ON)
|
||||||
@ -365,6 +366,7 @@ if (HAVE_EXECINFO_H)
|
|||||||
set (HAVE_STACKTRACE 1)
|
set (HAVE_STACKTRACE 1)
|
||||||
endif (HAVE_EXECINFO_H)
|
endif (HAVE_EXECINFO_H)
|
||||||
|
|
||||||
|
if (WITH_SYMBOLIZE)
|
||||||
if (WIN32 OR CYGWIN)
|
if (WIN32 OR CYGWIN)
|
||||||
cmake_push_check_state (RESET)
|
cmake_push_check_state (RESET)
|
||||||
set (CMAKE_REQUIRED_LIBRARIES DbgHelp)
|
set (CMAKE_REQUIRED_LIBRARIES DbgHelp)
|
||||||
@ -403,6 +405,7 @@ if (WIN32 OR CYGWIN)
|
|||||||
elseif (UNIX OR (APPLE AND HAVE_DLADDR))
|
elseif (UNIX OR (APPLE AND HAVE_DLADDR))
|
||||||
set (HAVE_SYMBOLIZE 1)
|
set (HAVE_SYMBOLIZE 1)
|
||||||
endif (WIN32 OR CYGWIN)
|
endif (WIN32 OR CYGWIN)
|
||||||
|
endif (WITH_SYMBOLIZE)
|
||||||
|
|
||||||
check_cxx_source_compiles ("
|
check_cxx_source_compiles ("
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user