summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/CMakeCCompilerId.c.in11
-rw-r--r--Modules/CMakeCXXCompilerId.cpp.in11
2 files changed, 16 insertions, 6 deletions
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in
index 5afe99f..e7738cf 100644
--- a/Modules/CMakeCCompilerId.c.in
+++ b/Modules/CMakeCCompilerId.c.in
@@ -38,10 +38,15 @@
#elif defined(__IBMC__)
# if defined(__COMPILER_VER__)
# define COMPILER_ID "zOS"
-# elif __IBMC__ >= 800
-# define COMPILER_ID "XL"
# else
-# define COMPILER_ID "VisualAge"
+# if __IBMC__ >= 800
+# define COMPILER_ID "XL"
+# else
+# define COMPILER_ID "VisualAge"
+# endif
+# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
+# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
+# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
# endif
#elif defined(__PGI)
diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in
index 4c42f8a..52ed6b2 100644
--- a/Modules/CMakeCXXCompilerId.cpp.in
+++ b/Modules/CMakeCXXCompilerId.cpp.in
@@ -40,10 +40,15 @@
#elif defined(__IBMCPP__)
# if defined(__COMPILER_VER__)
# define COMPILER_ID "zOS"
-# elif __IBMCPP__ >= 800
-# define COMPILER_ID "XL"
# else
-# define COMPILER_ID "VisualAge"
+# if __IBMCPP__ >= 800
+# define COMPILER_ID "XL"
+# else
+# define COMPILER_ID "VisualAge"
+# endif
+# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
+# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
+# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
# endif
#elif defined(__PGI)