Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit eff2458

Browse files
Rectified fix for icpx error with benchmarks (#503)
Updated Wno-error fix for benchmarks with icpx to cover googlebench subdirectory
1 parent fbd2646 commit eff2458

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

benchmark/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,16 @@ endif()
5555
# set BENCHMARK_ENABLE_TESTING to OFF for google bench
5656
set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "" FORCE)
5757

58+
# update CXX_FLAGS to avoid error when building benchmarks
59+
# in case of icpx compiler:
60+
# Explicit comparison with NaN in fast floating point mode
61+
# [-Werror,-Wtautological-constant-compare]
62+
# https://github.com/dealii/dealii/issues/14693
63+
string(FIND ${CMAKE_CXX_COMPILER} "icpx" found_icpx)
64+
if(${found_icpx} GREATER -1)
65+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=tautological-constant-compare")
66+
endif()
67+
5868
add_subdirectory(${CMAKE_CURRENT_BINARY_DIR}/googlebench-src
5969
${CMAKE_CURRENT_BINARY_DIR}/googlebench-build
6070
EXCLUDE_FROM_ALL)

benchmark/portblas/CMakeLists.txt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,6 @@ if(BLAS_VERIFY_BENCHMARK)
2626
find_package(SystemBLAS REQUIRED)
2727
endif()
2828

29-
# update CXX_FLAGS to avoid error when building benchmarks
30-
# in case of icpx compiler:
31-
# explicit comparison with NaN in fast floating point mode [-Werror,-Wtautological-constant-compare]
32-
# https://github.com/dealii/dealii/issues/14693
33-
string(FIND ${CMAKE_CXX_COMPILER} "icpx" found_icpx)
34-
if(${found_icpx} GREATER -1)
35-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=tautological-constant-compare")
36-
endif()
37-
3829
set(sources
3930
# Level 1 blas
4031
blas1/axpy.cpp

0 commit comments

Comments
 (0)