File: cmake-using-basic-blas

package info (click to toggle)
caffe 1.0.0%2Bgit20180821.99bd997-8
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 16,288 kB
  • sloc: cpp: 61,586; python: 5,783; makefile: 599; sh: 559
file content (20 lines) | stat: -rw-r--r-- 737 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
due to Debian feature `update-alternatives`,
we link libcaffe against libblas.so.3 instead
of directly openblas or atlas.

Forwarded: yes
https://github.com/BVLC/caffe/pull/4238

--- a/cmake/Dependencies.cmake
+++ b/cmake/Dependencies.cmake
@@ -121,6 +121,10 @@
     find_package(Atlas REQUIRED)
     list(APPEND Caffe_INCLUDE_DIRS PUBLIC ${Atlas_INCLUDE_DIR})
     list(APPEND Caffe_LINKER_LIBS PUBLIC ${Atlas_LIBRARIES})
+  elseif(BLAS STREQUAL "Generic")
+    set(BLA_VENDOR "Generic")
+    find_package(BLAS REQUIRED)
+    list(APPEND Caffe_LINKER_LIBS ${BLAS_LIBRARIES})
   elseif(BLAS STREQUAL "Open" OR BLAS STREQUAL "open")
     find_package(OpenBLAS REQUIRED)
     list(APPEND Caffe_INCLUDE_DIRS PUBLIC ${OpenBLAS_INCLUDE_DIR})