summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-02-04 17:30:17 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-02-04 17:30:17 (GMT)
commitf560fdddd19200f994fb98ba5576bed34938a7a3 (patch)
treeca113c0595e5fbe95e52b0c2ff6663111057bfed /Source
parentff90f49d188b4e700abe31afe66c31f38e315648 (diff)
parentdea42d929699ef62c1d6df0eb273beb30c9fbf6e (diff)
downloadCMake-f560fdddd19200f994fb98ba5576bed34938a7a3.zip
CMake-f560fdddd19200f994fb98ba5576bed34938a7a3.tar.gz
CMake-f560fdddd19200f994fb98ba5576bed34938a7a3.tar.bz2
Merge topic 'fix-default-install-config'
dea42d92 install: Fix regression in default configuration selection
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalGenerator.cxx14
1 files changed, 5 insertions, 9 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index af4c950..290c2ca 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -407,27 +407,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.