Skip to content

Commit

Permalink
stick to strict floating model with intel compilers (#2927)
Browse files Browse the repository at this point in the history
  • Loading branch information
jinzx10 authored Sep 11, 2023
1 parent eae28f7 commit 1158c14
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ if(NOT CMAKE_BUILD_TYPE)
add_compile_options(-O3 -g)
endif()

# stick to strict floating point model on Intel Compiler
if (("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") OR
("${CMAKE_CXX_COMPILER_ID}" STREQUAL "IntelLLVM"))
add_compile_options(-fp-model=strict)
endif()

# Force turn off USE_ABACUS_LIBM on Intel Compiler
if (("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") OR
("${CMAKE_CXX_COMPILER_ID}" STREQUAL "IntelLLVM"))
Expand Down

0 comments on commit 1158c14

Please sign in to comment.