diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-07-16 16:39:35 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-07-16 16:39:35 +0100 |
commit | 57ad67a4b4560a936f9bc7efa6a1a3778a1372fa (patch) | |
tree | 179c5874aef6cc980d6fd3bee1fff1b9ec1c27fe /CMakeLists.txt | |
parent | 8d080cdc349ee281701ae185d2053314611875da (diff) | |
download | rspamd-57ad67a4b4560a936f9bc7efa6a1a3778a1372fa.tar.gz rspamd-57ad67a4b4560a936f9bc7efa6a1a3778a1372fa.zip |
[Feature] Import torch to Rspamd...
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 091439be3..f0dee1328 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,6 +63,7 @@ OPTION(ENABLE_JEMALLOC "Build rspamd with jemalloc allocator [default: OFF] OPTION(ENABLE_COVERAGE "Build rspamd with code coverage options [default: OFF]" OFF) OPTION(ENABLE_FULL_DEBUG "Build rspamd with all possible debug [default: OFF]" OFF) OPTION(ENABLE_UTILS "Build rspamd internal utils [default: OFF]" OFF) +OPTION(ENABLE_TORCH "Install torch7 with Rspamd [default: OFF]" OFF) INCLUDE(FindArch.cmake) TARGET_ARCHITECTURE(ARCH) @@ -1260,6 +1261,16 @@ IF(ENABLE_CLANG_PLUGIN MATCHES "ON") ADD_SUBDIRECTORY(clang-plugin) ENDIF() +IF(ENABLE_TORCH MATCHES "ON") + IF(WITH_LUAJIT) + ADD_SUBDIRECTORY(contrib/torch/paths) + ADD_SUBDIRECTORY(contrib/torch/torch7) + ADD_SUBDIRECTORY(contrib/torch/nn) + ELSE() + MESSAGE(FATAL_ERROR "Cannot enable torch without luajit") + ENDIF() +ENDIF() + ADD_SUBDIRECTORY(src) ADD_SUBDIRECTORY(test) ADD_SUBDIRECTORY(utils) @@ -1340,6 +1351,10 @@ ENDFOREACH(LUA_LIB) # Install lua fun library INSTALL(FILES "contrib/lua-fun/fun.lua" DESTINATION ${LUALIBDIR}) +IF(ENABLE_TORCH MATCHES "ON") + INSTALL(FILES "contrib/moses/moses.lua" DESTINATION ${LUALIBDIR}) +ENDIF() + # systemd unit IF(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND WANT_SYSTEMD_UNITS MATCHES "ON") INSTALL(FILES "rspamd.service" DESTINATION ${SYSTEMDDIR}) |