cmMakefile: Move cmMakefileCall to .cxx file

This commit is contained in:
Brad King 2016-04-14 11:02:40 -04:00
parent a559f0f6b0
commit b6ed71b17c
2 changed files with 20 additions and 26 deletions

View File

@ -222,6 +222,26 @@ void cmMakefile::PrintCommandTrace(const cmListFileFunction& lff) const
cmSystemTools::Message(msg.str().c_str()); cmSystemTools::Message(msg.str().c_str());
} }
// Helper class to make sure the call stack is valid.
class cmMakefileCall
{
public:
cmMakefileCall(cmMakefile* mf, const cmCommandContext& lfc,
cmExecutionStatus& status): Makefile(mf)
{
this->Makefile->ContextStack.push_back(&lfc);
this->Makefile->ExecutionStatusStack.push_back(&status);
}
~cmMakefileCall()
{
this->Makefile->ExecutionStatusStack.pop_back();
this->Makefile->ContextStack.pop_back();
}
private:
cmMakefile* Makefile;
};
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff, bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff,
cmExecutionStatus &status) cmExecutionStatus &status)
@ -5148,16 +5168,3 @@ cmMakefile::MacroPushPop::~MacroPushPop()
{ {
this->Makefile->PopMacroScope(this->ReportError); this->Makefile->PopMacroScope(this->ReportError);
} }
cmMakefileCall::cmMakefileCall(cmMakefile* mf, const cmCommandContext& lfc,
cmExecutionStatus& status): Makefile(mf)
{
this->Makefile->ContextStack.push_back(&lfc);
this->Makefile->ExecutionStatusStack.push_back(&status);
}
cmMakefileCall::~cmMakefileCall()
{
this->Makefile->ExecutionStatusStack.pop_back();
this->Makefile->ContextStack.pop_back();
}

View File

@ -959,17 +959,4 @@ private:
mutable bool SuppressWatches; mutable bool SuppressWatches;
}; };
//----------------------------------------------------------------------------
// Helper class to make sure the call stack is valid.
class cmMakefileCall
{
public:
cmMakefileCall(cmMakefile* mf,
cmCommandContext const& lfc,
cmExecutionStatus& status);
~cmMakefileCall();
private:
cmMakefile* Makefile;
};
#endif #endif