diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-05-30 09:15:07 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-05-30 14:44:30 (GMT) |
commit | 15c644437ae355ac196cfcfe1e874d8280451b43 (patch) | |
tree | a2801f85b58a74e3ebfc61b710d08dbce352d793 /Source | |
parent | 1b16d7656733a89d1d9735cf31654824b76aab9b (diff) | |
download | CMake-15c644437ae355ac196cfcfe1e874d8280451b43.zip CMake-15c644437ae355ac196cfcfe1e874d8280451b43.tar.gz CMake-15c644437ae355ac196cfcfe1e874d8280451b43.tar.bz2 |
Ninja: Add cmNinjaBuild based WriteBuild (wrapper) method
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 10 | ||||
-rw-r--r-- | Source/cmGlobalNinjaGenerator.h | 7 |
2 files changed, 17 insertions, 0 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 3fce29e..c362dc6 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -226,6 +226,16 @@ void cmGlobalNinjaGenerator::WriteBuild( os << buildstr << arguments << assignments; } +void cmGlobalNinjaGenerator::WriteBuild(std::ostream& os, + cmNinjaBuild const& build, + int cmdLineLimit, + bool* usedResponseFile) +{ + WriteBuild(os, build.Comment, build.Rule, build.Outputs, build.ImplicitOuts, + build.ExplicitDeps, build.ImplicitDeps, build.OrderOnlyDeps, + build.Variables, build.RspFile, cmdLineLimit, usedResponseFile); +} + void cmGlobalNinjaGenerator::WritePhonyBuild( std::ostream& os, const std::string& comment, const cmNinjaDeps& outputs, const cmNinjaDeps& explicitDeps, const cmNinjaDeps& implicitDeps, diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index dcc358b..037c20e 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -117,6 +117,13 @@ public: int cmdLineLimit = 0, bool* usedResponseFile = nullptr); /** + * Write a build statement @a build to @a os. + * @warning no escaping of any kind is done here. + */ + void WriteBuild(std::ostream& os, cmNinjaBuild const& build, + int cmdLineLimit = 0, bool* usedResponseFile = nullptr); + + /** * Helper to write a build statement with the special 'phony' rule. */ void WritePhonyBuild(std::ostream& os, const std::string& comment, |