summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCCompilerId.c.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/CMakeCCompilerId.c.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/CMakeCCompilerId.c.in')
-rw-r--r--Modules/CMakeCCompilerId.c.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in
index 85e2671..c39eccb 100644
--- a/Modules/CMakeCCompilerId.c.in
+++ b/Modules/CMakeCCompilerId.c.in
@@ -45,6 +45,9 @@
#elif defined(__HP_cc)
# define COMPILER_ID "HP"
+# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000)
+# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100)
+# define COMPILER_VERSION_PATCH DEC(__HP_cc % 100)
#elif defined(__DECC)
# define COMPILER_ID "Compaq"