FindOpenBlas.cmake 638 Bytes
Newer Older
Pavel Burovskiy's avatar
Pavel Burovskiy committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

SET(OPEN_BLAS_SEARCH_PATHS  /lib/ /lib64/  /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64 /opt/OpenBLAS/lib $ENV{OPENBLAS_HOME}/lib )
FIND_LIBRARY(OPENBLAS NAMES openblas PATHS ${OPEN_BLAS_SEARCH_PATHS})

IF (OPENBLAS)
  SET(OPENBLAS_FOUND ON)
ENDIF (OPENBLAS)

IF (OPENBLAS_FOUND)
#  IF (NOT NATIVE_BLAS_LAPACK_FIND_QUIETLY)
     MESSAGE(STATUS "Found OpenBLAS")
#  ENDIF (NOT NATIVE_BLAS_LAPACK_FIND_QUIETLY)
ELSE(OPENBLAS_FOUND)
#  IF (NATIVE_BLAS_LAPACK_FIND_REQUIRED)
     MESSAGE(FATAL_ERROR "Could not find OpenBLAS libraries.")
#  ENDIF (NATIVE_BLAS_LAPACK_FIND_REQUIRED)
ENDIF (OPENBLAS_FOUND)

MARK_AS_ADVANCED(OPENBLAS)