summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCCompilerId.c.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-03-14 12:41:24 (GMT)
committerBrad King <brad.king@kitware.com>2014-03-14 12:51:37 (GMT)
commiteddabf9fcf1783834dd7fdda335c54d08b44b0cc (patch)
tree119efc4332c7dc539c1cf037c062add85c9189ff /Modules/CMakeCCompilerId.c.in
parenta7c956b86736ea82ade88bea6414cd6a8c84e307 (diff)
downloadCMake-eddabf9fcf1783834dd7fdda335c54d08b44b0cc.zip
CMake-eddabf9fcf1783834dd7fdda335c54d08b44b0cc.tar.gz
CMake-eddabf9fcf1783834dd7fdda335c54d08b44b0cc.tar.bz2
CMake*CompilerId: Fix patch level for Intel >= 14.0 (#14806)
According to the Intel release notes: http://software.intel.com/sites/default/files/l-compiler-release-update.pdf the __INTEL_COMPILER_UPDATE predefined macro was introduced to hold the third version component. Reported-by: Dirk Ribbrock <dirk.ribbrock@mathematik.uni-dortmund.de> Co-Author: Rolf Eike Beer <kde@opensource.sf-tec.de>
Diffstat (limited to 'Modules/CMakeCCompilerId.c.in')
-rw-r--r--Modules/CMakeCCompilerId.c.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in
index 52f9590..561ccf2 100644
--- a/Modules/CMakeCCompilerId.c.in
+++ b/Modules/CMakeCCompilerId.c.in
@@ -14,7 +14,11 @@
/* __INTEL_COMPILER = VRP */
# 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_UPDATE)
+# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
+# else
+# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
+# endif
# if defined(__INTEL_COMPILER_BUILD_DATE)
/* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)