{.compile.} pragma accepts paths relative to file pragma is in.

This commit is contained in:
rku
2015-07-31 15:57:10 +03:00
parent c9084585dc
commit 626226efa4

View File

@@ -395,6 +395,8 @@ proc processCompile(c: PContext, n: PNode) =
var found = findFile(s)
if found == "": found = s
var trunc = changeFileExt(found, "")
if not isAbsolute(found):
found = parentDir(n.info.toFullPath) / found
extccomp.addExternalFileToCompile(found)
extccomp.addFileToLink(completeCFilePath(trunc, false))