/
ARMA_FindCBLAS.cmake
47 lines (40 loc) · 1.23 KB
/
ARMA_FindCBLAS.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
38
39
40
41
42
43
44
45
46
47
# - Find CBLAS (includes and library)
# This module defines
# CBLAS_INCLUDE_DIR
# CBLAS_LIBRARIES
# CBLAS_FOUND
# also defined, but not for general use are
# CBLAS_LIBRARY, where to find the library.
find_path(CBLAS_INCLUDE_DIR cblas.h
/usr/include/atlas/
/usr/local/include/atlas/
/usr/include/
/usr/local/include/
)
set(CBLAS_NAMES ${CBLAS_NAMES} cblas)
find_library(CBLAS_LIBRARY
NAMES ${CBLAS_NAMES}
PATHS /usr/lib64/atlas-sse3 /usr/lib64/atlas /usr/lib64 /usr/local/lib64/atlas /usr/local/lib64 /usr/lib/atlas-sse3 /usr/lib/atlas-sse2 /usr/lib/atlas-sse /usr/lib/atlas-3dnow /usr/lib/atlas /usr/lib /usr/local/lib/atlas /usr/local/lib
)
if (CBLAS_LIBRARY AND CBLAS_INCLUDE_DIR)
set(CBLAS_LIBRARIES ${CBLAS_LIBRARY})
set(CBLAS_FOUND "YES")
else ()
set(CBLAS_FOUND "NO")
endif ()
if (CBLAS_FOUND)
if (NOT CBLAS_FIND_QUIETLY)
message(STATUS "Found a CBLAS library: ${CBLAS_LIBRARIES}")
endif ()
else ()
if (CBLAS_FIND_REQUIRED)
message(FATAL_ERROR "Could not find a CBLAS library")
endif ()
endif ()
# Deprecated declarations.
set (NATIVE_CBLAS_INCLUDE_PATH ${CBLAS_INCLUDE_DIR} )
get_filename_component (NATIVE_CBLAS_LIB_PATH ${CBLAS_LIBRARY} PATH)
mark_as_advanced(
CBLAS_LIBRARY
CBLAS_INCLUDE_DIR
)