From 2f149cb0da0e2be47987e0fda265059c24128366 Mon Sep 17 00:00:00 2001 From: Muhammad Tanvir Date: Tue, 27 Feb 2024 16:41:16 +0000 Subject: [PATCH] FIx error when building with oneAPI release compiler (#497) --- benchmark/portblas/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/benchmark/portblas/CMakeLists.txt b/benchmark/portblas/CMakeLists.txt index daaeb4674..f309286b3 100644 --- a/benchmark/portblas/CMakeLists.txt +++ b/benchmark/portblas/CMakeLists.txt @@ -26,6 +26,15 @@ if(BLAS_VERIFY_BENCHMARK) find_package(SystemBLAS REQUIRED) endif() +# update CXX_FLAGS to avoid error when building benchmarks +# in case of icpx compiler: +# explicit comparison with NaN in fast floating point mode [-Werror,-Wtautological-constant-compare] +# https://github.com/dealii/dealii/issues/14693 +string(FIND ${CMAKE_CXX_COMPILER} "icpx" found_icpx) +if(${found_icpx} GREATER -1) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=tautological-constant-compare") +endif() + set(sources # Level 1 blas blas1/axpy.cpp