diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2017-01-05 22:41:01 (GMT) |
---|---|---|
committer | Regina Pfeifer <regina@mailbox.org> | 2019-07-18 15:35:43 (GMT) |
commit | 360d4155920b851f114843e91234bb0ae33afef3 (patch) | |
tree | d7c1dce39aeaf003f8380c45cbe504d52b96da22 /Source/cmLoadCommandCommand.cxx | |
parent | 316e40baec978980c9023532f4dade1e5ea0ad48 (diff) | |
download | CMake-360d4155920b851f114843e91234bb0ae33afef3.zip CMake-360d4155920b851f114843e91234bb0ae33afef3.tar.gz CMake-360d4155920b851f114843e91234bb0ae33afef3.tar.bz2 |
cmLoadCommandCommand: Port away from FinalPass
Diffstat (limited to 'Source/cmLoadCommandCommand.cxx')
-rw-r--r-- | Source/cmLoadCommandCommand.cxx | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/Source/cmLoadCommandCommand.cxx b/Source/cmLoadCommandCommand.cxx index 2697f44..f5da2ee 100644 --- a/Source/cmLoadCommandCommand.cxx +++ b/Source/cmLoadCommandCommand.cxx @@ -126,18 +126,6 @@ public: bool InitialPass(std::vector<std::string> const& args, cmExecutionStatus&) override; - /** - * This is called at the end after all the information - * specified by the command is accumulated. Most commands do - * not implement this method. At this point, reading and - * writing to the cache can be done. - */ - void FinalPass() override; - bool HasFinalPass() const override - { - return this->Impl->FinalPass != nullptr; - } - private: std::shared_ptr<LoadedCommandImpl> Impl; }; @@ -168,6 +156,11 @@ bool cmLoadedCommand::InitialPass(std::vector<std::string> const& args, cmFreeArguments(argc, argv); if (result) { + if (this->Impl->FinalPass) { + auto impl = this->Impl; + this->Makefile->AddFinalAction( + [impl](cmMakefile& makefile) { impl->DoFinalPass(&makefile); }); + } return true; } @@ -178,13 +171,6 @@ bool cmLoadedCommand::InitialPass(std::vector<std::string> const& args, return false; } -void cmLoadedCommand::FinalPass() -{ - if (this->Impl->FinalPass) { - this->Impl->DoFinalPass(this->Makefile); - } -} - } // namespace // cmLoadCommandCommand |