forked from fblumenthal/buildem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
blas.cmake
28 lines (24 loc) · 820 Bytes
/
blas.cmake
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
27
28
# select the desired blas implementation
IF(NOT DEFINED WITH_ATLAS)
SET(WITH_ATLAS 1)
ENDIF()
SET(WITH_ATLAS ${WITH_ATLAS}
CACHE BOOL "Use ATLAS (WITH_ATLAS=1) or openBLAS (WITH_ATLAS=0) ?"
FORCE)
if(WITH_ATLAS)
include (atlas)
set(blas_NAME ${atlas_NAME})
else()
# On Mac, warn that openblas might not work.
if (${APPLE})
# Only emit this warning once.
if ("${emitted_warning_for_openblas_osx}" STREQUAL "")
message(WARNING "\n*** OpenBLAS does not always successfully build on Mac OS X. Consider using -DWITH_ATLAS=1 instead. ***\n")
set (emitted_warning_for_openblas_osx 1)
endif ()
endif ()
include (openblas)
set(blas_NAME ${openblas_NAME})
endif()
set (ENV{BLAS} ${BUILDEM_DIR}/lib)
set (ENV{LAPACK} ${BUILDEM_DIR}/lib)