summaryrefslogtreecommitdiff
path: root/Modules/CMakeCXXCompilerId.cpp.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-03-14 08:41:24 -0400
committerBrad King <brad.king@kitware.com>2014-03-14 08:51:37 -0400
commiteddabf9fcf1783834dd7fdda335c54d08b44b0cc (patch)
tree119efc4332c7dc539c1cf037c062add85c9189ff /Modules/CMakeCXXCompilerId.cpp.in
parenta7c956b86736ea82ade88bea6414cd6a8c84e307 (diff)
downloadcmake-eddabf9fcf1783834dd7fdda335c54d08b44b0cc.tar.gz
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/CMakeCXXCompilerId.cpp.in')
-rw-r--r--Modules/CMakeCXXCompilerId.cpp.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in
index 25ceb3fb14..6c602d46e8 100644
--- a/Modules/CMakeCXXCompilerId.cpp.in
+++ b/Modules/CMakeCXXCompilerId.cpp.in
@@ -19,7 +19,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)