cmGlobalGenerator: Map local generators to generator targets.
This commit is contained in:
parent
faec4e611d
commit
d4a8a554ea
|
@ -2043,20 +2043,19 @@ void cmGlobalGenerator::FillLocalGeneratorToTargetMap()
|
|||
clg = clg->GetParent())
|
||||
{
|
||||
// This local generator includes the target.
|
||||
std::set<cmTarget const*>& targetSet =
|
||||
std::set<cmGeneratorTarget const*>& targetSet =
|
||||
this->LocalGeneratorToTargetMap[clg];
|
||||
targetSet.insert(&target);
|
||||
cmGeneratorTarget* gt = this->GetGeneratorTarget(&target);
|
||||
targetSet.insert(gt);
|
||||
|
||||
// Add dependencies of the included target. An excluded
|
||||
// target may still be included if it is a dependency of a
|
||||
// non-excluded target.
|
||||
cmGeneratorTarget* gt = this->GetGeneratorTarget(&target);
|
||||
TargetDependSet const& tgtdeps = this->GetTargetDirectDepends(gt);
|
||||
for(TargetDependSet::const_iterator ti = tgtdeps.begin();
|
||||
ti != tgtdeps.end(); ++ti)
|
||||
{
|
||||
cmGeneratorTarget const* ttt = *ti;
|
||||
targetSet.insert(ttt->Target);
|
||||
targetSet.insert(*ti);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -406,7 +406,7 @@ protected:
|
|||
cmMakefile* CurrentMakefile;
|
||||
// map from project name to vector of local generators in that project
|
||||
std::map<std::string, std::vector<cmLocalGenerator*> > ProjectMap;
|
||||
std::map<cmLocalGenerator*, std::set<cmTarget const*> >
|
||||
std::map<cmLocalGenerator*, std::set<cmGeneratorTarget const*> >
|
||||
LocalGeneratorToTargetMap;
|
||||
|
||||
// Set of named installation components requested by the project.
|
||||
|
|
|
@ -830,7 +830,7 @@ cmGlobalUnixMakefileGenerator3
|
|||
cmLocalGenerator::FULL,
|
||||
cmLocalGenerator::SHELL);
|
||||
//
|
||||
std::set<cmTarget const*> emitted;
|
||||
std::set<cmGeneratorTarget const*> emitted;
|
||||
progCmd << " "
|
||||
<< this->CountProgressMarksInTarget(gtarget, emitted);
|
||||
commands.push_back(progCmd.str());
|
||||
|
@ -909,10 +909,10 @@ cmGlobalUnixMakefileGenerator3
|
|||
size_t
|
||||
cmGlobalUnixMakefileGenerator3
|
||||
::CountProgressMarksInTarget(cmGeneratorTarget const* target,
|
||||
std::set<cmTarget const*>& emitted)
|
||||
std::set<cmGeneratorTarget const*>& emitted)
|
||||
{
|
||||
size_t count = 0;
|
||||
if(emitted.insert(target->Target).second)
|
||||
if(emitted.insert(target).second)
|
||||
{
|
||||
count = this->ProgressMap[target->Target].Marks.size();
|
||||
TargetDependSet const& depends = this->GetTargetDirectDepends(target);
|
||||
|
@ -935,14 +935,13 @@ cmGlobalUnixMakefileGenerator3
|
|||
::CountProgressMarksInAll(cmLocalUnixMakefileGenerator3* lg)
|
||||
{
|
||||
size_t count = 0;
|
||||
std::set<cmTarget const*> emitted;
|
||||
std::set<cmTarget const*> const& targets
|
||||
std::set<cmGeneratorTarget const*> emitted;
|
||||
std::set<cmGeneratorTarget const*> const& targets
|
||||
= this->LocalGeneratorToTargetMap[lg];
|
||||
for(std::set<cmTarget const*>::const_iterator t = targets.begin();
|
||||
for(std::set<cmGeneratorTarget const*>::const_iterator t = targets.begin();
|
||||
t != targets.end(); ++t)
|
||||
{
|
||||
cmGeneratorTarget* gt = this->GetGeneratorTarget(*t);
|
||||
count += this->CountProgressMarksInTarget(gt, emitted);
|
||||
count += this->CountProgressMarksInTarget(*t, emitted);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
|
|
@ -199,7 +199,7 @@ protected:
|
|||
ProgressMapType ProgressMap;
|
||||
|
||||
size_t CountProgressMarksInTarget(cmGeneratorTarget const* target,
|
||||
std::set<cmTarget const*>& emitted);
|
||||
std::set<cmGeneratorTarget const*>& emitted);
|
||||
size_t CountProgressMarksInAll(cmLocalUnixMakefileGenerator3* lg);
|
||||
|
||||
cmGeneratedFileStream *CommandDatabase;
|
||||
|
|
Loading…
Reference in New Issue