diff options
author | Brad King <brad.king@kitware.com> | 2010-12-17 15:31:19 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-12-17 15:31:19 (GMT) |
commit | 9bcaff02ff066e9bdd69e3e1e3134aa65c53c121 (patch) | |
tree | 2f46b8a3e84e07b51b20c70065c8a1c26ad47fd5 /Source/cmMakefile.cxx | |
parent | 544d0c37742a068fa07b265380315a25af3ae9f3 (diff) | |
parent | 3d13502c986e43f070366d04891c8a3da05e2cb8 (diff) | |
download | CMake-9bcaff02ff066e9bdd69e3e1e3134aa65c53c121.zip CMake-9bcaff02ff066e9bdd69e3e1e3134aa65c53c121.tar.gz CMake-9bcaff02ff066e9bdd69e3e1e3134aa65c53c121.tar.bz2 |
Merge branch 'cmake-guiRememberAdvancedCheckbox' into dev/strict-mode
Conflicts:
Source/QtDialog/CMakeSetupDialog.cxx
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 9ccde8f..a97ec10 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1461,16 +1461,7 @@ void cmMakefile::InitializeFromParent() this->SetProperty("COMPILE_DEFINITIONS", parent->GetProperty("COMPILE_DEFINITIONS")); std::vector<std::string> configs; - if(const char* configTypes = - this->GetDefinition("CMAKE_CONFIGURATION_TYPES")) - { - cmSystemTools::ExpandListArgument(configTypes, configs); - } - else if(const char* buildType = - this->GetDefinition("CMAKE_BUILD_TYPE")) - { - configs.push_back(buildType); - } + this->GetConfigurations(configs); for(std::vector<std::string>::const_iterator ci = configs.begin(); ci != configs.end(); ++ci) { @@ -2491,6 +2482,31 @@ void cmMakefile::AddDefaultDefinitions() cmake::GetCMakeFilesDirectory()); } +//---------------------------------------------------------------------------- +const char* +cmMakefile::GetConfigurations(std::vector<std::string>& configs, + bool single) const +{ + if(this->LocalGenerator->GetGlobalGenerator()->IsMultiConfig()) + { + if(const char* configTypes = + this->GetDefinition("CMAKE_CONFIGURATION_TYPES")) + { + cmSystemTools::ExpandListArgument(configTypes, configs); + } + return 0; + } + else + { + const char* buildType = this->GetDefinition("CMAKE_BUILD_TYPE"); + if(single && buildType && *buildType) + { + configs.push_back(buildType); + } + return buildType; + } +} + #if defined(CMAKE_BUILD_WITH_CMAKE) /** * Find a source group whose regular expression matches the filename |