mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-03 21:00:01 -05:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user