From 626226efa40441d03b2f9121e2a73faaa44b2517 Mon Sep 17 00:00:00 2001 From: rku Date: Fri, 31 Jul 2015 15:57:10 +0300 Subject: [PATCH] {.compile.} pragma accepts paths relative to file pragma is in. --- compiler/pragmas.nim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/pragmas.nim b/compiler/pragmas.nim index c771155afb..650b0e1951 100644 --- a/compiler/pragmas.nim +++ b/compiler/pragmas.nim @@ -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))