Fix detection of Intel ifx and apply -fp-model option to it

This commit is contained in:
Martin Kroeker 2024-06-14 23:58:45 +02:00 committed by GitHub
parent 21c0f769ef
commit d25ee4d0f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -117,12 +117,12 @@ if (${F_COMPILER} STREQUAL "GFORTRAN" OR ${F_COMPILER} STREQUAL "F95" OR CMAKE_F
endif () endif ()
endif () endif ()
if (${F_COMPILER} STREQUAL "INTEL") if (${F_COMPILER} STREQUAL "INTEL" OR CMAKE_Fortran_COMPILER_ID MATCHES "Intel")
set(CCOMMON_OPT "${CCOMMON_OPT} -DF_INTERFACE_INTEL") set(CCOMMON_OPT "${CCOMMON_OPT} -DF_INTERFACE_INTEL")
if (INTERFACE64) if (INTERFACE64)
set(FCOMMON_OPT "${FCOMMON_OPT} -i8") set(FCOMMON_OPT "${FCOMMON_OPT} -i8")
endif () endif ()
set(FCOMMON_OPT "${FCOMMON_OPT} -recursive") set(FCOMMON_OPT "${FCOMMON_OPT} -recursive -fp-model=consistent")
if (USE_OPENMP) if (USE_OPENMP)
set(FCOMMON_OPT "${FCOMMON_OPT} -openmp") set(FCOMMON_OPT "${FCOMMON_OPT} -openmp")
endif () endif ()