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)
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")