Compile pragma. Recompile on external file compilation failure (#9455)

This commit is contained in:
cooldome
2018-10-22 11:49:57 +01:00
committed by Andreas Rumpf
parent 0dd3038a39
commit 9c88df220a

View File

@@ -627,7 +627,8 @@ proc externalFileChanged(conf: ConfigRef; cfile: Cfile): bool =
close(f)
proc addExternalFileToCompile*(conf: ConfigRef; c: var Cfile) =
if optForceFullMake notin conf.globalOptions and not externalFileChanged(conf, c):
if optForceFullMake notin conf.globalOptions and fileExists(c.obj) and
not externalFileChanged(conf, c):
c.flags.incl CfileFlag.Cached
conf.toCompile.add(c)