diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-05-30 13:41:27 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-05-30 16:38:20 (GMT) |
commit | fc451f130ded493ae13fda1950d31acc39002ffc (patch) | |
tree | fb9bc6cab2a11959e48c2b2c33149c0fc8c8376f /Source/cmNinjaTargetGenerator.cxx | |
parent | 2dc483476c134ec6fb05802990a98df406a39caf (diff) | |
download | CMake-fc451f130ded493ae13fda1950d31acc39002ffc.zip CMake-fc451f130ded493ae13fda1950d31acc39002ffc.tar.gz CMake-fc451f130ded493ae13fda1950d31acc39002ffc.tar.bz2 |
Ninja: Use cmNinjaBuild class for WriteBuild
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r-- | Source/cmNinjaTargetGenerator.cxx | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 8eb9dbd..2bc5765 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -886,19 +886,12 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatements() std::string const& language = langDDIFiles.first; cmNinjaDeps const& ddiFiles = langDDIFiles.second; - std::string const ddComment; - std::string const ddRule = this->LanguageDyndepRule(language); - cmNinjaDeps ddOutputs; - cmNinjaDeps ddImplicitOuts; - cmNinjaDeps const& ddExplicitDeps = ddiFiles; - cmNinjaDeps ddImplicitDeps; - cmNinjaDeps ddOrderOnlyDeps; - cmNinjaVars ddVars; + cmNinjaBuild build(this->LanguageDyndepRule(language)); + build.Outputs.push_back(this->GetDyndepFilePath(language)); + build.ExplicitDeps = ddiFiles; this->WriteTargetDependInfo(language); - ddOutputs.push_back(this->GetDyndepFilePath(language)); - // Make sure dyndep files for all our dependencies have already // been generated so that the '<LANG>Modules.json' files they // produced as side-effects are available for us to read. @@ -908,11 +901,9 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatements() // refactoring the Ninja generator to generate targets in // dependency order so that we can collect the needed information. this->GetLocalGenerator()->AppendTargetDepends( - this->GeneratorTarget, ddOrderOnlyDeps, DependOnTargetArtifact); + this->GeneratorTarget, build.OrderOnlyDeps, DependOnTargetArtifact); - this->GetGlobalGenerator()->WriteBuild( - this->GetBuildFileStream(), ddComment, ddRule, ddOutputs, ddImplicitOuts, - ddExplicitDeps, ddImplicitDeps, ddOrderOnlyDeps, ddVars); + this->GetGlobalGenerator()->WriteBuild(this->GetBuildFileStream(), build); } this->GetBuildFileStream() << "\n"; |