diff --git a/CMakeLists.txt b/CMakeLists.txt index ab42e99e93..c9f3239159 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,7 +34,8 @@ endif() option(BUILD_SHARED_LIBS "Build shared libraries." ON) option(DLAF_WITH_OPENMP "${DLAF_WITH_OPENMP_DESCRIPTION}" ${DLAF_WITH_OPENMP_DEFAULT}) -option(DLAF_WITH_MKL "Enable MKL as provider for LAPACK" OFF) +option(DLAF_WITH_MKL "Enable oneMKL as provider for LAPACK" OFF) +option(DLAF_WITH_MKL_LEGACY "Enable MKL as provider for LAPACK" OFF) option(DLAF_WITH_CUDA "Enable CUDA support" OFF) option(DLAF_WITH_HIP "Enable HIP support" OFF) cmake_dependent_option(DLAF_WITH_CUDA_MPI_RDMA "Enable MPI CUDA RDMA" OFF "DLAF_WITH_CUDA" OFF) @@ -48,7 +49,11 @@ option(DLAF_BUILD_DOC "Build documentation" OFF) option(DLAF_WITH_PRECOMPILED_HEADERS "Use precompiled headers." OFF) option(DLAF_WITH_SCALAPACK "Build ScaLAPACK-like C API (requires ScaLAPACK)" OFF) -if(DLAF_WITH_MKL) +if(DLAF_WITH_MKL AND DLAF_WITH_MKL_LEGACY) + message(SEND_ERROR "DLAF_WITH_MKL and DLAF_WITH_MKL_LEGACY are mutually exclusive.") +endif() + +if(DLAF_WITH_MKL OR DLAF_WITH_MKL_LEGACY) # When using MKL there is no need to set the number of threads with # omp_set_num_threads; it's sufficient to use MKL's own mechanisms. set(DLAF_WITH_OPENMP OFF CACHE BOOL "${DLAF_WITH_OPENMP_DESCRIPTION}" FORCE) diff --git a/cmake/template/DLAFConfig.cmake.in b/cmake/template/DLAFConfig.cmake.in index 5101a3e0ed..0269dae4ef 100644 --- a/cmake/template/DLAFConfig.cmake.in +++ b/cmake/template/DLAFConfig.cmake.in @@ -20,6 +20,7 @@ list(PREPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) # ===== VARIABLES set(DLAF_WITH_OPENMP @DLAF_WITH_OPENMP@) set(DLAF_WITH_MKL @DLAF_WITH_MKL@) +set(DLAF_WITH_MKL @DLAF_WITH_MKL_LEGACY@) set(DLAF_WITH_CUDA @DLAF_WITH_CUDA@) set(DLAF_WITH_HIP @DLAF_WITH_HIP@) set(DLAF_WITH_GPU @DLAF_WITH_GPU@)