summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCXXCompilerId.cpp.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-12-06 17:07:35 (GMT)
committerBrad King <brad.king@kitware.com>2011-12-07 14:39:47 (GMT)
commit6dae6660fce095681c41fada1d29ab7c80eb8810 (patch)
tree853eefa5ff4e6d3984900fa54a3d2cda95024103 /Modules/CMakeCXXCompilerId.cpp.in
parent4080d5510e5a97de8f3659b5ca4c88d17b81f31d (diff)
downloadCMake-6dae6660fce095681c41fada1d29ab7c80eb8810.zip
CMake-6dae6660fce095681c41fada1d29ab7c80eb8810.tar.gz
CMake-6dae6660fce095681c41fada1d29ab7c80eb8810.tar.bz2
Detect IBM XL compiler version with its id
Decode decimal digits from __IBMC__ and __IBMCPP__ to compute version number components. See documentation at: http://predef.sourceforge.net/precomp.html http://publib.boulder.ibm.com/infocenter/comphelp/v111v131/topic/com.ibm.xlc111.aix.doc/compiler_ref/xlmacros.html http://publib.boulder.ibm.com/infocenter/comphelp/v111v131/topic/com.ibm.xlcpp111.aix.doc/compiler_ref/xlmacros.html
Diffstat (limited to 'Modules/CMakeCXXCompilerId.cpp.in')
-rw-r--r--Modules/CMakeCXXCompilerId.cpp.in11
1 files changed, 8 insertions, 3 deletions
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)