ENH: Fix argument parsing on UNIX with spaces

This commit is contained in:
Andy Cedilnik 2003-08-04 07:12:42 -04:00
parent 2c33b3db65
commit d86d2fdf12
1 changed files with 15 additions and 3 deletions

View File

@ -350,8 +350,20 @@ bool cmSystemTools::RunSingleCommand(
// Parse an unquoted argument.
while(*c && *c != ' ' && *c != '\t')
{
arg.append(1, *c);
++c;
if(*c == '\\')
{
++c;
if(*c)
{
arg.append(1, *c);
++c;
}
}
else
{
arg.append(1, *c);
++c;
}
}
args.push_back(arg);
}