From d178f7e4c08c602e0c771ef75436556ccda3df09 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sun, 23 Apr 2023 20:53:39 +0100 Subject: [PATCH] [Minor] Add build system support for fasttext library --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) 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) -- 2.39.5