diff options
author | Brad King <brad.king@kitware.com> | 2015-05-20 17:55:21 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-05-21 13:06:49 (GMT) |
commit | 2f4bb4e9b033e1ac3daf63c0dc7c588ccbd70bf4 (patch) | |
tree | 6821eeb8c45ada58e8afe5209a4ccc16d629a9cf /Source/cmGlobalVisualStudio8Generator.cxx | |
parent | 3541fc73a12a52f87a2faa9790a65651658162d8 (diff) | |
download | CMake-2f4bb4e9b033e1ac3daf63c0dc7c588ccbd70bf4.zip CMake-2f4bb4e9b033e1ac3daf63c0dc7c588ccbd70bf4.tar.gz CMake-2f4bb4e9b033e1ac3daf63c0dc7c588ccbd70bf4.tar.bz2 |
VS: Do not accumulate configurations globally (#15577)
Drop the VS >= 7 generator's global Configurations member and instead
lookup configurations using cmMakefile::GetConfigurations where needed.
This avoids accumulating all CMAKE_CONFIGURATION_TYPES values ever
encountered by a project() or enable_language() command and allows
the final value to be used in each directory. We don't officially
support per-directory CMAKE_CONFIGURATION_TYPES values but we certainly
should not generate configurations not in the final value in the top
level directory.
Diffstat (limited to 'Source/cmGlobalVisualStudio8Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio8Generator.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index 4565f36..9f02596 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -375,11 +375,12 @@ void cmGlobalVisualStudio8Generator::Generate() //---------------------------------------------------------------------------- void cmGlobalVisualStudio8Generator -::WriteSolutionConfigurations(std::ostream& fout) +::WriteSolutionConfigurations(std::ostream& fout, + std::vector<std::string> const& configs) { fout << "\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n"; - for(std::vector<std::string>::iterator i = this->Configurations.begin(); - i != this->Configurations.end(); ++i) + for(std::vector<std::string>::const_iterator i = configs.begin(); + i != configs.end(); ++i) { fout << "\t\t" << *i << "|" << this->GetPlatformName() << " = " << *i << "|" << this->GetPlatformName() << "\n"; @@ -392,12 +393,13 @@ void cmGlobalVisualStudio8Generator ::WriteProjectConfigurations( std::ostream& fout, const std::string& name, cmTarget::TargetType type, + std::vector<std::string> const& configs, const std::set<std::string>& configsPartOfDefaultBuild, std::string const& platformMapping) { std::string guid = this->GetGUID(name); - for(std::vector<std::string>::iterator i = this->Configurations.begin(); - i != this->Configurations.end(); ++i) + for(std::vector<std::string>::const_iterator i = configs.begin(); + i != configs.end(); ++i) { fout << "\t\t{" << guid << "}." << *i << "|" << this->GetPlatformName() << ".ActiveCfg = " << *i << "|" |