Commit 18d09be6 authored by Michael Turner's avatar Michael Turner

blas find

parent e2bd965e
......@@ -4,35 +4,24 @@ IF(NOT DEFINED LAPACK_DIR AND DEFINED TEST_ENV)
SET(LAPACK_DIR $ENV{LAPACK_DIR})
ENDIF()
SET( NATIVE_BLAS_LAPACK_SEARCH_PATHS /usr/lib
/usr/lib64
/usr/local/lib
/usr/local/lib64
${LAPACK_DIR}/lib64
${LAPACK_DIR}/lib)
SET(TEST_ENV $ENV{BLAS_DIR})
IF(NOT DEFINED BLAS_DIR AND DEFINED TEST_ENV)
SET(BLAS_DIR $ENV{BLAS_DIR})
ENDIF()
FIND_LIBRARY(NATIVE_BLAS NAMES blas PATHS ${NATIVE_BLAS_LAPACK_SEARCH_PATHS})
FIND_LIBRARY(NATIVE_LAPACK NAMES lapack PATHS ${NATIVE_BLAS_LAPACK_SEARCH_PATHS})
GET_FILENAME_COMPONENT(NATIVE_BLAS_LIB_DIR ${NATIVE_BLAS} PATH)
GET_FILENAME_COMPONENT(NATIVE_LAPACK_LIB_DIR ${NATIVE_LAPACK} PATH)
SET(BLA_VENDOR Generic)
find_package(BLAS QUIET)
find_package(LAPACK QUIET)
IF (NATIVE_BLAS AND NATIVE_LAPACK)
IF (BLAS_FOUND AND LAPACK_FOUND)
SET(NATIVE_BLAS_LAPACK_FOUND ON)
ENDIF (NATIVE_BLAS AND NATIVE_LAPACK)
ENDIF ()
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)
MARK_AS_ADVANCED(NATIVE_BLAS)
MARK_AS_ADVANCED(NATIVE_LAPACK)
MARK_AS_ADVANCED(NATIVE_BLAS_LIB_DIR)
MARK_AS_ADVANCED(NATIVE_LAPACK_LIB_DIR)
......@@ -437,7 +437,7 @@ IF( NEKTAR_USE_OPENBLAS AND OPENBLAS_FOUND )
ENDIF( NEKTAR_USE_OPENBLAS AND OPENBLAS_FOUND )
IF( NEKTAR_USE_SYSTEM_BLAS_LAPACK )
TARGET_LINK_LIBRARIES(LibUtilities LINK_PUBLIC ${NATIVE_LAPACK} ${NATIVE_BLAS})
TARGET_LINK_LIBRARIES(LibUtilities LINK_PUBLIC ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
ENDIF( NEKTAR_USE_SYSTEM_BLAS_LAPACK )
IF(THIRDPARTY_BUILD_BLAS_LAPACK)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment