Browse Source

[Minor] Redis support is now unconditional

pull/2335/head
Vsevolod Stakhov 7 years ago
parent
commit
418c101010
  1. 2
      .circleci/config.yml
  2. 4
      CMakeLists.txt
  3. 1
      debian/rules
  4. 4
      src/CMakeLists.txt
  5. 6
      src/libserver/CMakeLists.txt
  6. 10
      src/libstat/CMakeLists.txt
  7. 4
      test/CMakeLists.txt
  8. 4
      utils/CMakeLists.txt

2
.circleci/config.yml

@ -43,7 +43,7 @@ jobs:
- run: sudo apt-get install -qq cmake libevent-dev libglib2.0-dev libicu-dev libluajit-5.1-dev libmagic-dev libsqlite3-dev libssl-dev ragel
- run: mkdir ../build ; mkdir ../install ; cd ../build
- run: cmake ../project -DDBDIR=/nana -DENABLE_COVERAGE=ON -DCMAKE_INSTALL_PREFIX=../install -DENABLE_HIREDIS=ON
- run: cmake ../project -DDBDIR=/nana -DENABLE_COVERAGE=ON -DCMAKE_INSTALL_PREFIX=../install
- run: make install -j`nproc`

4
CMakeLists.txt

@ -1254,9 +1254,7 @@ ADD_SUBDIRECTORY(contrib/t1ha)
IF (ENABLE_SNOWBALL MATCHES "ON")
LIST(APPEND RSPAMD_REQUIRED_LIBRARIES stemmer)
ENDIF()
IF(ENABLE_HIREDIS MATCHES "ON")
LIST(APPEND RSPAMD_REQUIRED_LIBRARIES rspamd-hiredis)
ENDIF()
LIST(APPEND RSPAMD_REQUIRED_LIBRARIES rspamd-hiredis)
IF(ENABLE_HYPERSCAN MATCHES "OFF")
LIST(APPEND RSPAMD_REQUIRED_LIBRARIES rspamd-actrie)
ENDIF()

1
debian/rules

@ -27,7 +27,6 @@ override_dh_auto_configure:
-DENABLE_FULL_DEBUG=OFF \
-DENABLE_GD=OFF \
-DENABLE_PCRE2=OFF \
-DENABLE_HIREDIS=ON \
-DENABLE_LUAJIT=ON \
-DENABLE_TORCH=ON \
-DENABLE_LIBUNWIND=ON \

4
src/CMakeLists.txt

@ -171,9 +171,7 @@ TARGET_LINK_LIBRARIES(rspamd rspamd-server)
IF (ENABLE_SNOWBALL MATCHES "ON")
TARGET_LINK_LIBRARIES(rspamd stemmer)
ENDIF()
IF(ENABLE_HIREDIS MATCHES "ON")
TARGET_LINK_LIBRARIES(rspamd rspamd-hiredis)
ENDIF()
TARGET_LINK_LIBRARIES(rspamd rspamd-hiredis)
IF (ENABLE_FANN MATCHES "ON")
TARGET_LINK_LIBRARIES(rspamd fann)

6
src/libserver/CMakeLists.txt

@ -21,10 +21,8 @@ SET(LIBRSPAMDSERVERSRC
${CMAKE_CURRENT_SOURCE_DIR}/url.c
${CMAKE_CURRENT_SOURCE_DIR}/worker_util.c)
IF (ENABLE_HIREDIS MATCHES "ON")
LIST(APPEND LIBRSPAMDSERVERSRC "${CMAKE_CURRENT_SOURCE_DIR}/fuzzy_backend_redis.c")
LIST(APPEND LIBRSPAMDSERVERSRC "${CMAKE_CURRENT_SOURCE_DIR}/redis_pool.c")
ENDIF ()
LIST(APPEND LIBRSPAMDSERVERSRC "${CMAKE_CURRENT_SOURCE_DIR}/fuzzy_backend_redis.c")
LIST(APPEND LIBRSPAMDSERVERSRC "${CMAKE_CURRENT_SOURCE_DIR}/redis_pool.c")
# Librspamd-server
SET(RSPAMD_SERVER ${LIBRSPAMDSERVERSRC} PARENT_SCOPE)

10
src/libstat/CMakeLists.txt

@ -12,12 +12,10 @@ SET(BACKENDSSRC ${CMAKE_CURRENT_SOURCE_DIR}/backends/mmaped_file.c
${CMAKE_CURRENT_SOURCE_DIR}/backends/sqlite3_backend.c)
SET(CACHESSRC ${CMAKE_CURRENT_SOURCE_DIR}/learn_cache/sqlite3_cache.c)
IF(ENABLE_HIREDIS MATCHES "ON")
SET(BACKENDSSRC ${BACKENDSSRC}
${CMAKE_CURRENT_SOURCE_DIR}/backends/redis_backend.c)
SET(CACHESSRC ${CACHESSRC}
${CMAKE_CURRENT_SOURCE_DIR}/learn_cache/redis_cache.c)
ENDIF(ENABLE_HIREDIS MATCHES "ON")
SET(BACKENDSSRC ${BACKENDSSRC}
${CMAKE_CURRENT_SOURCE_DIR}/backends/redis_backend.c)
SET(CACHESSRC ${CACHESSRC}
${CMAKE_CURRENT_SOURCE_DIR}/learn_cache/redis_cache.c)
SET(RSPAMD_STAT ${LIBSTATSRC}

4
test/CMakeLists.txt

@ -33,9 +33,7 @@ TARGET_LINK_LIBRARIES(rspamd-test ${RSPAMD_REQUIRED_LIBRARIES})
IF (ENABLE_SNOWBALL MATCHES "ON")
TARGET_LINK_LIBRARIES(rspamd-test stemmer)
ENDIF()
IF(ENABLE_HIREDIS MATCHES "ON")
TARGET_LINK_LIBRARIES(rspamd-test rspamd-hiredis)
ENDIF()
TARGET_LINK_LIBRARIES(rspamd-test rspamd-hiredis)
IF (ENABLE_HYPERSCAN MATCHES "ON")
TARGET_LINK_LIBRARIES(rspamd-test hs)
ENDIF()

4
utils/CMakeLists.txt

@ -16,9 +16,7 @@ MACRO(ADD_UTIL NAME)
IF (ENABLE_SNOWBALL MATCHES "ON")
TARGET_LINK_LIBRARIES("${NAME}" stemmer)
ENDIF()
IF(ENABLE_HIREDIS MATCHES "ON")
TARGET_LINK_LIBRARIES("${NAME}" rspamd-hiredis)
ENDIF()
TARGET_LINK_LIBRARIES("${NAME}" rspamd-hiredis)
TARGET_LINK_LIBRARIES(${NAME} rspamd-linenoise)
TARGET_LINK_LIBRARIES("${NAME}" ${RSPAMD_REQUIRED_LIBRARIES})
ENDMACRO()

Loading…
Cancel
Save