diff options
author | Brad King <brad.king@kitware.com> | 2021-05-18 15:43:11 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-05-19 16:07:58 (GMT) |
commit | 68e5f92cada35068f71a8c46388aeb4eb1383bca (patch) | |
tree | 0dc3f33c8c7a3b8bc86d6360b819924b7ddc65df /Source/cmGlobalNinjaGenerator.h | |
parent | c5195193d3525dc2b661757e0039486e39b94f27 (diff) | |
download | CMake-68e5f92cada35068f71a8c46388aeb4eb1383bca.zip CMake-68e5f92cada35068f71a8c46388aeb4eb1383bca.tar.gz CMake-68e5f92cada35068f71a8c46388aeb4eb1383bca.tar.bz2 |
cmGlobalNinjaGenerator: Factor out custom command output collection
De-duplicate code paths calling ConvertToNinjaPath and
SeenCustomCommandOutput on custom command outputs and custom target
byproducts.
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.h')
-rw-r--r-- | Source/cmGlobalNinjaGenerator.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 6fbdb82..2833367 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -110,13 +110,26 @@ public: void WriteBuild(std::ostream& os, cmNinjaBuild const& build, int cmdLineLimit = 0, bool* usedResponseFile = nullptr); + class CCOutputs + { + cmGlobalNinjaGenerator* GG; + + public: + CCOutputs(cmGlobalNinjaGenerator* gg) + : GG(gg) + { + } + void Add(std::vector<std::string> const& outputs); + cmNinjaDeps ExplicitOuts; + }; + void WriteCustomCommandBuild(std::string const& command, std::string const& description, std::string const& comment, std::string const& depfile, std::string const& pool, bool uses_terminal, bool restat, std::string const& config, - cmNinjaDeps outputs, + CCOutputs outputs, cmNinjaDeps explicitDeps = cmNinjaDeps(), cmNinjaDeps orderOnlyDeps = cmNinjaDeps()); |