summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCCompilerId.c.in
diff options
context:
space:
mode:
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"