Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
f4f8bff9
Commit
f4f8bff9
authored
Oct 08, 2020
by
Davis King
Browse files
fix cmake not finding openblas
parent
c45d166a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
dlib/cmake_utils/find_blas.cmake
dlib/cmake_utils/find_blas.cmake
+6
-6
No files found.
dlib/cmake_utils/find_blas.cmake
View file @
f4f8bff9
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment