diff options
-rw-r--r-- | Source/cmForEachCommand.h | 2 | ||||
-rw-r--r-- | Source/cmFunctionBlocker.h | 2 | ||||
-rw-r--r-- | Source/cmMakefile.cxx | 14 |
3 files changed, 16 insertions, 2 deletions
diff --git a/Source/cmForEachCommand.h b/Source/cmForEachCommand.h index 5026035..064e30b 100644 --- a/Source/cmForEachCommand.h +++ b/Source/cmForEachCommand.h @@ -39,6 +39,8 @@ public: cmMakefile &mf); virtual void ScopeEnded(cmMakefile &mf); + virtual int NeedExpandedVariables () { return 0; }; + std::vector<std::string> m_Args; std::vector<std::string> m_Commands; std::vector<std::vector<std::string> > m_CommandArguments; diff --git a/Source/cmFunctionBlocker.h b/Source/cmFunctionBlocker.h index 2432dab..ab6f09d 100644 --- a/Source/cmFunctionBlocker.h +++ b/Source/cmFunctionBlocker.h @@ -50,6 +50,8 @@ public: virtual void ScopeEnded(cmMakefile &mf) {} virtual ~cmFunctionBlocker() {} + + virtual int NeedExpandedVariables () { return 1; }; }; #endif diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 6dd3caf..aa2b80b 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1187,9 +1187,19 @@ bool cmMakefile::IsFunctionBlocked(const char *name, for (pos = m_FunctionBlockers.begin(); 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; + } } } |