summary refs log tree commit diff stats
path: root/compiler/pragmas.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/pragmas.nim')
-rw-r--r--compiler/pragmas.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/pragmas.nim b/compiler/pragmas.nim
index c771155af..650b0e195 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))