the built-in FindBLAS cannot handle CBLAS, and it has only worked by incident on ubuntu since the libblas available there also includes libcblas. needed to be portable to other distros git-svn-id: http://svn.sintef.no/trondheim/IFEM/trunk@1875 e10b68d5-8a6e-419e-a041-bce267b0401d
25 lines
623 B
CMake
25 lines
623 B
CMake
IF (CBLAS_LIBRARIES)
|
|
SET(CBLAS_FIND_QUIETLY TRUE)
|
|
ENDIF (CBLAS_LIBRARIES)
|
|
|
|
FIND_LIBRARY(CBLAS_LIBRARIES
|
|
NAMES cblas
|
|
PATHS $ENV{HOME}/lib
|
|
/usr/lib/atlas/)
|
|
|
|
IF(NOT CBLAS_LIBRARIES)
|
|
FIND_PACKAGE(BLAS)
|
|
INCLUDE(CheckFunctionExists)
|
|
SET(CMAKE_REQUIRED_LIBRARIES ${BLAS_LIBRARIES})
|
|
CHECK_FUNCTION_EXISTS(cblas_dgemm CBLAS_OK)
|
|
IF (CBLAS_OK)
|
|
SET(CBLAS_LIBRARIES ${BLAS_LIBRARIES})
|
|
ENDIF(CBLAS_OK)
|
|
ENDIF(NOT CBLAS_LIBRARIES)
|
|
|
|
|
|
INCLUDE(FindPackageHandleStandardArgs)
|
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CBLAS DEFAULT_MSG
|
|
CBLAS_LIBRARIES)
|
|
MARK_AS_ADVANCED(CBLAS_LIBRARIES)
|