Commit 916b159a authored by Davis King's avatar Davis King

Improved the way we link to the Intel MKL. Now it will link

right against newer versions.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403870
parent e7e0d43b
...@@ -28,29 +28,34 @@ if (UNIX) ...@@ -28,29 +28,34 @@ if (UNIX)
set( mkl_search_path set( mkl_search_path
/opt/intel/mkl/*/lib/em64t /opt/intel/mkl/*/lib/em64t
) )
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
) )
find_library(mkl_intel mkl_intel ${mkl_search_path})
endif() endif()
include(CheckLibraryExists) include(CheckLibraryExists)
# Search for the needed libraries from the MKL # Search for the needed libraries from the MKL
find_library(mkl_mkl mkl ${mkl_search_path})
find_library(mkl_core mkl_core ${mkl_search_path}) find_library(mkl_core mkl_core ${mkl_search_path})
find_library(mkl_guide guide ${mkl_search_path}) find_library(mkl_thread mkl_intel_thread ${mkl_search_path})
find_library(mkl_io 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_mkl mkl_core mkl_guide mkl_pthread) mark_as_advanced( mkl_intel mkl_core mkl_thread mkl_io 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)
set(blas_libraries ${mkl_mkl} ${mkl_core} ${mkl_guide} ${mkl_pthread}) if (mkl_intel AND mkl_core AND mkl_thread AND mkl_io AND mkl_pthread)
set(lapack_libraries ${mkl_mkl} ${mkl_core} ${mkl_guide} ${mkl_pthread}) set(blas_libraries ${mkl_intel} ${mkl_core} ${mkl_thread} ${mkl_io} ${mkl_pthread})
set(lapack_libraries ${mkl_intel} ${mkl_core} ${mkl_thread} ${mkl_io} ${mkl_pthread})
set(blas_found 1) set(blas_found 1)
set(lapack_found 1) set(lapack_found 1)
message(STATUS "Found Intel MKL BLAS/LAPACK library") message(STATUS "Found Intel MKL BLAS/LAPACK library")
......
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