summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2005-03-29 20:34:27 (GMT)
committerKen Martin <ken.martin@kitware.com>2005-03-29 20:34:27 (GMT)
commit62969492b027404ec94a48bca8ef02f9ef5c2cb7 (patch)
treebf1debae8ea73f1b7d5e8b953722f99353140c79 /Source
parent179dc3c7ac9048dccf69a50296ff3543d5bffe5e (diff)
downloadCMake-62969492b027404ec94a48bca8ef02f9ef5c2cb7.zip
CMake-62969492b027404ec94a48bca8ef02f9ef5c2cb7.tar.gz
CMake-62969492b027404ec94a48bca8ef02f9ef5c2cb7.tar.bz2
ENH: removed GetParentProjects
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalGenerator.cxx21
-rw-r--r--Source/cmMakefile.cxx4
-rw-r--r--Source/cmMakefile.h5
3 files changed, 11 insertions, 19 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);
}
-
}
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 4a73a32..cd2fa9b 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -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;
}
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 3bb7a29..a4492d8 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -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;