list CC executions properly again for --parallelBuild:1
This commit is contained in:
parent
c795a469bc
commit
b44ee119c8
1 changed files with 7 additions and 3 deletions
|
|
@ -428,13 +428,17 @@ proc addFileToLink*(filename: string) =
|
||||||
prependStr(toLink, filename)
|
prependStr(toLink, filename)
|
||||||
# BUGFIX: was ``appendStr``
|
# BUGFIX: was ``appendStr``
|
||||||
|
|
||||||
proc execExternalProgram*(cmd: string, prettyCmd = "") =
|
proc execWithEcho(cmd: string, prettyCmd = ""): int =
|
||||||
if optListCmd in gGlobalOptions or gVerbosity > 0:
|
if optListCmd in gGlobalOptions or gVerbosity > 0:
|
||||||
if prettyCmd != "":
|
if prettyCmd != "":
|
||||||
msgWriteln(prettyCmd)
|
msgWriteln(prettyCmd)
|
||||||
else:
|
else:
|
||||||
msgWriteln(cmd)
|
msgWriteln(cmd)
|
||||||
if execCmd(cmd) != 0: rawMessage(errExecutionOfProgramFailed, "")
|
result = execCmd(cmd)
|
||||||
|
|
||||||
|
proc execExternalProgram*(cmd: string, prettyCmd = "") =
|
||||||
|
if execWithEcho(cmd, prettyCmd) != 0:
|
||||||
|
rawMessage(errExecutionOfProgramFailed, "")
|
||||||
|
|
||||||
proc generateScript(projectFile: string, script: PRope) =
|
proc generateScript(projectFile: string, script: PRope) =
|
||||||
let (dir, name, ext) = splitFile(projectFile)
|
let (dir, name, ext) = splitFile(projectFile)
|
||||||
|
|
@ -622,7 +626,7 @@ proc callCCompiler*(projectfile: string) =
|
||||||
if gNumberOfProcessors == 0: gNumberOfProcessors = countProcessors()
|
if gNumberOfProcessors == 0: gNumberOfProcessors = countProcessors()
|
||||||
var res = 0
|
var res = 0
|
||||||
if gNumberOfProcessors <= 1:
|
if gNumberOfProcessors <= 1:
|
||||||
for i in countup(0, high(cmds)): res = max(execCmd(cmds[i]), res)
|
for i in countup(0, high(cmds)): res = max(execWithEcho(cmds[i]), res)
|
||||||
elif optListCmd in gGlobalOptions or gVerbosity > 1:
|
elif optListCmd in gGlobalOptions or gVerbosity > 1:
|
||||||
res = execProcesses(cmds, {poEchoCmd, poUseShell, poParentStreams},
|
res = execProcesses(cmds, {poEchoCmd, poUseShell, poParentStreams},
|
||||||
gNumberOfProcessors)
|
gNumberOfProcessors)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue