summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-05-18 15:09:22 (GMT)
committerBrad King <brad.king@kitware.com>2021-05-19 16:07:58 (GMT)
commitc5195193d3525dc2b661757e0039486e39b94f27 (patch)
treee1842c940ea33eb89ce7a78dbeac2bf3a5c551cb /Source/cmGlobalNinjaGenerator.h
parent8bac527b0c8ada5c40171cf01f673f9597ffdb90 (diff)
downloadCMake-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.h16
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);