diff --git a/CMake/CheckBacktrace.cmake b/CMake/CheckBacktrace.cmake index c4fce9f6..4165108f 100644 --- a/CMake/CheckBacktrace.cmake +++ b/CMake/CheckBacktrace.cmake @@ -1,4 +1,6 @@ -find_package(Backtrace) +if(ENABLE_BACKTRACE) + find_package(Backtrace) +endif() if(Backtrace_FOUND) configure_set(HAVE_BACKTRACE 1) configure_define_header(Backtrace_HEADER) diff --git a/CMakeConfig.txt b/CMakeConfig.txt index 2a8617f1..f3849a67 100644 --- a/CMakeConfig.txt +++ b/CMakeConfig.txt @@ -51,6 +51,11 @@ set(ENABLE_SANITIZERS "$ENV{ENABLE_SANITIZERS}" CACHE STRING "sanitizers to enable (e.g. address;undefined ...)") option(ENABLE_SASL "enable SASL support" $ENV{ENABLE_SASL}) +if(NOT DEFINED ENV{ENABLE_BACKTRACE}) + set(ENV{ENABLE_BACKTRACE} ON) +endif() +option(ENABLE_BACKTRACE "enable backtrace support" + $ENV{ENABLE_BACKTRACE}) option(ENABLE_DTRACE "enable dtrace support" $ENV{ENABLE_DTRACE}) option(ENABLE_HASH_HSIEH "enable hsieh hash support"