diff options
author | Ken Martin <ken.martin@kitware.com> | 2005-03-29 20:34:27 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2005-03-29 20:34:27 (GMT) |
commit | 62969492b027404ec94a48bca8ef02f9ef5c2cb7 (patch) | |
tree | bf1debae8ea73f1b7d5e8b953722f99353140c79 /Source/cmGlobalGenerator.cxx | |
parent | 179dc3c7ac9048dccf69a50296ff3543d5bffe5e (diff) | |
download | CMake-62969492b027404ec94a48bca8ef02f9ef5c2cb7.zip CMake-62969492b027404ec94a48bca8ef02f9ef5c2cb7.tar.gz CMake-62969492b027404ec94a48bca8ef02f9ef5c2cb7.tar.bz2 |
ENH: removed GetParentProjects
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 94d0fc7..24291e1 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -823,19 +823,20 @@ void cmGlobalGenerator::FillProjectMap() unsigned int i; for(i = 0; i < m_LocalGenerators.size(); ++i) { - std::string name = m_LocalGenerators[i]->GetMakefile()->GetProjectName(); - // for each local generator add the local generator to the project that - // it is in - m_ProjectMap[name].push_back(m_LocalGenerators[i]); - // now add the local generator to any parent project it is part of - std::vector<std::string> const& pprojects - = m_LocalGenerators[i]->GetMakefile()->GetParentProjects(); - for(unsigned int k =0; k < pprojects.size(); ++k) + // for each local generator add all projects + cmLocalGenerator *lg = m_LocalGenerators[i]; + std::string name; + do { - m_ProjectMap[pprojects[k]].push_back(m_LocalGenerators[i]); + if (name != lg->GetMakefile()->GetProjectName()) + { + name = lg->GetMakefile()->GetProjectName(); + m_ProjectMap[name].push_back(m_LocalGenerators[i]); + } + lg = lg->GetParent(); } + while (lg); } - } |