From b8cfa656ce7a59bc616eda8d4180ea9642291d07 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 6 Dec 2011 15:10:29 -0500 Subject: Detect PGI compiler version with its id Decode decimal digits from __PGIC__ __PGIC_MINOR__ __PGIC_PATCHLEVEL__ to compute version number components. --- Modules/CMakeCCompilerId.c.in | 5 +++++ Modules/CMakeCXXCompilerId.cpp.in | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in index e7738cf..6bae3a2 100644 --- a/Modules/CMakeCCompilerId.c.in +++ b/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" 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" -- cgit v0.12