summaryrefslogtreecommitdiffstats
path: root/Source/cmProjectCommand.cxx
diff options
context:
space:
mode:
authorRegina Pfeifer <regina@mailbox.org>2019-01-16 06:13:07 (GMT)
committerBrad King <brad.king@kitware.com>2019-01-17 18:12:02 (GMT)
commitef61997b1be5c2f542472f8eb48dac62cd26bf5c (patch)
tree3d17442b633d74e8e18f4f4c48578f3b639d25be /Source/cmProjectCommand.cxx
parent2e5307a2a45d456b7fb52e4d3fab1416dc9a1bd8 (diff)
downloadCMake-ef61997b1be5c2f542472f8eb48dac62cd26bf5c.zip
CMake-ef61997b1be5c2f542472f8eb48dac62cd26bf5c.tar.gz
CMake-ef61997b1be5c2f542472f8eb48dac62cd26bf5c.tar.bz2
clang-tidy: Use emplace
Diffstat (limited to 'Source/cmProjectCommand.cxx')
-rw-r--r--Source/cmProjectCommand.cxx26
1 files changed, 13 insertions, 13 deletions
diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx
index 14e92c6..2fe9fe8 100644
--- a/Source/cmProjectCommand.cxx
+++ b/Source/cmProjectCommand.cxx
@@ -198,7 +198,7 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
return true;
}
if (haveLanguages && languages.empty()) {
- languages.push_back("NONE");
+ languages.emplace_back("NONE");
}
cmPolicies::PolicyStatus cmp0048 =
@@ -264,22 +264,22 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
} else if (cmp0048 != cmPolicies::OLD) {
// Set project VERSION variables to empty
std::vector<std::string> vv;
- vv.push_back("PROJECT_VERSION");
- vv.push_back("PROJECT_VERSION_MAJOR");
- vv.push_back("PROJECT_VERSION_MINOR");
- vv.push_back("PROJECT_VERSION_PATCH");
- vv.push_back("PROJECT_VERSION_TWEAK");
+ vv.emplace_back("PROJECT_VERSION");
+ vv.emplace_back("PROJECT_VERSION_MAJOR");
+ vv.emplace_back("PROJECT_VERSION_MINOR");
+ vv.emplace_back("PROJECT_VERSION_PATCH");
+ vv.emplace_back("PROJECT_VERSION_TWEAK");
vv.push_back(projectName + "_VERSION");
vv.push_back(projectName + "_VERSION_MAJOR");
vv.push_back(projectName + "_VERSION_MINOR");
vv.push_back(projectName + "_VERSION_PATCH");
vv.push_back(projectName + "_VERSION_TWEAK");
if (this->Makefile->IsRootMakefile()) {
- vv.push_back("CMAKE_PROJECT_VERSION");
- vv.push_back("CMAKE_PROJECT_VERSION_MAJOR");
- vv.push_back("CMAKE_PROJECT_VERSION_MINOR");
- vv.push_back("CMAKE_PROJECT_VERSION_PATCH");
- vv.push_back("CMAKE_PROJECT_VERSION_TWEAK");
+ vv.emplace_back("CMAKE_PROJECT_VERSION");
+ vv.emplace_back("CMAKE_PROJECT_VERSION_MAJOR");
+ vv.emplace_back("CMAKE_PROJECT_VERSION_MINOR");
+ vv.emplace_back("CMAKE_PROJECT_VERSION_PATCH");
+ vv.emplace_back("CMAKE_PROJECT_VERSION_TWEAK");
}
std::string vw;
for (std::string const& i : vv) {
@@ -315,8 +315,8 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
if (languages.empty()) {
// if no language is specified do c and c++
- languages.push_back("C");
- languages.push_back("CXX");
+ languages.emplace_back("C");
+ languages.emplace_back("CXX");
}
this->Makefile->EnableLanguage(languages, false);
std::string extraInclude = "CMAKE_PROJECT_" + projectName + "_INCLUDE";