summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeFortranCompilerId.F.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-04-27 16:58:24 (GMT)
committerBrad King <brad.king@kitware.com>2021-04-28 14:21:27 (GMT)
commit9c479c7c40c64d0fbe41cba1b422303989c306f7 (patch)
treeccf45dc9889207d5c7c98fa57156fe62fa18e34b /Modules/CMakeFortranCompilerId.F.in
parentb7193ab18f74a3b6eb6c24bac31384863ee87ffc (diff)
downloadCMake-9c479c7c40c64d0fbe41cba1b422303989c306f7.zip
CMake-9c479c7c40c64d0fbe41cba1b422303989c306f7.tar.gz
CMake-9c479c7c40c64d0fbe41cba1b422303989c306f7.tar.bz2
IntelLLVM: Add special case for ifx 2021.1 version extraction
The ifx beta versions forgot to define `__INTEL_LLVM_COMPILER`, and instead define `__INTEL_COMPILER == 201900`. Add a special case. Issue: #22120
Diffstat (limited to 'Modules/CMakeFortranCompilerId.F.in')
-rw-r--r--Modules/CMakeFortranCompilerId.F.in8
1 files changed, 8 insertions, 0 deletions
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.