summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx17
1 files changed, 13 insertions, 4 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 789713f..9a3812c 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1623,7 +1623,11 @@ cmTargetTraceDependencies
{
// Transform command names that reference targets built in this
// project to corresponding target-level dependencies.
- cmGeneratorExpression ge(this->Makefile, 0, cc.GetBacktrace(), true);
+ cmGeneratorExpression ge(cc.GetBacktrace());
+
+ // Add target-level dependencies referenced by generator expressions.
+ std::set<cmTarget*> targets;
+
for(cmCustomCommandLines::const_iterator cit = cc.GetCommandLines().begin();
cit != cc.GetCommandLines().end(); ++cit)
{
@@ -1645,12 +1649,17 @@ cmTargetTraceDependencies
for(cmCustomCommandLine::const_iterator cli = cit->begin();
cli != cit->end(); ++cli)
{
- ge.Process(*cli);
+ const cmCompiledGeneratorExpression &cge = ge.Parse(*cli);
+ cge.Evaluate(this->Makefile, 0, true);
+ std::set<cmTarget*> geTargets = cge.GetTargets();
+ for(std::set<cmTarget*>::const_iterator it = geTargets.begin();
+ it != geTargets.end(); ++it)
+ {
+ targets.insert(*it);
+ }
}
}
- // Add target-level dependencies referenced by generator expressions.
- std::set<cmTarget*> targets = ge.GetTargets();
for(std::set<cmTarget*>::iterator ti = targets.begin();
ti != targets.end(); ++ti)
{