diff options
author | Sebastien Barre <sebastien.barre@kitware.com> | 2002-03-26 21:45:52 (GMT) |
---|---|---|
committer | Sebastien Barre <sebastien.barre@kitware.com> | 2002-03-26 21:45:52 (GMT) |
commit | 437a8c98165f4b19745ba0ffcd455171a58a1e8b (patch) | |
tree | e8cba5a39f3f8ba0606739a96f16af04283d322f | |
parent | ccbdc30a8c9c1f763efecf19a0f15f1d1b43e74f (diff) | |
download | CMake-437a8c98165f4b19745ba0ffcd455171a58a1e8b.zip CMake-437a8c98165f4b19745ba0ffcd455171a58a1e8b.tar.gz CMake-437a8c98165f4b19745ba0ffcd455171a58a1e8b.tar.bz2 |
FIX: foreach function-blockers were using expanded args. Add virtual func to specify if function blocker needs them expanded or not.
-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; + } } } |