Better way of finding OpenBLAS

This commit is contained in:
Tadas Baltrusaitis
2018-06-22 19:40:37 +01:00
parent 079c282074
commit c4372d10bc
2 changed files with 3 additions and 12 deletions

View File

@@ -150,7 +150,6 @@ find_package(dlib 19.13)
if(${dlib_FOUND})
message("dlib information:")
message(" dlib version: ${dlib_VERSION}")
message(" dlib_INCLUDE_DIRS: ${dlib_INCLUDE_DIRS}")
if (NOT TARGET dlib)
add_library(dlib INTERFACE IMPORTED GLOBAL)

View File

@@ -75,26 +75,18 @@ SET(Open_BLAS_LIB_SEARCH_PATHS
/usr/local/opt/openblas/lib
)
FIND_PATH(OpenBLAS_INCLUDE_DIR NAMES cblas.h PATHS ${Open_BLAS_INCLUDE_SEARCH_PATHS} NO_DEFAULT_PATH)
FIND_PATH(OpenBLAS_INCLUDE_DIR_F NAMES f77blas.h PATHS ${Open_BLAS_INCLUDE_SEARCH_PATHS} NO_DEFAULT_PATH)
FIND_PATH(OpenBLAS_INCLUDE_DIR NAMES openblas_config.h PATHS ${Open_BLAS_INCLUDE_SEARCH_PATHS} NO_DEFAULT_PATH)
FIND_LIBRARY(OpenBLAS_LIB NAMES openblas PATHS ${Open_BLAS_LIB_SEARCH_PATHS} NO_DEFAULT_PATH)
SET(OpenBLAS_FOUND ON)
# Check include files
# Check include files
IF(NOT OpenBLAS_INCLUDE_DIR)
SET(OpenBLAS_FOUND OFF)
MESSAGE(STATUS "Could not find OpenBLAS include. Turning OpenBLAS_FOUND off")
ENDIF()
# Check include files
IF(NOT OpenBLAS_INCLUDE_DIR_F)
MESSAGE(STATUS "Could not find f77blas include.")
ELSE(NOT OpenBLAS_INCLUDE_DIR_F)
MESSAGE(STATUS "Found f77blas include: ${OpenBLAS_INCLUDE_DIR_F}")
ENDIF()
# Check libraries
# Check libraries
IF(NOT OpenBLAS_LIB)
SET(OpenBLAS_FOUND OFF)
MESSAGE(STATUS "Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off")