File tree Expand file tree Collapse file tree 1 file changed +35
-6
lines changed
Expand file tree Collapse file tree 1 file changed +35
-6
lines changed Original file line number Diff line number Diff line change 11# BLAS
22set (BLAS_ROOT "" CACHE STRING "Root directory of BLAS or OpenBLAS" )
3- message (STATUS "BLAS_ROOT is " ${BLAS_ROOT} )
3+ if (NOT BLAS_ROOT STREQUAL "" )
4+ message (STATUS "BLAS_ROOT is " ${BLAS_ROOT} )
5+ endif ()
46
57set (USE_CMAKE_FIND_BLAS ON )
68
@@ -103,12 +105,39 @@ if (NOT USE_CMAKE_FIND_BLAS)
103105 endif ()
104106 endif ()
105107else ()
106- find_package (BLAS REQUIRED)
107- if (BLAS_FOUND)
108- message (STATUS "Using BLAS library: ${BLAS_LIBRARIES} " )
109- message (STATUS "BLAS include dirs: ${BLAS_INCLUDE_DIRS} " )
108+
109+ if (NOT BLA_VENDOR)
110+ if (APPLE )
111+ set (BLA_VENDOR Apple )
112+ elseif (LINUX)
113+ set (BLA_VENDOR OpenBLAS)
114+ elseif (WIN31)
115+ set (BLA_VENDOR OpenBLAS)
116+ endif ()
117+
118+ find_package (BLAS QUIET )
119+ if (BLAS_FOUND)
120+ message (STATUS "Using BLAS library: ${BLAS_LIBRARIES} " )
121+ if (BLAS_INCLUDE_DIRS)
122+ message (STATUS "BLAS include dirs: ${BLAS_INCLUDE_DIRS} " )
123+ endif ()
124+ else ()
125+ unset (BLA_VENDOR)
126+ endif ()
110127 else ()
111- message (FATAL_ERROR "No BLAS library found!" )
128+ message (STATUS "Specified BLA_VENDOR: ${BLA_VENDOR} " )
129+ endif ()
130+
131+ if (NOT BLAS_FOUND)
132+ find_package (BLAS REQUIRED)
133+ if (BLAS_FOUND)
134+ message (STATUS "Using BLAS library: ${BLAS_LIBRARIES} " )
135+ if (BLAS_INCLUDE_DIRS)
136+ message (STATUS "BLAS include dirs: ${BLAS_INCLUDE_DIRS} " )
137+ endif ()
138+ else ()
139+ message (FATAL_ERROR "No BLAS library found!" )
140+ endif ()
112141 endif ()
113142endif ()
114143
You can’t perform that action at this time.
0 commit comments