From 672a700b90a1edbd9edd796cdd60aec5fac9e62a Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Wed, 29 May 2024 17:33:39 +0200 Subject: [PATCH] Fix MKL try_compile build directory --- CMakeLists.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c8ee76ad00..afa2e5adb2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,13 +55,16 @@ option(DLAF_WITH_SCALAPACK "Build ScaLAPACK-like C API (requires ScaLAPACK)" OFF unset(DLAF_WITH_MKL_TRY_COMPILE CACHE) try_compile( - DLAF_WITH_MKL_TRY_COMPILE "${PROJECT_SOURCE_DIR}/cmake/tests" + DLAF_WITH_MKL_TRY_COMPILE "${PROJECT_BINARY_DIR}/cmake/tests" "${PROJECT_SOURCE_DIR}/cmake/tests/mkl_set_num_threads.cpp" CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=${LAPACK_INCLUDE_DIR}" LINK_LIBRARIES ${LAPACK_LIBRARY} ) -# TODO: Maybe don't need to print this? Though maybe it's nice to have... -message(WARNING "DLAF_WITH_MKL_TRY_COMPILE=${DLAF_WITH_MKL_TRY_COMPILE}") +if(DLAF_WITH_MKL_TRY_COMPILE) + message(STATUS "Intel MKL detection: Found") +else() + message(STATUS "Intel MKL detection: Not found") +endif() option(DLAF_WITH_MKL "Enable MKL as provider for BLAS and LAPACK" "${DLAF_WITH_MKL_TRY_COMPILE}") if(DLAF_WITH_MKL)