summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;