diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-05-30 11:46:04 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-05-30 16:38:19 (GMT) |
commit | 43af4ca78e80c65d3c0cf2c5121d61988e9d5192 (patch) | |
tree | 10bf147670555b219915cd693343455c49de9ecf /Source/cmGlobalNinjaGenerator.cxx | |
parent | e762da6dc98474a71d0e69866ec3800af3117466 (diff) | |
download | CMake-43af4ca78e80c65d3c0cf2c5121d61988e9d5192.zip CMake-43af4ca78e80c65d3c0cf2c5121d61988e9d5192.tar.gz CMake-43af4ca78e80c65d3c0cf2c5121d61988e9d5192.tar.bz2 |
Ninja: Use cmNinjaBuild instead of WritePhonyBuild
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index ef06ebe..8cfbae3 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -1096,6 +1096,8 @@ void cmGlobalNinjaGenerator::WriteTargetAliases(std::ostream& os) cmGlobalNinjaGenerator::WriteDivider(os); os << "# Target aliases.\n\n"; + cmNinjaBuild build("phony"); + build.Outputs.emplace_back(""); for (auto const& ta : TargetAliases) { // Don't write ambiguous aliases. if (!ta.second) { @@ -1108,10 +1110,13 @@ void cmGlobalNinjaGenerator::WriteTargetAliases(std::ostream& os) continue; } - cmNinjaDeps deps; - this->AppendTargetOutputs(ta.second, deps); - - this->WritePhonyBuild(os, "", cmNinjaDeps(1, ta.first), deps); + // Outputs + build.Outputs[0] = ta.first; + // Explicit depdendencies + build.ExplicitDeps.clear(); + this->AppendTargetOutputs(ta.second, build.ExplicitDeps); + // Write + this->WriteBuild(os, build); } } |