Browse Source

Detect PGI compiler version with its id

Decode decimal digits from

  __PGIC__
  __PGIC_MINOR__
  __PGIC_PATCHLEVEL__

to compute version number components.
Brad King 14 years ago
parent
commit
b8cfa656ce
2 changed files with 10 additions and 0 deletions
  1. 5 0
      Modules/CMakeCCompilerId.c.in
  2. 5 0
      Modules/CMakeCXXCompilerId.cpp.in

+ 5 - 0
Modules/CMakeCCompilerId.c.in

@@ -51,6 +51,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"

+ 5 - 0
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"