cmExportSetMap: improve ownership of cmExportSet

- use `std::piecewise_construct` to fix gcc-4.8 build.
- can use `emplace(name, name)` gcc-6 onwards.
This commit is contained in:
Tushar Maheshwari
2019-09-06 15:46:02 +05:30
parent cca5897318
commit 9b8a1f7c28
5 changed files with 22 additions and 47 deletions
+3 -4
View File
@@ -474,9 +474,8 @@ cmExportInstallFileGenerator::FindNamespaces(cmGlobalGenerator* gg,
const cmExportSetMap& exportSets = gg->GetExportSets();
for (auto const& expIt : exportSets) {
const cmExportSet* exportSet = expIt.second;
std::vector<cmTargetExport*> const* targets =
exportSet->GetTargetExports();
const cmExportSet& exportSet = expIt.second;
std::vector<cmTargetExport*> const* targets = exportSet.GetTargetExports();
bool containsTarget = false;
for (cmTargetExport* target : *targets) {
@@ -488,7 +487,7 @@ cmExportInstallFileGenerator::FindNamespaces(cmGlobalGenerator* gg,
if (containsTarget) {
std::vector<cmInstallExportGenerator const*> const* installs =
exportSet->GetInstallations();
exportSet.GetInstallations();
for (cmInstallExportGenerator const* install : *installs) {
exportFiles.push_back(install->GetDestinationFile());
ns = install->GetNamespace();