CreateRulePlaceholderExpander(): enhance memory management

This method returns now a std::unique_ptr instance rather than a raw pointer.
This commit is contained in:
Marc Chevrier
2023-05-01 19:12:46 +02:00
parent 0d2d5a229c
commit 72faa9a017
10 changed files with 39 additions and 41 deletions
@@ -232,8 +232,8 @@ void cmMakefileExecutableTargetGenerator::WriteNvidiaDeviceExecutableRule(
launcher = cmStrCat(val, ' ');
}
std::unique_ptr<cmRulePlaceholderExpander> rulePlaceholderExpander(
this->LocalGenerator->CreateRulePlaceholderExpander());
auto rulePlaceholderExpander =
this->LocalGenerator->CreateRulePlaceholderExpander();
// Expand placeholders in the commands.
rulePlaceholderExpander->SetTargetImpLib(targetOutput);
@@ -598,8 +598,8 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
launcher = cmStrCat(val, ' ');
}
std::unique_ptr<cmRulePlaceholderExpander> rulePlaceholderExpander(
this->LocalGenerator->CreateRulePlaceholderExpander());
auto rulePlaceholderExpander =
this->LocalGenerator->CreateRulePlaceholderExpander();
// Expand placeholders in the commands.
rulePlaceholderExpander->SetTargetImpLib(targetOutPathImport);