diff options
author | Brad King <brad.king@kitware.com> | 2021-05-18 15:09:22 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-05-19 16:07:58 (GMT) |
commit | c5195193d3525dc2b661757e0039486e39b94f27 (patch) | |
tree | e1842c940ea33eb89ce7a78dbeac2bf3a5c551cb /Source/cmGlobalNinjaGenerator.h | |
parent | 8bac527b0c8ada5c40171cf01f673f9597ffdb90 (diff) | |
download | CMake-c5195193d3525dc2b661757e0039486e39b94f27.zip CMake-c5195193d3525dc2b661757e0039486e39b94f27.tar.gz CMake-c5195193d3525dc2b661757e0039486e39b94f27.tar.bz2 |
cmGlobalNinjaGenerator: Reduce string copies in WriteCustomCommandBuild
Re-order arguments to group those with similar roles.
Use move semantics to avoid copying vectors of strings.
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.h')
-rw-r--r-- | Source/cmGlobalNinjaGenerator.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 9f31708..6fbdb82 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -110,13 +110,15 @@ public: void WriteBuild(std::ostream& os, cmNinjaBuild const& build, int cmdLineLimit = 0, bool* usedResponseFile = nullptr); - void WriteCustomCommandBuild( - const std::string& command, const std::string& description, - const std::string& comment, const std::string& depfile, - const std::string& pool, bool uses_terminal, bool restat, - const cmNinjaDeps& outputs, const std::string& config, - const cmNinjaDeps& explicitDeps = cmNinjaDeps(), - const cmNinjaDeps& orderOnlyDeps = cmNinjaDeps()); + 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, + cmNinjaDeps explicitDeps = cmNinjaDeps(), + cmNinjaDeps orderOnlyDeps = cmNinjaDeps()); void WriteMacOSXContentBuild(std::string input, std::string output, const std::string& config); |