Skip to content

Commit

Permalink
Rectified fix for icpx error with benchmarks (#503)
Browse files Browse the repository at this point in the history
Updated Wno-error fix for benchmarks with icpx to cover googlebench subdirectory
OuadiElfarouki authored Mar 4, 2024
1 parent fbd2646 commit eff2458
Showing 2 changed files with 10 additions and 9 deletions.
10 changes: 10 additions & 0 deletions benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -55,6 +55,16 @@ endif()
# set BENCHMARK_ENABLE_TESTING to OFF for google bench
set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "" FORCE)

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

add_subdirectory(${CMAKE_CURRENT_BINARY_DIR}/googlebench-src
${CMAKE_CURRENT_BINARY_DIR}/googlebench-build
EXCLUDE_FROM_ALL)
9 changes: 0 additions & 9 deletions benchmark/portblas/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -26,15 +26,6 @@ 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

0 comments on commit eff2458

Please sign in to comment.