From: Vsevolod Stakhov Date: Sun, 23 Apr 2023 19:53:39 +0000 (+0100) Subject: [Minor] Add build system support for fasttext library X-Git-Tag: 3.6~150 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d178f7e4c08c602e0c771ef75436556ccda3df09;p=rspamd.git [Minor] Add build system support for fasttext library --- diff --git a/CMakeLists.txt b/CMakeLists.txt index d5cb176c1..8ab5658d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,6 +57,7 @@ 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) +OPTION(ENABLE_FASTTEXT "Link with FastText library [default: OFF]" OFF) 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) @@ -242,6 +243,12 @@ ProcessPackage(SODIUM LIBRARY sodium INCLUDE sodium.h INCLUDE_SUFFIXES include/libsodium include/sodium ROOT ${LIBSODIUM_ROOT_DIR} MODULES libsodium>=1.0.0) +if(ENABLE_FASTTEXT MATCHES "ON") + ProcessPackage(FASTTEXT LIBRARY fasttext INCLUDE fasttext.h + INCLUDE_SUFFIXES include/fasttext + ROOT ${FASTTEXT_ROOT_DIR} MODULES fasttext) +endif() + include (CompilerWarnings) include (Hyperscan) include (Openblas)