diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-08-02 07:41:11 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-08-25 17:57:44 (GMT) |
commit | 637c56b4e0ce0205f3f28a670881aad07320ff17 (patch) | |
tree | c0641caf84dcd4de5224c5bf6cb22e9b41c1c60e | |
parent | b3f2299e0600f3488aaeb78ebf66d1108201ea17 (diff) | |
download | CMake-637c56b4e0ce0205f3f28a670881aad07320ff17.zip CMake-637c56b4e0ce0205f3f28a670881aad07320ff17.tar.gz CMake-637c56b4e0ce0205f3f28a670881aad07320ff17.tar.bz2 |
cmGlobalGenerator: Implement FillProjectMap in terms of cmState.
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 503c455..17bafbe 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -2102,18 +2102,19 @@ void cmGlobalGenerator::FillProjectMap() for(i = 0; i < this->LocalGenerators.size(); ++i) { // for each local generator add all projects - cmLocalGenerator *lg = this->LocalGenerators[i]; + cmState::Snapshot snp = this->LocalGenerators[i]->GetStateSnapshot(); std::string name; do { - if (name != lg->GetMakefile()->GetProjectName()) + std::string snpProjName = snp.GetProjectName(); + if (name != snpProjName) { - name = lg->GetMakefile()->GetProjectName(); + name = snpProjName; this->ProjectMap[name].push_back(this->LocalGenerators[i]); } - lg = lg->GetParent(); + snp = snp.GetBuildsystemDirectoryParent(); } - while (lg); + while (snp.IsValid()); } } |