diff --git a/cmake/Modules/FindTPLMKL.cmake b/cmake/Modules/FindTPLMKL.cmake index 52f4571976..4e768b4413 100644 --- a/cmake/Modules/FindTPLMKL.cmake +++ b/cmake/Modules/FindTPLMKL.cmake @@ -18,6 +18,7 @@ IF(TARGET MKL::MKL) ADD_LIBRARY(KokkosKernels::MKL ALIAS MKL ) GET_TARGET_PROPERTY(LIB_TYPE ${TPL_IMPORTED_NAME} TYPE) MESSAGE("LIB_TYPE: ${LIB_TYPE}") + SET(BLAS_LIBRARIES MKL::MKL) # kokkoskernels_export_imported_tpl install MKL with target name MKL instead of # MKL::MKL or KokkosKernels::MKL, so we need to install a specific ALIAS one if(TARGET MKL) @@ -33,6 +34,8 @@ ELSEIF (CMAKE_CXX_COMPILER_ID STREQUAL "Intel") KOKKOSKERNELS_CREATE_IMPORTED_TPL(MKL INTERFACE COMPILE_OPTIONS -mkl LINK_OPTIONS -mkl) INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(TPLMKL DEFAULT_MSG KOKKOSKERNELS_HAS_MKL_ARG) + # TODO: @masterleinad: "That didn't work for me. We were missing a library search path." + SET(BLAS_LIBRARIES "mkl") ELSEIF(WIN32) SET(BLA_VENDOR Intel10_64lp) FIND_PACKAGE(BLAS REQUIRED) @@ -72,5 +75,6 @@ ELSE() HEADER_PATHS ${MKL_ROOT}/include ) + SET(BLAS_LIBRARIES "mkl_intel_lp64;mkl_intel_thread;mkl_core;iomp5") ENDIF() ENDIF()