summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCXXCompilerId.cpp.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-12-06 20:10:29 (GMT)
committerBrad King <brad.king@kitware.com>2011-12-07 14:39:48 (GMT)
commitb8cfa656ce7a59bc616eda8d4180ea9642291d07 (patch)
tree9c80e6576057a6570512814817c194b1b4d3243f /Modules/CMakeCXXCompilerId.cpp.in
parent6dae6660fce095681c41fada1d29ab7c80eb8810 (diff)
downloadCMake-b8cfa656ce7a59bc616eda8d4180ea9642291d07.zip
CMake-b8cfa656ce7a59bc616eda8d4180ea9642291d07.tar.gz
CMake-b8cfa656ce7a59bc616eda8d4180ea9642291d07.tar.bz2
Detect PGI compiler version with its id
Decode decimal digits from __PGIC__ __PGIC_MINOR__ __PGIC_PATCHLEVEL__ to compute version number components.
Diffstat (limited to 'Modules/CMakeCXXCompilerId.cpp.in')
-rw-r--r--Modules/CMakeCXXCompilerId.cpp.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in
index 52ed6b2..f2d6f6b 100644
--- a/Modules/CMakeCXXCompilerId.cpp.in
+++ b/Modules/CMakeCXXCompilerId.cpp.in
@@ -53,6 +53,11 @@
#elif defined(__PGI)
# define COMPILER_ID "PGI"
+# define COMPILER_VERSION_MAJOR DEC(__PGIC__)
+# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
+# if defined(__PGIC_PATCHLEVEL__)
+# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
+# endif
#elif defined(__PATHSCALE__)
# define COMPILER_ID "PathScale"