From ea15d2e1d516a6264e0eb1735ddbc31790dcb2de Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 3 Sep 2019 17:57:01 +0100 Subject: [Rework] Start moving to replxx --- CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 0cc4f91e0..22c4b817b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,6 +60,7 @@ OPTION(ENABLE_FULL_DEBUG "Build rspamd with all possible debug [default: OFF]" OPTION(ENABLE_UTILS "Build rspamd internal utils [default: OFF]" OFF) OPTION(ENABLE_LIBUNWIND "Use libunwind to print crash traces [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) INCLUDE(FindArch.cmake) TARGET_ARCHITECTURE(ARCH) @@ -478,7 +479,7 @@ INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/" "${CMAKE_SOURCE_DIR}/src/libstat" "${CMAKE_SOURCE_DIR}/src/libcryptobox" "${CMAKE_SOURCE_DIR}/contrib/libucl" - "${CMAKE_SOURCE_DIR}/contrib/linenoise" + "${CMAKE_SOURCE_DIR}/contrib/replxx/include" "${CMAKE_SOURCE_DIR}/contrib/uthash" "${CMAKE_SOURCE_DIR}/contrib/http-parser" "${CMAKE_SOURCE_DIR}/contrib/fpconv" @@ -1175,7 +1176,6 @@ ADD_SUBDIRECTORY(contrib/libucl) ADD_SUBDIRECTORY(contrib/librdns) ADD_SUBDIRECTORY(contrib/aho-corasick) ADD_SUBDIRECTORY(contrib/lua-lpeg) -ADD_SUBDIRECTORY(contrib/linenoise) ADD_SUBDIRECTORY(contrib/t1ha) ADD_SUBDIRECTORY(contrib/libev) ADD_SUBDIRECTORY(contrib/kann) @@ -1184,6 +1184,12 @@ IF (NOT WITH_LUAJIT) ADD_SUBDIRECTORY(contrib/lua-bit) ENDIF() +IF (ENABLE_LUA_REPL MATCHES "ON") + ADD_SUBDIRECTORY(contrib/replxx) + SET(WITH_LUA_REPL 1) + LIST(APPEND RSPAMD_REQUIRED_LIBRARIES rspamd-replxx) +ENDIF() + IF (ENABLE_SNOWBALL MATCHES "ON") LIST(APPEND RSPAMD_REQUIRED_LIBRARIES stemmer) ENDIF() -- cgit v1.2.3