From 36bd0bb5132686fb8bc4be3f124a59d3e69cc462 Mon Sep 17 00:00:00 2001 From: "Cui, Yifeng" Date: Thu, 15 Aug 2024 06:15:43 -0700 Subject: [PATCH] Fix linkage on Windows --- cmake/Modules/FindONEMKL.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/Modules/FindONEMKL.cmake b/cmake/Modules/FindONEMKL.cmake index 1a68a08e6..fe3badc1e 100644 --- a/cmake/Modules/FindONEMKL.cmake +++ b/cmake/Modules/FindONEMKL.cmake @@ -50,7 +50,11 @@ endif() set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "${ONEMKL_INCLUDE_DIR}") set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "${ONEMKL_LIB_DIR}") -set(MKL_LIB_NAMES "mkl_intel_lp64" "mkl_gnu_thread" "mkl_core" "mkl_sycl_dft") +if(WIN32) + set(MKL_LIB_NAMES "mkl_intel_lp64" "mkl_intel_thread" "mkl_core" "mkl_sycl") +else() + set(MKL_LIB_NAMES "mkl_intel_lp64" "mkl_gnu_thread" "mkl_core" "mkl_sycl_dft") +endif() foreach(LIB_NAME IN LISTS MKL_LIB_NAMES) find_library(