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
1ef4260e
Commit
1ef4260e
authored
Dec 21, 2012
by
Davis King
Browse files
Updated cmake file so it can find the new version of the Intel MKL on linux.
parent
ceb71d96
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
dlib/cmake_find_blas.txt
dlib/cmake_find_blas.txt
+15
-8
No files found.
dlib/cmake_find_blas.txt
View file @
1ef4260e
...
@@ -29,12 +29,16 @@ if (UNIX)
...
@@ -29,12 +29,16 @@ if (UNIX)
if (SIZE_OF_VOID_PTR EQUAL 8)
if (SIZE_OF_VOID_PTR EQUAL 8)
set( mkl_search_path
set( mkl_search_path
/opt/intel/mkl/*/lib/em64t
/opt/intel/mkl/*/lib/em64t
/opt/intel/mkl/lib/intel64
/opt/intel/lib/intel64
)
)
find_library(mkl_intel mkl_intel_lp64 ${mkl_search_path})
find_library(mkl_intel mkl_intel_lp64 ${mkl_search_path})
else()
else()
set( mkl_search_path
set( mkl_search_path
/opt/intel/mkl/*/lib/32
/opt/intel/mkl/*/lib/32
/opt/intel/mkl/lib/ia32
/opt/intel/lib/ia32
)
)
find_library(mkl_intel mkl_intel ${mkl_search_path})
find_library(mkl_intel mkl_intel ${mkl_search_path})
...
@@ -45,21 +49,22 @@ if (UNIX)
...
@@ -45,21 +49,22 @@ if (UNIX)
# Search for the needed libraries from the MKL
# Search for the needed libraries from the MKL
find_library(mkl_core mkl_core ${mkl_search_path})
find_library(mkl_core mkl_core ${mkl_search_path})
find_library(mkl_thread mkl_intel_thread ${mkl_search_path})
find_library(mkl_thread mkl_intel_thread ${mkl_search_path})
find_library(mkl_io iomp5 ${mkl_search_path})
find_library(mkl_io
mp
iomp5 ${mkl_search_path})
#MKL also needs pthreads so search for that as well
#MKL also needs pthreads so search for that as well
find_library(mkl_pthread pthread ${mkl_search_path})
find_library(mkl_pthread pthread ${mkl_search_path})
mark_as_advanced( mkl_intel mkl_core mkl_thread mkl_io mkl_pthread)
mark_as_advanced( mkl_intel mkl_core mkl_thread mkl_io
mp
mkl_pthread)
# if we found the MKL
# if we found the MKL
#if (mkl_mkl AND mkl_core AND mkl_guide AND mkl_pthread)
#if (mkl_mkl AND mkl_core AND mkl_guide AND mkl_pthread)
if (mkl_intel AND mkl_core AND mkl_thread AND mkl_io AND mkl_pthread)
if (mkl_intel AND mkl_core AND mkl_thread AND mkl_io
mp
AND mkl_pthread)
set(blas_libraries ${mkl_intel} ${mkl_core} ${mkl_thread} ${mkl_io} ${mkl_pthread})
set(blas_libraries ${mkl_intel} ${mkl_core} ${mkl_thread} ${mkl_io
mp
} ${mkl_pthread})
set(lapack_libraries ${mkl_intel} ${mkl_core} ${mkl_thread} ${mkl_io} ${mkl_pthread})
set(lapack_libraries ${mkl_intel} ${mkl_core} ${mkl_thread} ${mkl_io
mp
} ${mkl_pthread})
set(blas_found 1)
set(blas_found 1)
set(lapack_found 1)
set(lapack_found 1)
set(found_intel_mkl 1)
message(STATUS "Found Intel MKL BLAS/LAPACK library")
message(STATUS "Found Intel MKL BLAS/LAPACK library")
endif()
endif()
...
@@ -117,8 +122,10 @@ if (UNIX)
...
@@ -117,8 +122,10 @@ if (UNIX)
# Make sure we really found a CBLAS library. That is, it needs to expose
# Make sure we really found a CBLAS library. That is, it needs to expose
# the proper cblas link symbols. So here we test if one of them is present
# the proper cblas link symbols. So here we test if one of them is present
# and assume everything is good if it is.
# and assume everything is good if it is. Note that we don't do this check if
if (blas_found)
# we found the Intel MKL since for some reason CHECK_FUNCTION_EXISTS doesn't work
# with it. But it's fine since the MKL should always have cblas.
if (blas_found AND NOT found_intel_mkl)
INCLUDE (CheckFunctionExists)
INCLUDE (CheckFunctionExists)
set(CMAKE_REQUIRED_LIBRARIES ${blas_libraries})
set(CMAKE_REQUIRED_LIBRARIES ${blas_libraries})
CHECK_FUNCTION_EXISTS(cblas_ddot HAVE_CBLAS)
CHECK_FUNCTION_EXISTS(cblas_ddot HAVE_CBLAS)
...
...
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