From 437a8c98165f4b19745ba0ffcd455171a58a1e8b Mon Sep 17 00:00:00 2001 From: Sebastien Barre Date: Tue, 26 Mar 2002 16:45:52 -0500 Subject: [PATCH] FIX: foreach function-blockers were using expanded args. Add virtual func to specify if function blocker needs them expanded or not. --- Source/cmForEachCommand.h | 2 ++ Source/cmFunctionBlocker.h | 2 ++ Source/cmMakefile.cxx | 14 ++++++++++++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Source/cmForEachCommand.h b/Source/cmForEachCommand.h index 50260357e..064e30bc9 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 m_Args; std::vector m_Commands; std::vector > m_CommandArguments; diff --git a/Source/cmFunctionBlocker.h b/Source/cmFunctionBlocker.h index 2432dab8d..ab6f09dc3 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 6dd3cafd3..aa2b80be0 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; + } } }