Commit f4f8bff9 authored by Davis King's avatar Davis King
Browse files

fix cmake not finding openblas

parent c45d166a
...@@ -70,8 +70,8 @@ if (UNIX OR MINGW) ...@@ -70,8 +70,8 @@ if (UNIX OR MINGW)
pkg_check_modules(LAPACK_REFERENCE lapack) pkg_check_modules(LAPACK_REFERENCE lapack)
# Make sure the cblas found by pkgconfig actually has cblas symbols. # Make sure the cblas found by pkgconfig actually has cblas symbols.
SET(CMAKE_REQUIRED_LIBRARIES "${BLAS_REFERENCE_LDFLAGS}") SET(CMAKE_REQUIRED_LIBRARIES "${BLAS_REFERENCE_LDFLAGS}")
CHECK_FUNCTION_EXISTS(cblas_ddot HAVE_CBLAS) CHECK_FUNCTION_EXISTS(cblas_ddot PKGCFG_HAVE_CBLAS)
if (BLAS_REFERENCE_FOUND AND LAPACK_REFERENCE_FOUND AND HAVE_CBLAS) if (BLAS_REFERENCE_FOUND AND LAPACK_REFERENCE_FOUND AND PKGCFG_HAVE_CBLAS)
set(blas_libraries "${BLAS_REFERENCE_LDFLAGS}") set(blas_libraries "${BLAS_REFERENCE_LDFLAGS}")
set(lapack_libraries "${LAPACK_REFERENCE_LDFLAGS}") set(lapack_libraries "${LAPACK_REFERENCE_LDFLAGS}")
set(blas_found 1) set(blas_found 1)
...@@ -283,8 +283,8 @@ if (UNIX OR MINGW) ...@@ -283,8 +283,8 @@ if (UNIX OR MINGW)
# with it. But it's fine since the MKL should always have cblas. # with it. But it's fine since the MKL should always have cblas.
if (blas_found AND NOT found_intel_mkl) if (blas_found AND NOT found_intel_mkl)
set(CMAKE_REQUIRED_LIBRARIES ${blas_libraries}) set(CMAKE_REQUIRED_LIBRARIES ${blas_libraries})
CHECK_FUNCTION_EXISTS(cblas_ddot HAVE_CBLAS) CHECK_FUNCTION_EXISTS(cblas_ddot FOUND_BLAS_HAS_CBLAS)
if (NOT HAVE_CBLAS) if (NOT FOUND_BLAS_HAS_CBLAS)
message(STATUS "BLAS library does not have cblas symbols, so dlib will not use BLAS or LAPACK") message(STATUS "BLAS library does not have cblas symbols, so dlib will not use BLAS or LAPACK")
set(blas_found 0) set(blas_found 0)
set(lapack_found 0) set(lapack_found 0)
...@@ -400,8 +400,8 @@ elseif(WIN32 AND NOT MINGW) ...@@ -400,8 +400,8 @@ elseif(WIN32 AND NOT MINGW)
# the compiler we are using. One way to do this check is to see if we can # the compiler we are using. One way to do this check is to see if we can
# link to it right now. # link to it right now.
set(CMAKE_REQUIRED_LIBRARIES ${blas_libraries}) set(CMAKE_REQUIRED_LIBRARIES ${blas_libraries})
CHECK_FUNCTION_EXISTS(cblas_ddot HAVE_CBLAS) CHECK_FUNCTION_EXISTS(cblas_ddot MKL_HAS_CBLAS)
if (NOT HAVE_CBLAS) if (NOT MKL_HAS_CBLAS)
message("BLAS library does not have cblas symbols, so dlib will not use BLAS or LAPACK") message("BLAS library does not have cblas symbols, so dlib will not use BLAS or LAPACK")
set(blas_found 0) set(blas_found 0)
set(lapack_found 0) set(lapack_found 0)
......
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