From 7d6ac409ae4904952fd600f91ec66b20a8ed37d6 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Wed, 13 Nov 2024 04:53:11 -0800 Subject: [PATCH] minor fix for cmake vars --- cmake/templates/oneDALConfig.cmake.in | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/cmake/templates/oneDALConfig.cmake.in b/cmake/templates/oneDALConfig.cmake.in index 34b9a815581..bd003eae05b 100644 --- a/cmake/templates/oneDALConfig.cmake.in +++ b/cmake/templates/oneDALConfig.cmake.in @@ -64,22 +64,22 @@ if(NOT DEFINED ONEDAL_SET_TBB_MANUALLY AND DEFINED SET_TBB_MANUALLY) endif() if ("${REF_BACKEND}" STREQUAL "" OR "${REF_BACKEND}" STREQUAL "OFF") - set(MATH_BACKEND "mkl" CACHE STRING "Backend math library" FORCE) + set(MATH_BACKEND "mkl") elseif ("${REF_BACKEND}" STREQUAL "ON") - set(MATH_BACKEND "ref" CACHE STRING "Backend math library" FORCE) + set(MATH_BACKEND "ref") elseif (NOT "${REF_BACKEND}" STREQUAL "OFF" AND NOT "${REF_BACKEND}" STREQUAL "ON") message(FATAL_ERROR "REF_BACKEND must be 'ON' or 'OFF'") endif() if ("${ONEDAL_LINK}" STREQUAL "" OR "${ONEDAL_LINK}" STREQUAL "dynamic") set(ONEDAL_LINK "dynamic") - set(MKL_DEPENDENCY "no" CACHE STRING "MKL_DEPENDENCY math library" FORCE) + set(MKL_DEPENDENCY "no") elseif ("${ONEDAL_LINK}" STREQUAL "static") set(ONEDAL_LINK "static") if("${MATH_BACKEND}" STREQUAL "mkl") - set(MKL_DEPENDENCY "yes" CACHE STRING "MKL_DEPENDENCY math library" FORCE) + set(MKL_DEPENDENCY "yes") elseif("${MATH_BACKEND}" STREQUAL "ref") - set(MKL_DEPENDENCY "no" CACHE STRING "MKL_DEPENDENCY math library" FORCE) + set(MKL_DEPENDENCY "no") endif() elseif (NOT "${ONEDAL_LINK}" STREQUAL "static" AND NOT "${ONEDAL_LINK}" STREQUAL "dynamic") message(FATAL_ERROR "ONEDAL_LINK must be 'static' or 'dynamic'") @@ -138,16 +138,12 @@ elseif (@VERSIONS_SET@ STREQUAL "FALSE") endif() if(MKL_DEPENDENCY STREQUAL "yes") - set(MKL_THREADING "tbb_thread" CACHE STRING "Threading type for MKL" FORCE) - set(MKL_SYCL_LINK "static" CACHE STRING "SYCL Link type for MKL" FORCE) - set(MKL_LINK "static" CACHE STRING "Link type for MKL" FORCE) - set(MKL_SYCL_INTERFACE_FULL "intel_ilp64" CACHE STRING "Link type for MKL" FORCE) - set(MKL_INTERFACE_FULL "intel_ilp64" CACHE STRING "Link type for MKL" FORCE) + set(MKL_THREADING "tbb_thread") + set(MKL_SYCL_LINK "static") + set(MKL_LINK "static") + set(MKL_SYCL_INTERFACE_FULL "intel_ilp64") + set(MKL_INTERFACE_FULL "intel_ilp64") find_package(MKL REQUIRED MKL::MKL_SYCL) - message(STATUS "MKL dependencies are enabled") - message(STATUS "MKL_THREADING: ${MKL_THREADING}") - message(STATUS "MKL_SYCL_LINK: ${MKL_SYCL_LINK}") - message(STATUS "MKL_LINK: ${MKL_LINK}") endif() if (ONEDAL_USE_DPCPP STREQUAL "yes" AND ONEDAL_INTERFACE STREQUAL "no")