ENH: Keep only FinalPass commands in memory
In cmMakefile we save all invoked commands so that FinalPass can be called on them later. Most commands have no final pass, so we should keep only the few that do.
This commit is contained in:
parent
071ce33ec9
commit
71c0e1417b
|
@ -87,6 +87,11 @@ public:
|
|||
* 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.
|
||||
|
|
|
@ -81,6 +81,7 @@ public:
|
|||
}
|
||||
|
||||
virtual void FinalPass();
|
||||
virtual bool HasFinalPass() const { return !this->Immediate; }
|
||||
private:
|
||||
int ConfigureFile();
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ public:
|
|||
* specified by the command is accumulated.
|
||||
*/
|
||||
virtual void FinalPass();
|
||||
virtual bool HasFinalPass() const { return true; }
|
||||
|
||||
/**
|
||||
* The name of the command as specified in CMakeList.txt.
|
||||
|
|
|
@ -52,6 +52,7 @@ public:
|
|||
* writing to the cache can be done.
|
||||
*/
|
||||
virtual void FinalPass();
|
||||
virtual bool HasFinalPass() const { return true; }
|
||||
|
||||
/**
|
||||
* The name of the command as specified in CMakeList.txt.
|
||||
|
|
|
@ -63,6 +63,7 @@ public:
|
|||
* writing to the cache can be done.
|
||||
*/
|
||||
virtual void FinalPass();
|
||||
virtual bool HasFinalPass() const { return !this->IsFilesForm; }
|
||||
|
||||
/**
|
||||
* More documentation.
|
||||
|
|
|
@ -64,6 +64,8 @@ public:
|
|||
*/
|
||||
virtual void FinalPass();
|
||||
|
||||
virtual bool HasFinalPass() const { return true; }
|
||||
|
||||
/**
|
||||
* More documentation.
|
||||
*/
|
||||
|
|
|
@ -68,6 +68,8 @@ public:
|
|||
* writing to the cache can be done.
|
||||
*/
|
||||
virtual void FinalPass();
|
||||
virtual bool HasFinalPass() const
|
||||
{ return this->info.FinalPass? true:false; }
|
||||
|
||||
/**
|
||||
* The name of the command as specified in CMakeList.txt.
|
||||
|
|
|
@ -415,7 +415,7 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff,
|
|||
cmSystemTools::SetFatalErrorOccured();
|
||||
}
|
||||
}
|
||||
else
|
||||
else if(pcmd->HasFinalPass())
|
||||
{
|
||||
// use the command
|
||||
this->UsedCommands.push_back(pcmd.release());
|
||||
|
|
Loading…
Reference in New Issue