summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalNinjaGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmLocalNinjaGenerator.cxx')
-rw-r--r--Source/cmLocalNinjaGenerator.cxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index f1d5e2c..158d714 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -64,18 +64,23 @@ void cmLocalNinjaGenerator::Generate()
}
}
- cmTargets& targets = this->GetMakefile()->GetTargets();
- for(cmTargets::iterator t = targets.begin(); t != targets.end(); ++t)
+ cmGeneratorTargetsType targets = this->GetMakefile()->GetGeneratorTargets();
+ for(cmGeneratorTargetsType::iterator t = targets.begin();
+ t != targets.end(); ++t)
{
- cmNinjaTargetGenerator* tg = cmNinjaTargetGenerator::New(&t->second);
+ if (t->second->Target->IsImported())
+ {
+ continue;
+ }
+ cmNinjaTargetGenerator* tg = cmNinjaTargetGenerator::New(t->second);
if(tg)
{
tg->Generate();
// Add the target to "all" if required.
if (!this->GetGlobalNinjaGenerator()->IsExcluded(
this->GetGlobalNinjaGenerator()->GetLocalGenerators()[0],
- t->second))
- this->GetGlobalNinjaGenerator()->AddDependencyToAll(&t->second);
+ *t->second->Target))
+ this->GetGlobalNinjaGenerator()->AddDependencyToAll(t->second->Target);
delete tg;
}
}