summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCCompilerId.c.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-12-06 16:54:58 (GMT)
committerBrad King <brad.king@kitware.com>2011-12-07 14:39:45 (GMT)
commit2cc205a0fb070a5022a6b1c449dafb2423b8fbdb (patch)
tree1e883ebc676fcfb4fdde1e7df4688e6fb1044d1d /Modules/CMakeCCompilerId.c.in
parenta6d83ccea9075af783b91f86c37af1f4ec11b5bd (diff)
downloadCMake-2cc205a0fb070a5022a6b1c449dafb2423b8fbdb.zip
CMake-2cc205a0fb070a5022a6b1c449dafb2423b8fbdb.tar.gz
CMake-2cc205a0fb070a5022a6b1c449dafb2423b8fbdb.tar.bz2
Detect Intel compiler version with its id (#11937)
Decode decimal digits from __INTEL_COMPILER __INTEL_COMPILER_BUILD_DATE to compute the version number components. See documentation at: http://predef.sourceforge.net/precomp.html http://software.intel.com/sites/products/documentation/hpc/compilerpro/en-us/fortran/lin/compiler_f/bldaps_for/common/bldaps_use_presym.htm
Diffstat (limited to 'Modules/CMakeCCompilerId.c.in')
-rw-r--r--Modules/CMakeCCompilerId.c.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in
index 7a76897..e9a8efd 100644
--- a/Modules/CMakeCCompilerId.c.in
+++ b/Modules/CMakeCCompilerId.c.in
@@ -8,6 +8,12 @@
#if defined(__INTEL_COMPILER) || defined(__ICC)
# define COMPILER_ID "Intel"
+# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
+# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
+# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
+# if defined(__INTEL_COMPILER_BUILD_DATE)
+# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
+# endif
#elif defined(__clang__)
# define COMPILER_ID "Clang"