summaryrefslogtreecommitdiffstats
path: root/Source/cmComputeTargetDepends.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-08-25 14:07:25 (GMT)
committerBrad King <brad.king@kitware.com>2010-11-18 15:51:00 (GMT)
commit605f4bc0978fd3c84bc06875aef500e62b0f41c7 (patch)
treefd4441fc3b796ecd84d554fd79a45ee464bc9287 /Source/cmComputeTargetDepends.cxx
parent82596fcffcdf3e536fb0def67f6d4d1d1a3e5207 (diff)
downloadCMake-605f4bc0978fd3c84bc06875aef500e62b0f41c7.zip
CMake-605f4bc0978fd3c84bc06875aef500e62b0f41c7.tar.gz
CMake-605f4bc0978fd3c84bc06875aef500e62b0f41c7.tar.bz2
Record edge type in global dependency graph
Each inter-target dependency may be a 'link' or 'util' dependency.
Diffstat (limited to 'Source/cmComputeTargetDepends.cxx')
-rw-r--r--Source/cmComputeTargetDepends.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx
index 313c680..3f9c7ec 100644
--- a/Source/cmComputeTargetDepends.cxx
+++ b/Source/cmComputeTargetDepends.cxx
@@ -144,7 +144,7 @@ bool cmComputeTargetDepends::Compute()
//----------------------------------------------------------------------------
void
cmComputeTargetDepends::GetTargetDirectDepends(cmTarget* t,
- std::set<cmTarget*>& deps)
+ cmTargetDependSet& deps)
{
// Lookup the index for this target. All targets should be known by
// this point.
@@ -156,7 +156,9 @@ cmComputeTargetDepends::GetTargetDirectDepends(cmTarget* t,
EdgeList const& nl = this->FinalGraph[i];
for(EdgeList::const_iterator ni = nl.begin(); ni != nl.end(); ++ni)
{
- deps.insert(this->Targets[*ni]);
+ cmTarget* dep = this->Targets[*ni];
+ cmTargetDependSet::iterator di = deps.insert(dep).first;
+ di->SetType(ni->IsStrong());
}
}
@@ -445,7 +447,7 @@ cmComputeTargetDepends
int j = *ei;
if(cmap[j] == c && ei->IsStrong())
{
- this->FinalGraph[i].push_back(j);
+ this->FinalGraph[i].push_back(cmGraphEdge(j, true));
if(!this->IntraComponent(cmap, c, j, head, emitted, visited))
{
return false;
@@ -456,7 +458,7 @@ cmComputeTargetDepends
// Prepend to a linear linked-list of intra-component edges.
if(*head >= 0)
{
- this->FinalGraph[i].push_back(*head);
+ this->FinalGraph[i].push_back(cmGraphEdge(*head, false));
}
else
{
@@ -515,7 +517,7 @@ cmComputeTargetDepends
int dependee_component = *ni;
int dependee_component_head = this->ComponentHead[dependee_component];
this->FinalGraph[depender_component_tail]
- .push_back(dependee_component_head);
+ .push_back(cmGraphEdge(dependee_component_head, ni->IsStrong()));
}
}
return true;