From 54838ff7977971be32e3b09d399a1bd316bf360e Mon Sep 17 00:00:00 2001 From: Maarten de Vries Date: Tue, 28 Feb 2017 11:42:50 +0100 Subject: [PATCH] Add support for cblas in the CMake build system. --- cmake/Dependencies.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake index 02c81525bce..c4a4d9d6687 100644 --- a/cmake/Dependencies.cmake +++ b/cmake/Dependencies.cmake @@ -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)