Skip to content

Commit 1158c14

Browse files
authored
stick to strict floating model with intel compilers (#2927)
1 parent eae28f7 commit 1158c14

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,12 @@ if(NOT CMAKE_BUILD_TYPE)
140140
add_compile_options(-O3 -g)
141141
endif()
142142

143+
# stick to strict floating point model on Intel Compiler
144+
if (("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") OR
145+
("${CMAKE_CXX_COMPILER_ID}" STREQUAL "IntelLLVM"))
146+
add_compile_options(-fp-model=strict)
147+
endif()
148+
143149
# Force turn off USE_ABACUS_LIBM on Intel Compiler
144150
if (("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") OR
145151
("${CMAKE_CXX_COMPILER_ID}" STREQUAL "IntelLLVM"))

0 commit comments

Comments
 (0)