diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2021-11-14 10:19:28 +0900 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-11-18 12:02:37 -0500 |
commit | 90e1206f253c0acbef37668403133585a31b2a92 (patch) | |
tree | 16a2265d0bf1032f9720adc350e865655efffa5d /Source/cmMakefile.cxx | |
parent | 9b31a977481ea07c979549246ee46946e9978e08 (diff) | |
download | cmake-90e1206f253c0acbef37668403133585a31b2a92.tar.gz |
cmMakefile: Introduce GeneratorAction as the class.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index e37632316c..e84e474aee 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -891,12 +891,18 @@ struct file_not_persistent }; } -void cmMakefile::AddGeneratorAction(GeneratorAction action) +void cmMakefile::AddGeneratorAction(GeneratorAction&& action) { assert(!this->GeneratorActionsInvoked); this->GeneratorActions.emplace_back(std::move(action), this->Backtrace); } +void cmMakefile::GeneratorAction::operator()(cmLocalGenerator& lg, + const cmListFileBacktrace& lfbt) +{ + Action(lg, lfbt); +} + void cmMakefile::DoGenerate(cmLocalGenerator& lg) { // do all the variable expansions here @@ -904,7 +910,7 @@ void cmMakefile::DoGenerate(cmLocalGenerator& lg) // give all the commands a chance to do something // after the file has been parsed before generation - for (const BT<GeneratorAction>& action : this->GeneratorActions) { + for (auto& action : this->GeneratorActions) { action.Value(lg, action.Backtrace); } this->GeneratorActionsInvoked = true; |