diff options
author | Tushar Maheshwari <tushar27192@gmail.com> | 2019-09-06 10:16:02 (GMT) |
---|---|---|
committer | Tushar Maheshwari <tushar27192@gmail.com> | 2019-09-19 13:50:29 (GMT) |
commit | 9b8a1f7c28deac892493b0a5548b08b2003238ea (patch) | |
tree | 72c22cba36879fded9bf99b94e75c2329281a048 /Source/cmExportCommand.cxx | |
parent | cca5897318d5c747078f79cd5bb45ba74955102a (diff) | |
download | CMake-9b8a1f7c28deac892493b0a5548b08b2003238ea.zip CMake-9b8a1f7c28deac892493b0a5548b08b2003238ea.tar.gz CMake-9b8a1f7c28deac892493b0a5548b08b2003238ea.tar.bz2 |
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.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx index 4046f91..66dcb97 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); |