| 1 |
# - Find a LAPACK library (no includes) |
| 2 |
# This module defines |
| 3 |
# LAPACK_LIBRARIES, the libraries needed to use LAPACK. |
| 4 |
# LAPACK_FOUND, If false, do not try to use LAPACK. |
| 5 |
# also defined, but not for general use are |
| 6 |
# LAPACK_LIBRARY, where to find the LAPACK library. |
| 7 |
|
| 8 |
SET(LAPACK_NAMES ${LAPACK_NAMES} lapack) |
| 9 |
FIND_LIBRARY(LAPACK_LIBRARY |
| 10 |
NAMES ${LAPACK_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 (LAPACK_LIBRARY) |
| 15 |
SET(LAPACK_LIBRARIES ${LAPACK_LIBRARY}) |
| 16 |
SET(LAPACK_FOUND "YES") |
| 17 |
ELSE (LAPACK_LIBRARY) |
| 18 |
SET(LAPACK_FOUND "NO") |
| 19 |
ENDIF (LAPACK_LIBRARY) |
| 20 |
|
| 21 |
|
| 22 |
IF (LAPACK_FOUND) |
| 23 |
IF (NOT LAPACK_FIND_QUIETLY) |
| 24 |
MESSAGE(STATUS "Found LAPACK: ${LAPACK_LIBRARIES}") |
| 25 |
ENDIF (NOT LAPACK_FIND_QUIETLY) |
| 26 |
ELSE (LAPACK_FOUND) |
| 27 |
IF (LAPACK_FIND_REQUIRED) |
| 28 |
MESSAGE(FATAL_ERROR "Could not find LAPACK") |
| 29 |
ENDIF (LAPACK_FIND_REQUIRED) |
| 30 |
ENDIF (LAPACK_FOUND) |
| 31 |
|
| 32 |
# Deprecated declarations. |
| 33 |
GET_FILENAME_COMPONENT (NATIVE_LAPACK_LIB_PATH ${LAPACK_LIBRARY} PATH) |
| 34 |
|
| 35 |
MARK_AS_ADVANCED( |
| 36 |
LAPACK_LIBRARY |
| 37 |
) |