summaryrefslogtreecommitdiff
path: root/Source/cmAddCustomTargetCommand.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2001-06-26 13:23:55 -0400
committerKen Martin <ken.martin@kitware.com>2001-06-26 13:23:55 -0400
commitc84f6448a64a960c4bf7fb59e313b8afaea3c4e9 (patch)
treefaf584a2d259a62a8f0681ebbcf845b612ecf300 /Source/cmAddCustomTargetCommand.cxx
parent43ac1a3a86193fa72795e98e2d51d3f48209082b (diff)
downloadcmake-c84f6448a64a960c4bf7fb59e313b8afaea3c4e9.tar.gz
modified how paths are escaped, added depends
Diffstat (limited to 'Source/cmAddCustomTargetCommand.cxx')
-rw-r--r--Source/cmAddCustomTargetCommand.cxx17
1 files changed, 13 insertions, 4 deletions
diff --git a/Source/cmAddCustomTargetCommand.cxx b/Source/cmAddCustomTargetCommand.cxx
index 3f9a65d38e..6320ba6089 100644
--- a/Source/cmAddCustomTargetCommand.cxx
+++ b/Source/cmAddCustomTargetCommand.cxx
@@ -51,18 +51,27 @@ bool cmAddCustomTargetCommand::InitialPass(std::vector<std::string>& args)
return false;
}
m_Makefile->ExpandVariablesInString(args[0]);
- m_Makefile->ExpandVariablesInString(args[1]);
- // all target option
+ // all target option
+ std::string result;
+ std::vector<std::string>::iterator s = args.begin();
+ ++s;
if (args.size() >= 3)
{
- if (args[2] == "ALL")
+ if (args[1] == "ALL")
{
all = true;
+ ++s;
}
}
+ for (;s != args.end(); ++s)
+ {
+ m_Makefile->ExpandVariablesInString(*s);
+ result += cmSystemTools::EscapeSpaces(s->c_str());
+ result += " ";
+ }
m_Makefile->AddUtilityCommand(args[0].c_str(),
- args[1].c_str(), all);
+ result.c_str(), all);
return true;
}