diff options
author | Brad King <brad.king@kitware.com> | 2015-02-04 17:30:17 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-02-04 17:30:17 (GMT) |
commit | f560fdddd19200f994fb98ba5576bed34938a7a3 (patch) | |
tree | ca113c0595e5fbe95e52b0c2ff6663111057bfed /Source | |
parent | ff90f49d188b4e700abe31afe66c31f38e315648 (diff) | |
parent | dea42d929699ef62c1d6df0eb273beb30c9fbf6e (diff) | |
download | CMake-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.cxx | 14 |
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. |