diff options
author | Brad King <brad.king@kitware.com> | 2010-09-08 18:54:49 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-09-08 18:54:49 (GMT) |
commit | b06fb1668424514bf45794d40bfc9f88dd5d619c (patch) | |
tree | 66ae0b807e08cf844b9786624ce441f5563f7a8c /Source/cmLocalGenerator.cxx | |
parent | f444b9555f87ec187bff51d48cd29c22ab4a6121 (diff) | |
download | CMake-b06fb1668424514bf45794d40bfc9f88dd5d619c.zip CMake-b06fb1668424514bf45794d40bfc9f88dd5d619c.tar.gz CMake-b06fb1668424514bf45794d40bfc9f88dd5d619c.tar.bz2 |
No CMAKE_CONFIGURATION_TYPES in single-config generators (#10202)
Factor out reading of CMAKE_CONFIGURATION_TYPES and CMAKE_BUILD_TYPE
into cmMakefile::GetConfigurations. Read the former only in
multi-config generators.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 38 |
1 files changed, 5 insertions, 33 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index bac0223..5bffd52 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -278,16 +278,8 @@ void cmLocalGenerator::GenerateTestFiles() // Compute the set of configurations. std::vector<std::string> configurationTypes; - if(const char* types = - this->Makefile->GetDefinition("CMAKE_CONFIGURATION_TYPES")) - { - cmSystemTools::ExpandListArgument(types, configurationTypes); - } - const char* config = 0; - if(configurationTypes.empty()) - { - config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE"); - } + const char* config = + this->Makefile->GetConfigurations(configurationTypes, false); std::string file = this->Makefile->GetStartOutputDirectory(); file += "/"; @@ -383,16 +375,8 @@ void cmLocalGenerator::GenerateInstallRules() // Compute the set of configurations. std::vector<std::string> configurationTypes; - if(const char* types = - this->Makefile->GetDefinition("CMAKE_CONFIGURATION_TYPES")) - { - cmSystemTools::ExpandListArgument(types, configurationTypes); - } - const char* config = 0; - if(configurationTypes.empty()) - { - config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE"); - } + const char* config = + this->Makefile->GetConfigurations(configurationTypes, false); // Choose a default install configuration. const char* default_config = config; @@ -546,19 +530,7 @@ void cmLocalGenerator::GenerateTargetManifest() { // Collect the set of configuration types. std::vector<std::string> configNames; - if(const char* configurationTypes = - this->Makefile->GetDefinition("CMAKE_CONFIGURATION_TYPES")) - { - cmSystemTools::ExpandListArgument(configurationTypes, configNames); - } - else if(const char* buildType = - this->Makefile->GetDefinition("CMAKE_BUILD_TYPE")) - { - if(*buildType) - { - configNames.push_back(buildType); - } - } + this->Makefile->GetConfigurations(configNames); // Add our targets to the manifest for each configuration. cmTargets& targets = this->Makefile->GetTargets(); |