aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDuncan Bellamy <dunk@denkimushi.com>2023-10-12 08:47:32 +0000
committerDuncan Bellamy <dunk@denkimushi.com>2023-10-12 10:15:26 +0000
commit6d16d5e9ef7bcd0e5c3cd841d1a5df139f301463 (patch)
tree21d8db88e22687b95aaf41d3d3cad4dc99326300 /CMakeLists.txt
parent8e7b12edea91b5ff944247d70c30857a141211ef (diff)
downloadrspamd-6d16d5e9ef7bcd0e5c3cd841d1a5df139f301463.tar.gz
rspamd-6d16d5e9ef7bcd0e5c3cd841d1a5df139f301463.zip
[Minor] Make compiling with backward-cpp optional
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt16
1 files changed, 12 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e78a7ebfb..9f9c807e9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -60,6 +60,7 @@ OPTION(ENABLE_LIBUNWIND "Obsoleted [default: OFF]" OFF)
OPTION(ENABLE_LUA_TRACE "Trace all Lua C API invocations [default: OFF]" OFF)
OPTION(ENABLE_LUA_REPL "Enables Lua repl (requires C++11 compiler) [default: ON]" ON)
OPTION(ENABLE_FASTTEXT "Link with FastText library [default: OFF]" OFF)
+OPTION(ENABLE_BACKWARD "Build rspamd with backward-cpp stacktrace [default: ON]" ON)
OPTION(SYSTEM_ZSTD "Use system zstd instead of bundled one [default: OFF]" OFF)
OPTION(SYSTEM_FMT "Use system fmt instead of bundled one [default: OFF]" OFF)
OPTION(SYSTEM_DOCTEST "Use system doctest instead of bundled one [default: OFF]" OFF)
@@ -625,11 +626,18 @@ ADD_SUBDIRECTORY(contrib/libev)
ADD_SUBDIRECTORY(contrib/kann)
ADD_SUBDIRECTORY(contrib/fastutf8)
ADD_SUBDIRECTORY(contrib/google-ced)
-ADD_SUBDIRECTORY(contrib/backward-cpp)
-message(STATUS "Backward-cpp config: ${BACKWARD_DEFINITIONS}")
-if (BACKWARD_LIBRARIES)
+IF (ENABLE_BACKWARD MATCHES "ON")
+ ADD_SUBDIRECTORY(contrib/backward-cpp)
+ message(STATUS "Backward-cpp config: ${BACKWARD_DEFINITIONS}")
+ELSE ()
+ set(BACKWARD_ENABLE)
+ macro(add_backward target)
+ # do nothing
+ endmacro()
+ENDIF ()
+IF (BACKWARD_LIBRARIES)
message(STATUS "Backward-cpp libraries: ${BACKWARD_LIBRARIES}")
-endif()
+ENDIF ()
IF (SYSTEM_FMT MATCHES "OFF")
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/contrib/fmt/include")