mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
ENH: Refactor function blocker deletion
When a function blocker decides to remove itself we previously removed it at every return point from the C++ scope in which its removal is needed. This teaches function blockers to transfer ownership of themselves from cmMakefile to an automatic variable for deletion on return. Since this removes blockers before they replay their commands, we no longer need to avoid running blockers on their own commands.
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
class cmForEachFunctionBlocker : public cmFunctionBlocker
|
||||
{
|
||||
public:
|
||||
cmForEachFunctionBlocker() {this->Executing = false; Depth = 0;}
|
||||
cmForEachFunctionBlocker() {this->Depth = 0;}
|
||||
virtual ~cmForEachFunctionBlocker() {}
|
||||
virtual bool IsFunctionBlocked(const cmListFileFunction& lff,
|
||||
cmMakefile &mf,
|
||||
@@ -39,7 +39,6 @@ public:
|
||||
|
||||
std::vector<std::string> Args;
|
||||
std::vector<cmListFileFunction> Functions;
|
||||
bool Executing;
|
||||
private:
|
||||
int Depth;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user