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:
Brad King
2009-01-20 14:36:18 -05:00
parent a541cac325
commit 2c81e5fb5c
8 changed files with 27 additions and 47 deletions

View File

@@ -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;
};