forked from mlpack/mlpack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ARMA_FindOpenBLAS.cmake
37 lines (31 loc) · 1018 Bytes
/
ARMA_FindOpenBLAS.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
29
30
31
32
33
34
35
36
37
# - Find the OpenBLAS library (no includes)
# This module defines
# OpenBLAS_LIBRARIES, the libraries needed to use OpenBLAS.
# OpenBLAS_FOUND, If false, do not try to use OpenBLAS.
# also defined, but not for general use are
# OpenBLAS_LIBRARY, where to find the OpenBLAS library.
set(OpenBLAS_NAMES ${OpenBLAS_NAMES} openblas)
find_library(OpenBLAS_LIBRARY
NAMES ${OpenBLAS_NAMES}
PATHS /lib64 /lib /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib
)
if (OpenBLAS_LIBRARY)
set(OpenBLAS_LIBRARIES ${OpenBLAS_LIBRARY})
set(OpenBLAS_FOUND "YES")
else ()
set(OpenBLAS_FOUND "NO")
endif ()
if (OpenBLAS_FOUND)
if (NOT OpenBLAS_FIND_QUIETLY)
message(STATUS "Found the OpenBLAS library: ${OpenBLAS_LIBRARIES}")
endif ()
else ()
if (OpenBLAS_FIND_REQUIRED)
message(FATAL_ERROR "Could not find the OpenBLAS library")
endif ()
endif ()
# Deprecated declarations.
get_filename_component (NATIVE_OpenBLAS_LIB_PATH ${OpenBLAS_LIBRARY} PATH)
mark_as_advanced(
OpenBLAS_LIBRARY
)