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()