[Cmake-commits] CMake branch, next, updated. v2.8.7-2046-gac3fdfa

Brad King brad.king at kitware.com
Tue Jan 10 12:02:53 EST 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  ac3fdfacad1a258baa86e55d50f657ffe36e26aa (commit)
       via  3dd9fa9d6af775473736a01a8970b107b4e0fd47 (commit)
      from  f2cd42b2827008a0a4620885afa91e2681899d66 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ac3fdfacad1a258baa86e55d50f657ffe36e26aa
commit ac3fdfacad1a258baa86e55d50f657ffe36e26aa
Merge: f2cd42b 3dd9fa9
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Jan 10 12:02:38 2012 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jan 10 12:02:38 2012 -0500

    Merge topic 'compiler-version' into next
    
    3dd9fa9 Detect SunPro compiler version with its id


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3dd9fa9d6af775473736a01a8970b107b4e0fd47
commit 3dd9fa9d6af775473736a01a8970b107b4e0fd47
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Dec 7 09:22:11 2011 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Jan 10 11:59:14 2012 -0500

    Detect SunPro compiler version with its id
    
    Decode hex digits from __SUNPRO_C and __SUNPRO_CC to compute the version
    number components.  Note that the constant encodes decimal digits as hex
    digits (never larger than 9).  We represent them as decimal after
    extraction.  See documentation at
    
      http://predef.sourceforge.net/precomp.html
    
    Although the documented version number format is
    
      0xVRP where V = Version, R = Revision, P = Patch
    
    it holds only though SunPro C/C++ version 5.9.  Later versions have
    a two-digit revision (minor) number so their format is 0xVRRP.

diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in
index af59349..85e2671 100644
--- a/Modules/CMakeCCompilerId.c.in
+++ b/Modules/CMakeCCompilerId.c.in
@@ -33,6 +33,15 @@
 
 #elif defined(__SUNPRO_C)
 # define COMPILER_ID "SunPro"
+# if __SUNPRO_C >= 0x5100
+#  define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12)
+#  define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF)
+#  define COMPILER_VERSION_PATCH HEX(__SUNPRO_C    & 0xF)
+# else
+#  define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8)
+#  define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF)
+#  define COMPILER_VERSION_PATCH HEX(__SUNPRO_C    & 0xF)
+# endif
 
 #elif defined(__HP_cc)
 # define COMPILER_ID "HP"
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"

-----------------------------------------------------------------------

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list