summaryrefslogtreecommitdiffstats
path: root/Source/cmExportInstallFileGenerator.cxx
diff options
context:
space:
mode:
authorTushar Maheshwari <tushar27192@gmail.com>2019-09-06 10:16:02 (GMT)
committerTushar Maheshwari <tushar27192@gmail.com>2019-09-19 13:50:29 (GMT)
commit9b8a1f7c28deac892493b0a5548b08b2003238ea (patch)
tree72c22cba36879fded9bf99b94e75c2329281a048 /Source/cmExportInstallFileGenerator.cxx
parentcca5897318d5c747078f79cd5bb45ba74955102a (diff)
downloadCMake-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.cxx7
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();