|
@@ -13,6 +13,17 @@
|
|
|
|
|
|
|
|
#include <cmsys/auto_ptr.hxx>
|
|
#include <cmsys/auto_ptr.hxx>
|
|
|
|
|
|
|
|
|
|
+cmForEachFunctionBlocker::cmForEachFunctionBlocker(cmMakefile* mf):
|
|
|
|
|
+ Makefile(mf), Depth(0)
|
|
|
|
|
+{
|
|
|
|
|
+ this->Makefile->PushLoopBlock();
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+cmForEachFunctionBlocker::~cmForEachFunctionBlocker()
|
|
|
|
|
+{
|
|
|
|
|
+ this->Makefile->PopLoopBlock();
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
bool cmForEachFunctionBlocker::
|
|
bool cmForEachFunctionBlocker::
|
|
|
IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf,
|
|
IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf,
|
|
|
cmExecutionStatus &inStatus)
|
|
cmExecutionStatus &inStatus)
|
|
@@ -27,8 +38,6 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf,
|
|
|
// if this is the endofreach for this statement
|
|
// if this is the endofreach for this statement
|
|
|
if (!this->Depth)
|
|
if (!this->Depth)
|
|
|
{
|
|
{
|
|
|
- cmMakefile::LoopBlockPop loopBlockPop(&mf);
|
|
|
|
|
-
|
|
|
|
|
// Remove the function blocker for this scope or bail.
|
|
// Remove the function blocker for this scope or bail.
|
|
|
cmsys::auto_ptr<cmFunctionBlocker>
|
|
cmsys::auto_ptr<cmFunctionBlocker>
|
|
|
fb(mf.RemoveFunctionBlocker(this, lff));
|
|
fb(mf.RemoveFunctionBlocker(this, lff));
|
|
@@ -128,7 +137,7 @@ bool cmForEachCommand
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// create a function blocker
|
|
// create a function blocker
|
|
|
- cmForEachFunctionBlocker *f = new cmForEachFunctionBlocker();
|
|
|
|
|
|
|
+ cmForEachFunctionBlocker *f = new cmForEachFunctionBlocker(this->Makefile);
|
|
|
if ( args.size() > 1 )
|
|
if ( args.size() > 1 )
|
|
|
{
|
|
{
|
|
|
if ( args[1] == "RANGE" )
|
|
if ( args[1] == "RANGE" )
|
|
@@ -204,15 +213,14 @@ bool cmForEachCommand
|
|
|
}
|
|
}
|
|
|
this->Makefile->AddFunctionBlocker(f);
|
|
this->Makefile->AddFunctionBlocker(f);
|
|
|
|
|
|
|
|
- this->Makefile->PushLoopBlock();
|
|
|
|
|
-
|
|
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
//----------------------------------------------------------------------------
|
|
|
bool cmForEachCommand::HandleInMode(std::vector<std::string> const& args)
|
|
bool cmForEachCommand::HandleInMode(std::vector<std::string> const& args)
|
|
|
{
|
|
{
|
|
|
- cmsys::auto_ptr<cmForEachFunctionBlocker> f(new cmForEachFunctionBlocker());
|
|
|
|
|
|
|
+ cmsys::auto_ptr<cmForEachFunctionBlocker>
|
|
|
|
|
+ f(new cmForEachFunctionBlocker(this->Makefile));
|
|
|
f->Args.push_back(args[0]);
|
|
f->Args.push_back(args[0]);
|
|
|
|
|
|
|
|
enum Doing { DoingNone, DoingLists, DoingItems };
|
|
enum Doing { DoingNone, DoingLists, DoingItems };
|
|
@@ -250,7 +258,5 @@ bool cmForEachCommand::HandleInMode(std::vector<std::string> const& args)
|
|
|
|
|
|
|
|
this->Makefile->AddFunctionBlocker(f.release()); // TODO: pass auto_ptr
|
|
this->Makefile->AddFunctionBlocker(f.release()); // TODO: pass auto_ptr
|
|
|
|
|
|
|
|
- this->Makefile->PushLoopBlock();
|
|
|
|
|
-
|
|
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|