summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-03-05 23:41:24 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2002-03-05 23:41:24 (GMT)
commit4651dbcfc64836988649c2ca7e3e30c811723eb2 (patch)
tree78393201554f92b9e59bc8c5893f6e28a2ab2dbb /Source/cmMakefile.cxx
parent2b9140f6b512784f65dfa58ff1b9076fd6f9227d (diff)
downloadCMake-4651dbcfc64836988649c2ca7e3e30c811723eb2.zip
CMake-4651dbcfc64836988649c2ca7e3e30c811723eb2.tar.gz
CMake-4651dbcfc64836988649c2ca7e3e30c811723eb2.tar.bz2
ENH: expand variables in arguments before the commands get them
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx16
1 files changed, 14 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index d863ca3..95a0658 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -210,7 +210,13 @@ void cmMakefile::ExecuteCommand(std::string &name,
// if the command is inherited then InitialPass it.
if(!m_Inheriting || usedCommand->IsInherited())
{
- if(!usedCommand->InitialPass(arguments))
+ std::vector<std::string> expandedArguments = arguments;
+ for(std::vector<std::string>::iterator i = expandedArguments.begin();
+ i != expandedArguments.end(); ++i)
+ {
+ this->ExpandVariablesInString(*i);
+ }
+ if(!usedCommand->InitialPass(expandedArguments))
{
cmSystemTools::Error(usedCommand->GetName(),
": Error : \n",
@@ -1171,10 +1177,16 @@ bool cmMakefile::IsFunctionBlocked(const char *name,
{
// loop over all function blockers to see if any block this command
std::set<cmFunctionBlocker *>::const_iterator pos;
+ std::vector<std::string> expandedArguments = args;
+ for(std::vector<std::string>::iterator i = expandedArguments.begin();
+ i != expandedArguments.end(); ++i)
+ {
+ this->ExpandVariablesInString(*i);
+ }
for (pos = m_FunctionBlockers.begin();
pos != m_FunctionBlockers.end(); ++pos)
{
- if ((*pos)->IsFunctionBlocked(name, args, *this))
+ if ((*pos)->IsFunctionBlocked(name, expandedArguments, *this))
{
return true;
}