mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-31 10:22:15 +00:00
{.compile.} pragma accepts paths relative to file pragma is in.
This commit is contained in:
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user