bugfix: don't process arguments that are to be passed to the produced exe

This commit is contained in:
Araq 2011-11-30 19:51:51 +01:00
commit ab5621a62b
4 changed files with 29 additions and 18 deletions

View file

@ -37,17 +37,18 @@ proc ProcessCmdLine(pass: TCmdLinePass) =
ProcessSwitch(key, val, pass, gCmdLineInfo)
else:
ProcessSwitch(p.key, p.val, pass, gCmdLineInfo)
of cmdArgument:
if pass == passCmd1:
if options.command == "":
options.command = p.key
else:
options.commandArgs.add p.key
of cmdArgument:
if pass != passCmd1: break
if options.command == "":
options.command = p.key
else:
options.commandArgs.add p.key
if options.gProjectName == "":
# support UNIX style filenames anywhere for portable build scripts:
options.gProjectName = unixToNativePath(p.key)
arguments = cmdLineRest(p)
if options.gProjectName == "":
# support UNIX style filenames anywhere for portable build scripts:
options.gProjectName = unixToNativePath(p.key)
arguments = cmdLineRest(p)
break
if pass == passCmd2:
if optRun notin gGlobalOptions and arguments != "":