summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallCommand.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/cmInstallCommand.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/cmInstallCommand.cxx')
-rw-r--r--Source/cmInstallCommand.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx
index 9b931f7..11d2c4b 100644
--- a/Source/cmInstallCommand.cxx
+++ b/Source/cmInstallCommand.cxx
@@ -755,7 +755,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
te->ObjectsGenerator = objectGenerator;
this->Makefile->GetGlobalGenerator()
->GetExportSets()[exports]
- ->AddTargetExport(te);
+ .AddTargetExport(te);
te->InterfaceIncludeDirectories =
cmJoin(includesArgs.GetIncludeDirs(), ";");
@@ -1333,7 +1333,7 @@ bool cmInstallCommand::HandleExportAndroidMKMode(
fname = "Android.mk";
}
- cmExportSet* exportSet =
+ cmExportSet& exportSet =
this->Makefile->GetGlobalGenerator()->GetExportSets()[exp];
cmInstallGenerator::MessageLevel message =
@@ -1341,7 +1341,7 @@ bool cmInstallCommand::HandleExportAndroidMKMode(
// Create the export install generator.
cmInstallExportGenerator* exportGenerator = new cmInstallExportGenerator(
- exportSet, ica.GetDestination().c_str(), ica.GetPermissions().c_str(),
+ &exportSet, ica.GetDestination().c_str(), ica.GetPermissions().c_str(),
ica.GetConfigurations(), ica.GetComponent().c_str(), message,
ica.GetExcludeFromAll(), fname.c_str(), name_space.c_str(), exportOld,
true);
@@ -1430,10 +1430,10 @@ bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args)
}
}
- cmExportSet* exportSet =
+ cmExportSet& exportSet =
this->Makefile->GetGlobalGenerator()->GetExportSets()[exp];
if (exportOld) {
- for (cmTargetExport* te : *exportSet->GetTargetExports()) {
+ for (cmTargetExport* te : *exportSet.GetTargetExports()) {
cmTarget* tgt =
this->Makefile->GetGlobalGenerator()->FindTarget(te->TargetName);
const bool newCMP0022Behavior =
@@ -1457,7 +1457,7 @@ bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args)
// Create the export install generator.
cmInstallExportGenerator* exportGenerator = new cmInstallExportGenerator(
- exportSet, ica.GetDestination().c_str(), ica.GetPermissions().c_str(),
+ &exportSet, ica.GetDestination().c_str(), ica.GetPermissions().c_str(),
ica.GetConfigurations(), ica.GetComponent().c_str(), message,
ica.GetExcludeFromAll(), fname.c_str(), name_space.c_str(), exportOld,
false);