OPTION(ENABLE_SNOWBALL "Enable snowball stemmer [default: ON]" ON)
OPTION(ENABLE_CLANG_PLUGIN "Enable clang static analysing plugin [default: OFF]" OFF)
OPTION(ENABLE_HYPERSCAN "Enable hyperscan for fast regexp processing [default: OFF]" OFF)
-
+OPTION(ENABLE_FANN "Enable fann for neural network plugin [default: OFF]" OFF)
INCLUDE(FindArch.cmake)
TARGET_ARCHITECTURE(ARCH)
ROOT ${HYPERSCAN_ROOT_DIR} MODULES hs)
SET(WITH_HYPERSCAN 1)
ENDIF()
+IF (ENABLE_FANN MATCHES "ON")
+ ProcessPackage(FANN LIBRARY fann INCLUDE fann.h INCLUDE_SUFFIXES
+ include/fann
+ ROOT ${FANN_ROOT_DIR} MODULES fann)
+ SET(WITH_FANN 1)
+ENDIF ()
#Check for openssl (required for dkim)
IF(WITH_OPENSSL)
#cmakedefine LIBEVENT_EVHTTP 1
#cmakedefine PARAM_H_HAS_BITSET 1
#cmakedefine WITH_DB 1
+#cmakedefine WITH_FANN 1
#cmakedefine WITH_GPERF_TOOLS 1
#cmakedefine WITH_HIREDIS 1
#cmakedefine WITH_HYPERSCAN 1
ENDIF()
TARGET_LINK_LIBRARIES(rspamd rspamd-actrie)
+IF (ENABLE_FANN MATCHES "ON")
+ TARGET_LINK_LIBRARIES(rspamd fann)
+ENDIF ()
+
IF (ENABLE_HYPERSCAN MATCHES "ON")
TARGET_LINK_LIBRARIES(rspamd hs)
SET_TARGET_PROPERTIES(rspamd PROPERTIES LINKER_LANGUAGE CXX)
SET_TARGET_PROPERTIES(rspamadm PROPERTIES VERSION ${RSPAMD_VERSION})
ENDIF (NOT DEBIAN_BUILD)
+IF (ENABLE_FANN MATCHES "ON")
+ TARGET_LINK_LIBRARIES(rspamadm fann)
+ENDIF ()
IF (ENABLE_HYPERSCAN MATCHES "ON")
TARGET_LINK_LIBRARIES(rspamadm hs)
SET_TARGET_PROPERTIES(rspamadm PROPERTIES LINKER_LANGUAGE CXX)