summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2012-10-10 19:32:37 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-11-22 14:06:25 (GMT)
commitc34968a9aa12221f54973a56d4e98940cff676a5 (patch)
tree706aef3eddc310e5836120498fdf054a2334b8d4 /Source/cmLocalNinjaGenerator.cxx
parentabb13ea5659cdaa4254724fca582f56570f88164 (diff)
downloadCMake-c34968a9aa12221f54973a56d4e98940cff676a5.zip
CMake-c34968a9aa12221f54973a56d4e98940cff676a5.tar.gz
CMake-c34968a9aa12221f54973a56d4e98940cff676a5.tar.bz2
Port some of the generator API to cmGeneratorTarget.
Just enough to reach the BuildMacContentDirectory method and the NeedRelinkBeforeInstall methods. In the future, those methods can be moved to cmGeneratorTarget.
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;
}
}