diff options
Diffstat (limited to 'Modules/CMakeCXXCompilerId.cpp.in')
-rw-r--r-- | Modules/CMakeCXXCompilerId.cpp.in | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in index d3fcc4b..5f0cb6b 100644 --- a/Modules/CMakeCXXCompilerId.cpp.in +++ b/Modules/CMakeCXXCompilerId.cpp.in @@ -35,6 +35,15 @@ #elif defined(__SUNPRO_CC) # define COMPILER_ID "SunPro" +# if __SUNPRO_CC >= 0x5100 +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) +# else +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) +# endif #elif defined(__HP_aCC) # define COMPILER_ID "HP" |