diff options
author | Brad King <brad.king@kitware.com> | 2012-08-22 14:15:40 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-08-22 14:17:01 (GMT) |
commit | 74c57d99b4328c18b533d76e7f009e7daddc04df (patch) | |
tree | 6acfbc8883abb56fa76a3b56c1ccebb225acd033 | |
parent | 707aefd853d1fec2960058e2e921e5d24c736526 (diff) | |
download | CMake-74c57d99b4328c18b533d76e7f009e7daddc04df.zip CMake-74c57d99b4328c18b533d76e7f009e7daddc04df.tar.gz CMake-74c57d99b4328c18b533d76e7f009e7daddc04df.tar.bz2 |
Detect PathScale compiler version with its id
Decode decimal digits from
__PATHCC__
__PATHCC_MINOR__
__PATHCC_PATCHLEVEL__
to compute version number components. See documentation at:
http://www.pathscale.com/docs/UserGuide.pdf
http://sourceforge.net/p/predef/wiki/Compilers/#ekopathhttpenwikipediaorgwikipathscale
-rw-r--r-- | Modules/CMakeCCompilerId.c.in | 7 | ||||
-rw-r--r-- | Modules/CMakeCXXCompilerId.cpp.in | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in index 7771dbf..8b5b899 100644 --- a/Modules/CMakeCCompilerId.c.in +++ b/Modules/CMakeCCompilerId.c.in @@ -95,8 +95,13 @@ # define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) # endif -#elif defined(__PATHSCALE__) +#elif defined(__PATHCC__) # define COMPILER_ID "PathScale" +# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) +# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) +# if defined(__PATHCC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) +# endif #elif defined(_CRAYC) # define COMPILER_ID "Cray" diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in index 47cd45c..80e6d19 100644 --- a/Modules/CMakeCXXCompilerId.cpp.in +++ b/Modules/CMakeCXXCompilerId.cpp.in @@ -97,8 +97,13 @@ # define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) # endif -#elif defined(__PATHSCALE__) +#elif defined(__PATHCC__) # define COMPILER_ID "PathScale" +# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) +# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) +# if defined(__PATHCC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) +# endif #elif defined(_CRAYC) # define COMPILER_ID "Cray" |