Skip to content

Commit

Permalink
[Minor] Add build system support for fasttext library
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed Apr 23, 2023
1 parent 5892a97 commit d178f7e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit d178f7e

Please sign in to comment.