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/cmExportInstallFileGenerator.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/cmExportInstallFileGenerator.cxx')
-rw-r--r-- | Source/cmExportInstallFileGenerator.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index 4e3db09..c5aec64 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -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(); |