diff --git a/Makefile.x86_64 b/Makefile.x86_64 index c0dbe84c8b..e9831327fe 100644 --- a/Makefile.x86_64 +++ b/Makefile.x86_64 @@ -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 diff --git a/cmake/cc.cmake b/cmake/cc.cmake index a162986f85..9dce9ea35a 100644 --- a/cmake/cc.cmake +++ b/cmake/cc.cmake @@ -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")