diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-11-10 10:22:44 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-01-09 18:38:07 (GMT) |
commit | 38de54cf6f3daae70792fae1bf26b97bccc78de4 (patch) | |
tree | b8499bdf53aef7b2d98a9be50949e79566224b65 /Source/cmNinjaTargetGenerator.cxx | |
parent | f579fe0d7a102df0c69c957d48e3e728333dffe1 (diff) | |
download | CMake-38de54cf6f3daae70792fae1bf26b97bccc78de4.zip CMake-38de54cf6f3daae70792fae1bf26b97bccc78de4.tar.gz CMake-38de54cf6f3daae70792fae1bf26b97bccc78de4.tar.bz2 |
cmGeneratorTarget: Add methods to access source file groups.
These methods and others will be able to get a config parameter
later to implement the INTERFACE_SOURCES feature.
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r-- | Source/cmNinjaTargetGenerator.cxx | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index c8b03e1..82f8d1b 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -276,7 +276,8 @@ cmNinjaTargetGenerator std::string path = this->LocalGenerator->GetHomeRelativeOutputPath(); if(!path.empty()) path += "/"; - std::string const& objectName = this->GeneratorTarget->Objects[source]; + std::string const& objectName = this->GeneratorTarget + ->GetObjectName(source); path += this->LocalGenerator->GetTargetDirectory(*this->Target); path += "/"; path += objectName; @@ -458,28 +459,37 @@ cmNinjaTargetGenerator << this->GetTargetName() << "\n\n"; + std::vector<cmSourceFile*> customCommands; + this->GeneratorTarget->GetCustomCommands(customCommands); for(std::vector<cmSourceFile*>::const_iterator - si = this->GeneratorTarget->CustomCommands.begin(); - si != this->GeneratorTarget->CustomCommands.end(); ++si) + si = customCommands.begin(); + si != customCommands.end(); ++si) { cmCustomCommand const* cc = (*si)->GetCustomCommand(); this->GetLocalGenerator()->AddCustomCommandTarget(cc, this->GetTarget()); } + std::vector<cmSourceFile*> headerSources; + this->GeneratorTarget->GetHeaderSources(headerSources); this->OSXBundleGenerator->GenerateMacOSXContentStatements( - this->GeneratorTarget->HeaderSources, + headerSources, this->MacOSXContentGenerator); + std::vector<cmSourceFile*> extraSources; + this->GeneratorTarget->GetExtraSources(extraSources); this->OSXBundleGenerator->GenerateMacOSXContentStatements( - this->GeneratorTarget->ExtraSources, + extraSources, this->MacOSXContentGenerator); + std::vector<cmSourceFile*> externalObjects; + this->GeneratorTarget->GetExternalObjects(externalObjects); for(std::vector<cmSourceFile*>::const_iterator - si = this->GeneratorTarget->ExternalObjects.begin(); - si != this->GeneratorTarget->ExternalObjects.end(); ++si) + si = externalObjects.begin(); + si != externalObjects.end(); ++si) { this->Objects.push_back(this->GetSourceFilePath(*si)); } + std::vector<cmSourceFile*> objectSources; + this->GeneratorTarget->GetObjectSources(objectSources); for(std::vector<cmSourceFile*>::const_iterator - si = this->GeneratorTarget->ObjectSources.begin(); - si != this->GeneratorTarget->ObjectSources.end(); ++si) + si = objectSources.begin(); si != objectSources.end(); ++si) { this->WriteObjectBuildStatement(*si); } @@ -539,9 +549,11 @@ cmNinjaTargetGenerator } // Add order-only dependencies on custom command outputs. + std::vector<cmSourceFile*> customCommands; + this->GeneratorTarget->GetCustomCommands(customCommands); for(std::vector<cmSourceFile*>::const_iterator - si = this->GeneratorTarget->CustomCommands.begin(); - si != this->GeneratorTarget->CustomCommands.end(); ++si) + si = customCommands.begin(); + si != customCommands.end(); ++si) { cmCustomCommand const* cc = (*si)->GetCustomCommand(); const std::vector<std::string>& ccoutputs = cc->GetOutputs(); |