ENH: removed GetParentProjects

This commit is contained in:
Ken Martin 2005-03-29 15:34:27 -05:00
parent 179dc3c7ac
commit 62969492b0
3 changed files with 11 additions and 19 deletions

View File

@ -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);
}
}

View File

@ -1015,10 +1015,6 @@ void cmMakefile::RemoveDefinition(const char* name)
void cmMakefile::SetProjectName(const char* p)
{
if(m_ProjectName.size())
{
m_ParentProjects.push_back(m_ProjectName);
}
m_ProjectName = p;
}

View File

@ -268,10 +268,6 @@ public:
return m_ProjectName.c_str();
}
std::vector<std::string> const& GetParentProjects()
{
return m_ParentProjects;
}
/**
* Set the name of the library.
*/
@ -683,7 +679,6 @@ protected:
std::string m_cmCurrentListFile;
std::string m_ProjectName; // project name
std::vector<std::string> m_ParentProjects;
// libraries, classes, and executables
cmTargets m_Targets;