summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/release/3.20.rst13
-rw-r--r--Modules/CMakeFortranCompilerId.F.in8
2 files changed, 16 insertions, 5 deletions
diff --git a/Help/release/3.20.rst b/Help/release/3.20.rst
index d274c26..f77304f 100644
--- a/Help/release/3.20.rst
+++ b/Help/release/3.20.rst
@@ -47,11 +47,7 @@ Compilers
* The ``icx``/``icpx`` C/C++ compilers on Linux, and the ``icx``
C/C++ compiler on Windows, are fully supported as of oneAPI 2021.1.
- * The ``ifx`` Fortran compiler on Linux is partially supported.
- As of oneAPI 2021.1, ``ifx`` does not define several identification
- macros, so CMake identifies it as the classic ``Intel`` compiler.
- This works in many cases because ``ifx`` accepts the same command line
- parameters as ``ifort``. A future version of oneAPI may fix this.
+ * The ``ifx`` Fortran compiler on Linux is supported as of oneAPI 2021.1.
* The ``ifx`` Fortran compiler on Windows is not yet supported.
@@ -359,3 +355,10 @@ Changes made since CMake 3.20.0 include the following.
as having major version 2021. CMake 3.20.1 and below were not aware of a
change to the identification macro version scheme made by Intel starting
in version 2021, and detected the version as 20.2.
+
+* The Intel oneAPI Fortran compiler is now identified as ``IntelLLVM``.
+ The oneAPI 2021.1 Fortran compiler is missing an identification macro,
+ so CMake 3.20.1 and below identified it as ``Intel``. CMake now has
+ a special case to recognize oneAPI 2021.1 Fortran as ``IntelLLVM``.
+ The oneAPI 2021.2 Fortran compiler defines the proper identification
+ macro and so is identified as ``IntelLLVM`` by all CMake 3.20 versions.
diff --git a/Modules/CMakeFortranCompilerId.F.in b/Modules/CMakeFortranCompilerId.F.in
index 143511b..7aa385e 100644
--- a/Modules/CMakeFortranCompilerId.F.in
+++ b/Modules/CMakeFortranCompilerId.F.in
@@ -36,6 +36,14 @@
# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100)
# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100)
# endif
+#elif defined(__INTEL_COMPILER) && __INTEL_COMPILER == 201900
+ PRINT *, 'INFO:compiler[IntelLLVM]'
+! ifx 2021.1 forgot to define __INTEL_LLVM_COMPILER.
+! Instead it defines __INTEL_COMPILER == 201900.
+# define COMPILER_VERSION_MAJOR DEC(2021)
+# define COMPILER_VERSION_MINOR DEC(1)
+# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
+# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
#elif defined(__INTEL_COMPILER) || defined(__ICC)
PRINT *, 'INFO:compiler[Intel]'
! __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later.