Commit 732dd344 authored by Daniel Pfeifer's avatar Daniel Pfeifer Committed by wahikihiki

cmCommand: remove FinalPass from interface

parent fbee46e2
...@@ -60,19 +60,6 @@ public: ...@@ -60,19 +60,6 @@ public:
virtual bool InitialPass(std::vector<std::string> const& args, virtual bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus&) = 0; cmExecutionStatus&) = 0;
/**
* 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.
*/
virtual void FinalPass() {}
/**
* Does this command have a final pass? Query after InitialPass.
*/
virtual bool HasFinalPass() const { return false; }
/** /**
* This is a virtual constructor for the command. * This is a virtual constructor for the command.
*/ */
......
...@@ -38,10 +38,6 @@ public: ...@@ -38,10 +38,6 @@ public:
bool InitialPass(std::vector<std::string> const& args, bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus& status) override; cmExecutionStatus& status) override;
void FinalPass() override { this->Command->FinalPass(); }
bool HasFinalPass() const override { return this->Command->HasFinalPass(); }
private: private:
std::unique_ptr<cmCommand> Command; std::unique_ptr<cmCommand> Command;
cmPolicies::PolicyID Policy; cmPolicies::PolicyID Policy;
......
...@@ -355,20 +355,6 @@ private: ...@@ -355,20 +355,6 @@ private:
cmMakefile* Makefile; cmMakefile* Makefile;
}; };
class cmFinalPassAction
{
public:
cmFinalPassAction(std::unique_ptr<cmCommand> command)
: Command(std::move(command))
{
}
void operator()(cmMakefile&) { this->Command->FinalPass(); }
private:
std::shared_ptr<cmCommand> Command;
};
bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff, bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff,
cmExecutionStatus& status) cmExecutionStatus& status)
{ {
...@@ -429,9 +415,6 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff, ...@@ -429,9 +415,6 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff,
if (this->GetCMakeInstance()->GetWorkingMode() != cmake::NORMAL_MODE) { if (this->GetCMakeInstance()->GetWorkingMode() != cmake::NORMAL_MODE) {
cmSystemTools::SetFatalErrorOccured(); cmSystemTools::SetFatalErrorOccured();
} }
} else if (pcmd->HasFinalPass()) {
// use the command
this->AddFinalAction(cmFinalPassAction(std::move(pcmd)));
} }
} }
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment