FindLAPACK: MKL clean up and fix for windows
This commit is contained in:
parent
46c7bcaf96
commit
192a9182f8
|
@ -229,57 +229,61 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
|
||||||
else()
|
else()
|
||||||
find_package(Threads REQUIRED)
|
find_package(Threads REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(LAPACK_SEARCH_LIBS "")
|
||||||
|
|
||||||
if (BLA_F95)
|
if (BLA_F95)
|
||||||
if(NOT LAPACK95_LIBRARIES)
|
set(LAPACK_mkl_SEARCH_SYMBOL "CHEEV")
|
||||||
|
set(_LIBRARIES LAPACK95_LIBRARIES)
|
||||||
|
set(_BLAS_LIBRARIES ${BLAS95_LIBRARIES})
|
||||||
|
|
||||||
# old
|
# old
|
||||||
check_lapack_libraries(
|
list(APPEND LAPACK_SEARCH_LIBS
|
||||||
LAPACK95_LIBRARIES
|
"mkl_lapack95")
|
||||||
LAPACK
|
|
||||||
cheev
|
|
||||||
""
|
|
||||||
"mkl_lapack95"
|
|
||||||
"${BLAS95_LIBRARIES}"
|
|
||||||
"${CMAKE_THREAD_LIBS_INIT};${LM}"
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
if(NOT LAPACK95_LIBRARIES)
|
|
||||||
# new >= 10.3
|
# new >= 10.3
|
||||||
check_lapack_libraries(
|
list(APPEND LAPACK_SEARCH_LIBS
|
||||||
LAPACK95_LIBRARIES
|
"mkl_intel_c")
|
||||||
LAPACK
|
list(APPEND LAPACK_SEARCH_LIBS
|
||||||
CHEEV
|
"mkl_intel_lp64")
|
||||||
""
|
|
||||||
"mkl_intel_lp64"
|
|
||||||
"${BLAS95_LIBRARIES}"
|
|
||||||
"${CMAKE_THREAD_LIBS_INIT};${LM}"
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
else()
|
else()
|
||||||
if(NOT LAPACK_LIBRARIES)
|
set(LAPACK_mkl_SEARCH_SYMBOL "cheev")
|
||||||
|
set(_LIBRARIES LAPACK_LIBRARIES)
|
||||||
|
set(_BLAS_LIBRARIES ${BLAS_LIBRARIES})
|
||||||
|
|
||||||
# old
|
# old
|
||||||
check_lapack_libraries(
|
list(APPEND LAPACK_SEARCH_LIBS
|
||||||
LAPACK_LIBRARIES
|
"mkl_lapack")
|
||||||
LAPACK
|
|
||||||
cheev
|
|
||||||
""
|
|
||||||
"mkl_lapack"
|
|
||||||
"${BLAS_LIBRARIES}"
|
|
||||||
"${CMAKE_THREAD_LIBS_INIT};${LM}"
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
if(NOT LAPACK_LIBRARIES)
|
|
||||||
# new >= 10.3
|
# new >= 10.3
|
||||||
|
list(APPEND LAPACK_SEARCH_LIBS
|
||||||
|
"mkl_gf_lp64")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# First try empty lapack libs
|
||||||
|
if (NOT ${_LIBRARIES})
|
||||||
check_lapack_libraries(
|
check_lapack_libraries(
|
||||||
LAPACK_LIBRARIES
|
${_LIBRARIES}
|
||||||
LAPACK
|
BLAS
|
||||||
cheev
|
${LAPACK_mkl_SEARCH_SYMBOL}
|
||||||
""
|
""
|
||||||
"mkl_gf_lp64"
|
""
|
||||||
"${BLAS_LIBRARIES}"
|
"${_BLAS_LIBRARIES}"
|
||||||
"${CMAKE_THREAD_LIBS_INIT};${LM}"
|
"${CMAKE_THREAD_LIBS_INIT};${LM}"
|
||||||
)
|
)
|
||||||
endif ()
|
endif ()
|
||||||
|
# Then try the search libs
|
||||||
|
foreach (IT ${LAPACK_SEARCH_LIBS})
|
||||||
|
if (NOT ${_LIBRARIES})
|
||||||
|
check_lapack_libraries(
|
||||||
|
${_LIBRARIES}
|
||||||
|
BLAS
|
||||||
|
${LAPACK_mkl_SEARCH_SYMBOL}
|
||||||
|
""
|
||||||
|
"${IT}"
|
||||||
|
"${_BLAS_LIBRARIES}"
|
||||||
|
"${CMAKE_THREAD_LIBS_INIT};${LM}"
|
||||||
|
)
|
||||||
endif ()
|
endif ()
|
||||||
|
endforeach ()
|
||||||
endif ()
|
endif ()
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
|
|
Loading…
Reference in New Issue