summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCXXCompilerId.cpp.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-01-10 18:07:04 (GMT)
committerBrad King <brad.king@kitware.com>2012-01-10 18:07:04 (GMT)
commitd7c6f410f98123af03322bd916e49b9e21d90310 (patch)
treedbfea77580accff97d633bb6bf3c6581c0bf8c2b /Modules/CMakeCXXCompilerId.cpp.in
parent3dd9fa9d6af775473736a01a8970b107b4e0fd47 (diff)
downloadCMake-d7c6f410f98123af03322bd916e49b9e21d90310.zip
CMake-d7c6f410f98123af03322bd916e49b9e21d90310.tar.gz
CMake-d7c6f410f98123af03322bd916e49b9e21d90310.tar.bz2
Detect HP compiler version with its id
Decode decimal digits from __HP_cc and __HP_aCC to compute version number components. See documentation at: http://predef.sourceforge.net/precomp.html http://g4u0420c.houston.hp.com/en/14487/preprocess.htm
Diffstat (limited to 'Modules/CMakeCXXCompilerId.cpp.in')
-rw-r--r--Modules/CMakeCXXCompilerId.cpp.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in
index 5f0cb6b..bf4eaf9 100644
--- a/Modules/CMakeCXXCompilerId.cpp.in
+++ b/Modules/CMakeCXXCompilerId.cpp.in
@@ -47,6 +47,9 @@
#elif defined(__HP_aCC)
# define COMPILER_ID "HP"
+# define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000)
+# define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100)
+# define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100)
#elif defined(__DECCXX)
# define COMPILER_ID "Compaq"