FIX: foreach function-blockers were using expanded args. Add virtual func to specify if function blocker needs them expanded or not.

This commit is contained in:
Sebastien Barre 2002-03-26 16:45:52 -05:00
parent ccbdc30a8c
commit 437a8c9816
3 changed files with 16 additions and 2 deletions

View File

@ -39,6 +39,8 @@ public:
cmMakefile &mf); cmMakefile &mf);
virtual void ScopeEnded(cmMakefile &mf); virtual void ScopeEnded(cmMakefile &mf);
virtual int NeedExpandedVariables () { return 0; };
std::vector<std::string> m_Args; std::vector<std::string> m_Args;
std::vector<std::string> m_Commands; std::vector<std::string> m_Commands;
std::vector<std::vector<std::string> > m_CommandArguments; std::vector<std::vector<std::string> > m_CommandArguments;

View File

@ -50,6 +50,8 @@ public:
virtual void ScopeEnded(cmMakefile &mf) {} virtual void ScopeEnded(cmMakefile &mf) {}
virtual ~cmFunctionBlocker() {} virtual ~cmFunctionBlocker() {}
virtual int NeedExpandedVariables () { return 1; };
}; };
#endif #endif

View File

@ -1187,9 +1187,19 @@ bool cmMakefile::IsFunctionBlocked(const char *name,
for (pos = m_FunctionBlockers.begin(); for (pos = m_FunctionBlockers.begin();
pos != m_FunctionBlockers.end(); ++pos) pos != m_FunctionBlockers.end(); ++pos)
{ {
if ((*pos)->IsFunctionBlocked(name, expandedArguments, *this)) if ((*pos)->NeedExpandedVariables())
{ {
return true; if ((*pos)->IsFunctionBlocked(name, expandedArguments, *this))
{
return true;
}
}
else
{
if ((*pos)->IsFunctionBlocked(name, args, *this))
{
return true;
}
} }
} }