Add support for netlib reference cblas in the CMake build system. #5333

Open
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+5 −1
Split
View
@@ -107,7 +107,7 @@ endif()
# ---[ BLAS
if(NOT APPLE)
set(BLAS "Atlas" CACHE STRING "Selected BLAS library")
- set_property(CACHE BLAS PROPERTY STRINGS "Atlas;Open;MKL")
+ set_property(CACHE BLAS PROPERTY STRINGS "Atlas;Open;MKL;cblas")
if(BLAS STREQUAL "Atlas" OR BLAS STREQUAL "atlas")
find_package(Atlas REQUIRED)
@@ -122,6 +122,10 @@ if(NOT APPLE)
list(APPEND Caffe_INCLUDE_DIRS PUBLIC ${MKL_INCLUDE_DIR})
list(APPEND Caffe_LINKER_LIBS PUBLIC ${MKL_LIBRARIES})
list(APPEND Caffe_DEFINITIONS PUBLIC -DUSE_MKL)
+ elseif(BLAS STREQUAL "CBLAS" OR BLAS STREQUAL "cblas")
+ find_package(cblas REQUIRED)
+ list(APPEND Caffe_INCLUDE_DIRS PUBLIC ${CBLAS_INCLUDE_DIRS})
+ list(APPEND Caffe_LINKER_LIBS PUBLIC ${CBLAS_LIBRARIES})
endif()
elseif(APPLE)
find_package(vecLib REQUIRED)