Only try to find iomp if we have really found the IntelMKL

This commit is contained in:
Davis King 2022-08-01 08:27:15 -04:00
parent 4867898c59
commit 89d573645b

View File

@ -381,10 +381,12 @@ elseif(WIN32 AND NOT MINGW)
list(APPEND mkl_libs ${mkl_sequential}) list(APPEND mkl_libs ${mkl_sequential})
else() else()
find_library(mkl_thread mkl_intel_thread ${mkl_search_path}) find_library(mkl_thread mkl_intel_thread ${mkl_search_path})
mark_as_advanced(mkl_thread)
if (mkl_thread)
find_library(mkl_iomp libiomp5md ${mkl_search_path}) find_library(mkl_iomp libiomp5md ${mkl_search_path})
mark_as_advanced(mkl_thread mkl_iomp) mark_as_advanced(mkl_iomp)
list(APPEND mkl_libs ${mkl_thread} ${mkl_iomp}) list(APPEND mkl_libs ${mkl_thread} ${mkl_iomp})
if (mkl_iomp)
# See if we can find the dll that goes with this, so we can copy it to # See if we can find the dll that goes with this, so we can copy it to
# the output folder, since a very large number of windows users don't # the output folder, since a very large number of windows users don't
# understand that they need to add the Intel MKL's folders to their # understand that they need to add the Intel MKL's folders to their