mirror of
https://github.com/rspamd/rspamd.git
synced 2024-09-13 23:56:50 +02:00
bbf8bb172d
ENABLE_OPENBLAS is removed because it was not used to check if the openblas library should be used. The ENABLE_BLAS is moved from CMakeLists.txt to cmake/Openblas.cmake to have all related variables in one file and to reduce a complexity of CMakeLists.txt slightly.
26 lines
908 B
CMake
26 lines
908 B
CMake
option (ENABLE_BLAS "Enable openblas for fast neural network processing [default: OFF]" OFF)
|
|
|
|
IF(ENABLE_BLAS MATCHES "ON")
|
|
ProcessPackage(BLAS OPTIONAL_INCLUDE 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)
|
|
FIND_FILE(HAVE_CBLAS_H HINTS "${RSPAMD_SEARCH_PATH}"
|
|
NAMES cblas.h
|
|
DOC "Path to cblas.h header")
|
|
IF(NOT HAVE_CBLAS_H)
|
|
MESSAGE(STATUS "Blas header cblas.h has not been found, use internal workaround")
|
|
ELSE()
|
|
ADD_DEFINITIONS(-DHAVE_CBLAS_H)
|
|
ENDIF()
|
|
ELSE()
|
|
ADD_DEFINITIONS(-DHAVE_CBLAS_H)
|
|
ENDIF()
|
|
ADD_DEFINITIONS(-DHAVE_CBLAS)
|
|
ENDIF(WITH_BLAS) |