From 74c57d99b4328c18b533d76e7f009e7daddc04df Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 22 Aug 2012 10:15:40 -0400 Subject: [PATCH] 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 --- Modules/CMakeCCompilerId.c.in | 7 ++++++- 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 7771dbf25..8b5b899a7 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 47cd45c32..80e6d19d8 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"