{.compile.} pragma accepts paths relative to file pragma is in.
This commit is contained in:
parent
c9084585dc
commit
626226efa4
1 changed files with 2 additions and 0 deletions
|
|
@ -395,6 +395,8 @@ proc processCompile(c: PContext, n: PNode) =
|
||||||
var found = findFile(s)
|
var found = findFile(s)
|
||||||
if found == "": found = s
|
if found == "": found = s
|
||||||
var trunc = changeFileExt(found, "")
|
var trunc = changeFileExt(found, "")
|
||||||
|
if not isAbsolute(found):
|
||||||
|
found = parentDir(n.info.toFullPath) / found
|
||||||
extccomp.addExternalFileToCompile(found)
|
extccomp.addExternalFileToCompile(found)
|
||||||
extccomp.addFileToLink(completeCFilePath(trunc, false))
|
extccomp.addFileToLink(completeCFilePath(trunc, false))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue