Skip to content

Commit

Permalink
Merge pull request #4718 from martin-frbg/issue4713
Browse files Browse the repository at this point in the history
Override Intel icx's default fp-model to ensure correct handling on NaNs
  • Loading branch information
martin-frbg authored May 26, 2024
2 parents 3833190 + 8b4996a commit 834e633
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile.x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ endif
endif
endif

ifeq ($(C_COMPILER), CLANG)
ifeq ($(findstring icx,$(CC)),icx)
CCOMMON_OPT += -fp-model=consistent
endif
endif

ifneq ($(DYNAMIC_ARCH),1)
ADD_CPUFLAGS = 1
Expand Down
4 changes: 4 additions & 0 deletions cmake/cc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
## Sets C related variables.
include(CheckCCompilerFlag)

if (${CMAKE_C_COMPILER_ID} MATCHES "IntelLLVM")
set(CCOMMON_OPT "${CCOMMON_OPT} -fp-model=consistent")
endif ()

if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU" OR ${CMAKE_C_COMPILER_ID} STREQUAL "LSB" OR ${CMAKE_C_COMPILER_ID} MATCHES "Clang")
set(CCOMMON_OPT "${CCOMMON_OPT} -Wall")
set(COMMON_PROF "${COMMON_PROF} -fno-inline")
Expand Down

0 comments on commit 834e633

Please sign in to comment.