summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-01-21 12:51:46 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-01-21 12:51:54 (GMT)
commit4dba5d6ce251257259874bce394b2fba954e200c (patch)
treef775a504eb80d0383231fb99eb301a962a989fb2 /Source/cmGlobalNinjaGenerator.cxx
parent7e5f9b192e9c3ed7130e1e52b7f9d3243f51e2ab (diff)
parentef61997b1be5c2f542472f8eb48dac62cd26bf5c (diff)
downloadCMake-4dba5d6ce251257259874bce394b2fba954e200c.zip
CMake-4dba5d6ce251257259874bce394b2fba954e200c.tar.gz
CMake-4dba5d6ce251257259874bce394b2fba954e200c.tar.bz2
Merge topic 'use-emplace'
ef61997b1b clang-tidy: Use emplace 2e5307a2a4 CTestSVN: Accept std::string in SVNInfo constructor Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2811
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index e7b0981..23dbd76 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -550,7 +550,7 @@ bool cmGlobalNinjaGenerator::FindMakeProgram(cmMakefile* mf)
this->NinjaCommand = ninjaCommand;
std::vector<std::string> command;
command.push_back(this->NinjaCommand);
- command.push_back("--version");
+ command.emplace_back("--version");
std::string version;
std::string error;
if (!cmSystemTools::RunSingleCommand(command, &version, &error, nullptr,
@@ -681,12 +681,12 @@ void cmGlobalNinjaGenerator::GenerateBuildCommand(
makeCommand.push_back(this->SelectMakeProgram(makeProgram));
if (verbose) {
- makeCommand.push_back("-v");
+ makeCommand.emplace_back("-v");
}
if ((jobs != cmake::NO_BUILD_PARALLEL_LEVEL) &&
(jobs != cmake::DEFAULT_BUILD_PARALLEL_LEVEL)) {
- makeCommand.push_back("-j");
+ makeCommand.emplace_back("-j");
makeCommand.push_back(std::to_string(jobs));
}
@@ -694,8 +694,8 @@ void cmGlobalNinjaGenerator::GenerateBuildCommand(
makeOptions.end());
if (!targetName.empty()) {
if (targetName == "clean") {
- makeCommand.push_back("-t");
- makeCommand.push_back("clean");
+ makeCommand.emplace_back("-t");
+ makeCommand.emplace_back("clean");
} else {
makeCommand.push_back(targetName);
}