[Cmake-commits] CMake branch, next, updated. v2.8.7-2367-g9372503

Brad King brad.king at kitware.com
Mon Jan 30 14:19:01 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  9372503b9757836c01f1c16a47e06da2505ed853 (commit)
       via  453b9e38b6edde5b7c49eba76d1d1f190f14a756 (commit)
      from  5dc2df56fad1f35cf3721f633edea112f1d0c099 (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=9372503b9757836c01f1c16a47e06da2505ed853
commit 9372503b9757836c01f1c16a47e06da2505ed853
Merge: 5dc2df5 453b9e3
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jan 30 14:18:59 2012 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jan 30 14:18:59 2012 -0500

    Merge topic 'find-vcexpress' into next
    
    453b9e3 Find VC Express during default generator selection (#12917)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=453b9e38b6edde5b7c49eba76d1d1f190f14a756
commit 453b9e38b6edde5b7c49eba76d1d1f190f14a756
Author:     Peter Kuemmel <syntheticpp at gmx.net>
AuthorDate: Sat Jan 28 13:59:19 2012 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Jan 30 14:15:10 2012 -0500

    Find VC Express during default generator selection (#12917)
    
    CMake doesn't find Visual C++ Express and uses "NMake Makefiles"
    generator by default when one calls cmake WITHOUT using the -G options.
    Teach CMake to find VC Express to use it as the default generator just
    like the commercial versions.

diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index d691f46..6957925 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2204,8 +2204,10 @@ int cmake::ActualConfigure()
       std::string installedCompiler;
       // Try to find the newest VS installed on the computer and
       // use that as a default if -G is not specified
-      std::string vsregBase =
-        "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\";
+      const std::string vsregBase = "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\";
+      std::vector<std::string> vsVerions;
+      vsVerions.push_back("VisualStudio\\");
+      vsVerions.push_back("VCExpress\\");
       struct VSRegistryEntryName
       {
         const char* MSVersion;
@@ -2219,14 +2221,17 @@ int cmake::ActualConfigure()
         {"9.0", "Visual Studio 9 2008"},
         {"10.0", "Visual Studio 10"},
         {0, 0}};
-      for(int i =0; version[i].MSVersion != 0; i++)
+      for (size_t b = 0; b < vsVerions.size() && installedCompiler.empty(); b++)
         {
-        std::string reg = vsregBase + version[i].MSVersion;
-        reg += ";InstallDir]";
-        cmSystemTools::ExpandRegistryValues(reg);
-        if (!(reg == "/registry"))
+        for(int i =0; version[i].MSVersion != 0; i++)
           {
-          installedCompiler = version[i].GeneratorName;
+          std::string reg = vsregBase + vsVerions[b] + version[i].MSVersion;
+          reg += ";InstallDir]";
+          cmSystemTools::ExpandRegistryValues(reg, cmSystemTools::KeyWOW64_32);
+          if (!(reg == "/registry"))
+            {
+            installedCompiler = version[i].GeneratorName;
+            }
           }
         }
       cmGlobalGenerator* gen

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

Summary of changes:
 Source/cmake.cxx |   21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list