From 25d3d23b5577449b17eec653046755825e4b1989 Mon Sep 17 00:00:00 2001 From: Ouadie EL FAROUKI Date: Mon, 19 Feb 2024 12:50:04 +0000 Subject: [PATCH] minor cmake fix for header only use-case (oneMKL in particular) --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c69888bb7..0b0143e64 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -109,7 +109,8 @@ option(BLAS_ENABLE_EXTENSIONS "Whether to enable portBLAS extensions" ON) option(BLAS_ENABLE_COMPLEX "Whether to enable complex data type for GEMM" OFF) option(BLAS_ENABLE_HALF "Whether to enable sycl::half data type for supported operators" OFF) -if(${TUNING_TARGET} STREQUAL "DEFAULT_CPU") +if(((NOT INSTALL_HEADER_ONLY) AND (TUNING_TARGET STREQUAL "DEFAULT_CPU")) + OR (INSTALL_HEADER_ONLY AND (NOT TUNING_TARGET))) set(BLAS_ENABLE_HALF OFF) message(STATUS "FP16 operations are not supported for CPU targets. BLAS_ENABLE_HALF is disabled") endif()