| 1 |
# - Find a BLAS library (no includes) |
| 2 |
# This module defines |
| 3 |
# BLAS_LIBRARIES, the libraries needed to use BLAS. |
| 4 |
# BLAS_FOUND, If false, do not try to use BLAS. |
| 5 |
# also defined, but not for general use are |
| 6 |
# BLAS_LIBRARY, where to find the BLAS library. |
| 7 |
|
| 8 |
SET(BLAS_NAMES ${BLAS_NAMES} blas) |
| 9 |
FIND_LIBRARY(BLAS_LIBRARY |
| 10 |
NAMES ${BLAS_NAMES} |
| 11 |
PATHS ${CMAKE_SYSTEM_LIBRARY_PATH} /usr/lib64/atlas /usr/lib/atlas /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib |
| 12 |
) |
| 13 |
|
| 14 |
IF (BLAS_LIBRARY) |
| 15 |
SET(BLAS_LIBRARIES ${BLAS_LIBRARY}) |
| 16 |
SET(BLAS_FOUND "YES") |
| 17 |
ELSE (BLAS_LIBRARY) |
| 18 |
SET(BLAS_FOUND "NO") |
| 19 |
ENDIF (BLAS_LIBRARY) |
| 20 |
|
| 21 |
|
| 22 |
IF (BLAS_FOUND) |
| 23 |
IF (NOT BLAS_FIND_QUIETLY) |
| 24 |
MESSAGE(STATUS "Found BLAS: ${BLAS_LIBRARIES}") |
| 25 |
ENDIF (NOT BLAS_FIND_QUIETLY) |
| 26 |
ELSE (BLAS_FOUND) |
| 27 |
IF (BLAS_FIND_REQUIRED) |
| 28 |
MESSAGE(FATAL_ERROR "Could not find BLAS") |
| 29 |
ENDIF (BLAS_FIND_REQUIRED) |
| 30 |
ENDIF (BLAS_FOUND) |
| 31 |
|
| 32 |
# Deprecated declarations. |
| 33 |
GET_FILENAME_COMPONENT (NATIVE_BLAS_LIB_PATH ${BLAS_LIBRARY} PATH) |
| 34 |
|
| 35 |
MARK_AS_ADVANCED( |
| 36 |
BLAS_LIBRARY |
| 37 |
) |