summaryrefslogtreecommitdiff
path: root/Source/cmExportCommand.cxx
diff options
context:
space:
mode:
authorTushar Maheshwari <tushar27192@gmail.com>2019-09-06 15:46:02 +0530
committerTushar Maheshwari <tushar27192@gmail.com>2019-09-19 19:20:29 +0530
commit9b8a1f7c28deac892493b0a5548b08b2003238ea (patch)
tree72c22cba36879fded9bf99b94e75c2329281a048 /Source/cmExportCommand.cxx
parentcca5897318d5c747078f79cd5bb45ba74955102a (diff)
downloadcmake-9b8a1f7c28deac892493b0a5548b08b2003238ea.tar.gz
cmExportSetMap: improve ownership of cmExportSet
- use `std::piecewise_construct` to fix gcc-4.8 build. - can use `emplace(name, name)` gcc-6 onwards.
Diffstat (limited to 'Source/cmExportCommand.cxx')
-rw-r--r--Source/cmExportCommand.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx
index 4046f91c47..66dcb97efa 100644
--- a/Source/cmExportCommand.cxx
+++ b/Source/cmExportCommand.cxx
@@ -121,7 +121,7 @@ bool cmExportCommand::InitialPass(std::vector<std::string> const& args,
cmGlobalGenerator* gg = this->Makefile->GetGlobalGenerator();
- cmExportSet* ExportSet = nullptr;
+ cmExportSet* exportSet = nullptr;
if (args[0] == "EXPORT") {
cmExportSetMap& setMap = gg->GetExportSets();
auto const it = setMap.find(arguments.ExportSetName);
@@ -131,7 +131,7 @@ bool cmExportCommand::InitialPass(std::vector<std::string> const& args,
this->SetError(e.str());
return false;
}
- ExportSet = it->second;
+ exportSet = &it->second;
} else if (!arguments.Targets.empty() ||
cmContains(keywordsMissingValue, "TARGETS")) {
for (std::string const& currentTarget : arguments.Targets) {
@@ -180,8 +180,8 @@ bool cmExportCommand::InitialPass(std::vector<std::string> const& args,
ebfg->SetExportFile(fname.c_str());
ebfg->SetNamespace(arguments.Namespace);
ebfg->SetAppendMode(arguments.Append);
- if (ExportSet != nullptr) {
- ebfg->SetExportSet(ExportSet);
+ if (exportSet != nullptr) {
+ ebfg->SetExportSet(exportSet);
} else {
ebfg->SetTargets(targets);
}
@@ -197,7 +197,7 @@ bool cmExportCommand::InitialPass(std::vector<std::string> const& args,
for (std::string const& ct : configurationTypes) {
ebfg->AddConfiguration(ct);
}
- if (ExportSet != nullptr) {
+ if (exportSet != nullptr) {
gg->AddBuildExportExportSet(ebfg);
} else {
gg->AddBuildExportSet(ebfg);