aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt8
-rw-r--r--contrib/aho-corasick/CMakeLists.txt3
-rw-r--r--contrib/hiredis/CMakeLists.txt3
-rw-r--r--contrib/http-parser/CMakeLists.txt3
-rw-r--r--contrib/lc-btrie/CMakeLists.txt3
-rw-r--r--contrib/libottery/CMakeLists.txt2
-rw-r--r--contrib/linenoise/CMakeLists.txt2
-rw-r--r--contrib/lpeg/CMakeLists.txt2
-rw-r--r--contrib/xxhash/CMakeLists.txt3
-rw-r--r--contrib/zstd/CMakeLists.txt3
-rw-r--r--debian/control2
-rwxr-xr-xdebian/rules3
12 files changed, 32 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index aedb977d5..9135266d4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,7 +39,6 @@ SET_PROPERTY(GLOBAL PROPERTY ALLOW_DUPLICATE_CUSTOM_TARGETS 1)
############################# OPTIONS SECTION #############################################
-OPTION(DEBUG_MODE "Enable debug output [default: OFF]" OFF)
OPTION(ENABLE_OPTIMIZATION "Enable extra optimizations [default: OFF]" OFF)
OPTION(SKIP_RELINK_RPATH "Skip relinking and full RPATH for the install tree" OFF)
OPTION(ENABLE_REDIRECTOR "Enable redirector install [default: OFF]" OFF)
@@ -63,6 +62,7 @@ OPTION(ENABLE_PCRE2 "Enable pcre2 instead of pcre [default: OFF]"
OPTION(ENABLE_GD "Enable libgd for images processing [default: ON]" ON)
OPTION(ENABLE_JEMALLOC "Build rspamd with jemalloc allocator [default: OFF]" OFF)
OPTION(ENABLE_COVERAGE "Build rspamd with code coverage options [default: OFF]" OFF)
+OPTION(ENABLE_FULL_DEBUG "Build rspamd with all possible debug [default: OFF]" OFF)
INCLUDE(FindArch.cmake)
TARGET_ARCHITECTURE(ARCH)
@@ -845,11 +845,11 @@ IF(NOT CMAKE_C_OPT_FLAGS)
SET(CMAKE_C_OPT_FLAGS "-g -O3 -fstrict-aliasing")
ENDIF()
ELSE(ENABLE_OPTIMIZATION MATCHES "ON")
- IF(DEBUG_MODE MATCHES "ON")
+ IF(ENABLE_FULL_DEBUG MATCHES "ON")
SET(CMAKE_C_OPT_FLAGS "-g -O0 -fstrict-aliasing")
- ELSE(DEBUG_MODE MATCHES "ON")
+ ELSE(ENABLE_FULL_DEBUG MATCHES "ON")
SET(CMAKE_C_OPT_FLAGS "-g -O2 -fstrict-aliasing")
- ENDIF(DEBUG_MODE MATCHES "ON")
+ ENDIF(ENABLE_FULL_DEBUG MATCHES "ON")
ENDIF(ENABLE_OPTIMIZATION MATCHES "ON")
ENDIF(NOT CMAKE_C_OPT_FLAGS)
diff --git a/contrib/aho-corasick/CMakeLists.txt b/contrib/aho-corasick/CMakeLists.txt
index ea300253f..93c51a146 100644
--- a/contrib/aho-corasick/CMakeLists.txt
+++ b/contrib/aho-corasick/CMakeLists.txt
@@ -1,8 +1,11 @@
SET(AHOCORASICSRC acism_create.c
acism.c)
+
+IF(ENABLE_FULL_DEBUG MATCHES "OFF")
if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
endif ()
+ENDIF()
IF(NOT GPL_RSPAMD_BINARY)
ADD_LIBRARY(rspamd-actrie SHARED ${AHOCORASICSRC})
diff --git a/contrib/hiredis/CMakeLists.txt b/contrib/hiredis/CMakeLists.txt
index 5134ee9a6..f8b233996 100644
--- a/contrib/hiredis/CMakeLists.txt
+++ b/contrib/hiredis/CMakeLists.txt
@@ -6,9 +6,12 @@ SET(HIREDISSRC async.c
sds.c)
SET(HIREDIS_CFLAGS "")
+
+IF(ENABLE_FULL_DEBUG MATCHES "OFF")
IF("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
SET(HIREDIS_CFLAGS "${HIREDIS_CFLAGS} -O3")
ENDIF()
+ENDIF()
ADD_LIBRARY(rspamd-hiredis STATIC ${HIREDISSRC})
diff --git a/contrib/http-parser/CMakeLists.txt b/contrib/http-parser/CMakeLists.txt
index d54646e55..499c85e93 100644
--- a/contrib/http-parser/CMakeLists.txt
+++ b/contrib/http-parser/CMakeLists.txt
@@ -1,9 +1,12 @@
SET(HTTPSRC http_parser.c)
+
SET(HTTP_COMPILE_FLAGS "-DRSPAMD_LIB")
+IF(ENABLE_FULL_DEBUG MATCHES "OFF")
if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
set(HTTP_COMPILE_FLAGS "${HTTP_COMPILE_FLAGS} -O3")
endif ()
+ENDIF()
ADD_LIBRARY(rspamd-http-parser STATIC ${HTTPSRC})
SET_TARGET_PROPERTIES(rspamd-http-parser PROPERTIES VERSION ${RSPAMD_VERSION})
diff --git a/contrib/lc-btrie/CMakeLists.txt b/contrib/lc-btrie/CMakeLists.txt
index 7ae9ce063..b520bda86 100644
--- a/contrib/lc-btrie/CMakeLists.txt
+++ b/contrib/lc-btrie/CMakeLists.txt
@@ -2,7 +2,10 @@ SET(LCTRIESRC btrie.c)
ADD_LIBRARY(lcbtrie STATIC ${LCTRIESRC})
SET(LCTRIE_CFLAGS "-DBUILD_RSPAMD")
+IF(ENABLE_FULL_DEBUG MATCHES "OFF")
if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
SET(LCTRIE_CFLAGS "${LCTRIE_CFLAGS} -O3")
endif ()
+ENDIF()
+
set_target_properties(lcbtrie PROPERTIES COMPILE_FLAGS "${LCTRIE_CFLAGS}") \ No newline at end of file
diff --git a/contrib/libottery/CMakeLists.txt b/contrib/libottery/CMakeLists.txt
index 3ea5658f3..7e504605b 100644
--- a/contrib/libottery/CMakeLists.txt
+++ b/contrib/libottery/CMakeLists.txt
@@ -6,7 +6,9 @@ SET(OTTERYSRC chacha_merged.c
ADD_LIBRARY(ottery STATIC ${OTTERYSRC})
SET(OTTERY_CFLAGS "-DBUILD_RSPAMD")
+IF(ENABLE_FULL_DEBUG MATCHES "OFF")
if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
SET(OTTERY_CFLAGS "${OTTERY_CFLAGS} -O3")
endif ()
+ENDIF()
set_target_properties(ottery PROPERTIES COMPILE_FLAGS "${OTTERY_CFLAGS}") \ No newline at end of file
diff --git a/contrib/linenoise/CMakeLists.txt b/contrib/linenoise/CMakeLists.txt
index b83d40f2a..8fc9ff843 100644
--- a/contrib/linenoise/CMakeLists.txt
+++ b/contrib/linenoise/CMakeLists.txt
@@ -3,6 +3,8 @@ SET(LINENOISESRC linenoise.c)
ADD_LIBRARY(rspamd-linenoise STATIC ${LINENOISESRC})
SET_TARGET_PROPERTIES(rspamd-linenoise PROPERTIES VERSION ${RSPAMD_VERSION})
+IF(ENABLE_FULL_DEBUG MATCHES "OFF")
if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
SET_TARGET_PROPERTIES(rspamd-linenoise PROPERTIES COMPILE_FLAGS "-O3")
endif ()
+ENDIF()
diff --git a/contrib/lpeg/CMakeLists.txt b/contrib/lpeg/CMakeLists.txt
index 8ac8d2c75..2362aac9c 100644
--- a/contrib/lpeg/CMakeLists.txt
+++ b/contrib/lpeg/CMakeLists.txt
@@ -4,9 +4,11 @@ SET(LPEGSRC lpcap.c
lptree.c
lpvm.c)
+IF(ENABLE_FULL_DEBUG MATCHES "OFF")
if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
SET(LPEG_CFLAGS "${LPEG_CFLAGS} -O3")
endif ()
+ENDIF()
SET(LIB_TYPE STATIC)
ADD_LIBRARY(rspamd-lpeg ${LIB_TYPE} ${LPEGSRC})
diff --git a/contrib/xxhash/CMakeLists.txt b/contrib/xxhash/CMakeLists.txt
index 252d1f020..8caf319e4 100644
--- a/contrib/xxhash/CMakeLists.txt
+++ b/contrib/xxhash/CMakeLists.txt
@@ -1,6 +1,9 @@
SET(XXHASHSRC xxhash.c)
ADD_LIBRARY(xxhash STATIC ${XXHASHSRC})
+
+IF(ENABLE_FULL_DEBUG MATCHES "OFF")
if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
SET_TARGET_PROPERTIES(xxhash PROPERTIES COMPILE_FLAGS "-O3")
endif ()
+ENDIF()
diff --git a/contrib/zstd/CMakeLists.txt b/contrib/zstd/CMakeLists.txt
index 1b7b9d290..953839ba7 100644
--- a/contrib/zstd/CMakeLists.txt
+++ b/contrib/zstd/CMakeLists.txt
@@ -12,6 +12,9 @@ SET(ZSTDSRC divsufsort.c
zstd_decompress.c)
ADD_LIBRARY(rspamd-zstd STATIC ${ZSTDSRC})
+
+IF(ENABLE_FULL_DEBUG MATCHES "OFF")
if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
SET_TARGET_PROPERTIES(rspamd-zstd PROPERTIES COMPILE_FLAGS "-O3")
endif ()
+ENDIF()
diff --git a/debian/control b/debian/control
index 8949d6ea6..3ec544a3a 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: rspamd
Section: mail
Priority: extra
Maintainer: Mikhail Gusarov <dottedmag@debian.org>
-Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.16.1~), cmake, libevent-dev (>= 1.3), libglib2.0-dev (>= 2.16.0), libgmime-2.6-dev, libluajit-5.1-dev [amd64 armel armhf i386 kfreebsd-i386 mips mipsel powerpc powerpcspe] | liblua5.1-dev, libpcre3-dev, libssl-dev (>= 1.0), libcurl4-openssl-dev, libsqlite3-dev, libmagic-dev, perl, dh-systemd, libjemalloc-dev, ragel
+Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.16.1~), cmake, libevent-dev (>= 1.3), libglib2.0-dev (>= 2.16.0), libluajit-5.1-dev [amd64 armel armhf i386 kfreebsd-i386 mips mipsel powerpc powerpcspe] | liblua5.1-dev, libpcre3-dev, libssl-dev (>= 1.0), libcurl4-openssl-dev, libsqlite3-dev, libmagic-dev, perl, dh-systemd, libjemalloc-dev, ragel
Standards-Version: 3.9.6
Homepage: https://rspamd.com
Vcs-Git: git://github.com/vstakhov/rspamd.git
diff --git a/debian/rules b/debian/rules
index d9aeb5a83..1de157b9a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -23,6 +23,9 @@ override_dh_auto_configure:
-DINSTALL_EXAMPLES=ON \
-DFORCE_GMIME24=ON \
-DENABLE_JEMALLOC=ON \
+ -DENABLE_FULL_DEBUG=OFF \
+ -DENABLE_GD=ON \
+ -DENABLE_PCRE2=OFF \
-DENABLE_HIREDIS=ON \
-DENABLE_LUAJIT=ON \
-DWANT_SYSTEMD_UNITS=ON