blob: e2afa92c5a57b4d08cb900db385602f99f4e6702 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
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)
|