FindNativeBlasLapack.cmake 823 Bytes
Newer Older
Blake Nelson's avatar
Blake Nelson committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22


SET(NATIVE_BLAS_LAPACK_SEARCH_PATHS /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64 )

FIND_LIBRARY(NATIVE_BLAS NAMES blas PATHS ${NATIVE_BLAS_LAPACK_SEARCH_PATHS})
FIND_LIBRARY(NATIVE_LAPACK NAMES lapack PATHS ${NATIVE_BLAS_LAPACK_SEARCH_PATHS})


IF (NATIVE_BLAS AND NATIVE_LAPACK)
  SET(NATIVE_BLAS_LAPACK_FOUND ON)
ENDIF (NATIVE_BLAS AND NATIVE_LAPACK)

IF (NATIVE_BLAS_LAPACK_FOUND)
  IF (NOT NATIVE_BLAS_LAPACK_FIND_QUIETLY)
     MESSAGE(STATUS "Found Native Blas and Lapack")
  ENDIF (NOT NATIVE_BLAS_LAPACK_FIND_QUIETLY)
ELSE(NATIVE_BLAS_LAPACK_FOUND)
  IF (NATIVE_BLAS_LAPACK_FIND_REQUIRED)
     MESSAGE(FATAL_ERROR "Could not find Native blas and lapack libraries.")
  ENDIF (NATIVE_BLAS_LAPACK_FIND_REQUIRED)
ENDIF (NATIVE_BLAS_LAPACK_FOUND)

23 24
MARK_AS_ADVANCED(NATIVE_BLAS)
MARK_AS_ADVANCED(NATIVE_LAPACK)
Blake Nelson's avatar
Blake Nelson committed
25