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:
parent
ccbdc30a8c
commit
437a8c9816
|
@ -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;
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue