Skip to content

Commit

Permalink
Add compile flag -fno-finite-math-only for Intel LLVM compiler (icx, …
Browse files Browse the repository at this point in the history
…icpx)
  • Loading branch information
wdeconinck committed Nov 22, 2023
1 parent 99207ce commit 93082b9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cmake/atlas_compile_flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,11 @@ endif()
if( CMAKE_CXX_COMPILER_ID MATCHES NVHPC )
ecbuild_add_cxx_flags("--diag_suppress declared_but_not_referenced --display_error_number" NAME atlas_cxx_disable_warnings )
# For all the variables with side effects (constructor/dectructor functionality)
endif()
endif()

if( CMAKE_CXX_COMPILER_ID MATCHES IntelLLVM )
# Turn off -ffinite-math-only which gets included by some optimisation levels which assumes values can never be NaN.
# Then results in std::isnan(value) always retrun false.
ecbuild_add_cxx_flags("-fno-finite-math-only")
endif()

0 comments on commit 93082b9

Please sign in to comment.