Skip to content

Commit

Permalink
Fix bad logic that prevented -fp-model=precise from being used. (#1140)
Browse files Browse the repository at this point in the history
  • Loading branch information
KineticTheory authored Sep 28, 2021
1 parent 54ca36d commit f1fd1b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config/unix-clang.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ if(NOT CXX_FLAGS_INITIALIZED)

# OneAPI on trinitite reports itself as "LLVM" and parses this file. The Intel optimizer needs
# these options to maintain IEEE 754 compliance.
if(CMAKE_CXX_COMPILER_WRAPPER STREQUAL CrayPrgEnv AND INTEL_COMPILER_TYPE STREQUAL "ONEAPI")
if(DEFINED CMAKE_CXX_COMPILER_WRAPPER AND CMAKE_CXX_COMPILER_WRAPPER STREQUAL CrayPrgEnv AND
DEFINED ENV{INTEL_COMPILER_TYPE} AND "$ENV{INTEL_COMPILER_TYPE}" STREQUAL "ONEAPI")
string(APPEND CMAKE_C_FLAGS_RELEASE " -fp-model=precise")
string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO " -fp-model=precise")
endif()
Expand Down

0 comments on commit f1fd1b4

Please sign in to comment.