[Cmake-commits] CMake branch, next, updated. v3.1.1-2556-g8e80319

Brad King brad.king at kitware.com
Tue Feb 3 13:22:59 EST 2015


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  8e8031933929b12fac8b167b542526af045a415a (commit)
       via  dea42d929699ef62c1d6df0eb273beb30c9fbf6e (commit)
      from  062cb2f5d0c7ab90f04805207bf4bef6469764d3 (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=8e8031933929b12fac8b167b542526af045a415a
commit 8e8031933929b12fac8b167b542526af045a415a
Merge: 062cb2f dea42d9
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Feb 3 13:22:58 2015 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Feb 3 13:22:58 2015 -0500

    Merge topic 'fix-default-install-config' into next
    
    dea42d92 install: Fix regression in default configuration selection


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dea42d929699ef62c1d6df0eb273beb30c9fbf6e
commit dea42d929699ef62c1d6df0eb273beb30c9fbf6e
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Tue Feb 3 13:01:03 2015 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Feb 3 13:05:47 2015 -0500

    install: Fix regression in default configuration selection
    
    The refactoring in commit v3.1.0-rc1~812^2~16 (stringapi: Pass
    configuration names as strings, 2014-02-09) broke the code path in
    cmLocalGenerator::GenerateInstallRules that intends to pick a default
    install configuration for multi-config generators.  Fix the logic to
    select an empty default configuration only when using a single-config
    generator whose CMAKE_BUILD_TYPE is not set.
    
    Inspired-by: Roman Wüger <roman.wueger at gmx.at>
    Reported-by: NoRulez <norulez at me.com>

diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 50e279b..e726ab9 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -390,27 +390,23 @@ void cmLocalGenerator::GenerateInstallRules()
     this->Makefile->GetConfigurations(configurationTypes, false);
 
   // Choose a default install configuration.
-  const char* default_config = config.c_str();
+  std::string default_config = config;
   const char* default_order[] = {"RELEASE", "MINSIZEREL",
                                  "RELWITHDEBINFO", "DEBUG", 0};
-  for(const char** c = default_order; *c && !default_config; ++c)
+  for(const char** c = default_order; *c && default_config.empty(); ++c)
     {
     for(std::vector<std::string>::iterator i = configurationTypes.begin();
         i != configurationTypes.end(); ++i)
       {
       if(cmSystemTools::UpperCase(*i) == *c)
         {
-        default_config = i->c_str();
+        default_config = *i;
         }
       }
     }
-  if(!default_config && !configurationTypes.empty())
+  if(default_config.empty() && !configurationTypes.empty())
     {
-    default_config = configurationTypes[0].c_str();
-    }
-  if(!default_config)
-    {
-    default_config = "Release";
+    default_config = configurationTypes[0];
     }
 
   // Create the install script file.

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

Summary of changes:
 Source/cmLocalGenerator.cxx |   14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list