diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-11-06 14:41:46 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-11-06 14:41:46 +0000 |
commit | 546519543f8a0ed4a342fc3dbb8c95fb822e1901 (patch) | |
tree | f0504820192e1cd1fda4327c4933f3a42f337bea | |
parent | 87a2bd10978bd09e864f76f073de8484698c8345 (diff) | |
download | rspamd-546519543f8a0ed4a342fc3dbb8c95fb822e1901.tar.gz rspamd-546519543f8a0ed4a342fc3dbb8c95fb822e1901.zip |
[Minor] Add option to enable openblas support to cmake
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c897e401..3aadde729 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,6 +61,8 @@ 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_BLAS "Enables libopenblas support [default: ON]" ON) + INCLUDE(FindArch.cmake) TARGET_ARCHITECTURE(ARCH) @@ -643,11 +645,15 @@ ProcessPackage(LIBZ LIBRARY z INCLUDE zlib.h INCLUDE_SUFFIXES include/zlib ProcessPackage(SODIUM LIBRARY sodium INCLUDE sodium.h INCLUDE_SUFFIXES include/libsodium include/sodium ROOT ${LIBSODIUM_ROOT_DIR} MODULES libsodium>=1.0.0) -ProcessPackage(BLAS OPTIONAL LIBRARY openblas blas + +IF(ENABLE_BLAS MATCHES "ON") +ProcessPackage(BLAS LIBRARY openblas blas INCLUDE cblas.h INCLUDE_SUFFIXES include/openblas include/blas ROOT ${BLAS_ROOT_DIR} LIB_OUTPUT BLAS_REQUIRED_LIBRARIES) +ENDIF() + IF(WITH_BLAS) MESSAGE(STATUS "Use openblas to accelerate kann") IF(NOT BLAS_INCLUDE) |