summary refs log tree commit diff stats
path: root/compiler/pragmas.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2015-08-25 10:54:05 +0200
committerAndreas Rumpf <rumpf_a@web.de>2015-08-25 10:54:05 +0200
commit5cfce2623b0ba1fba0085881c3e1cc42912a5225 (patch)
tree59e17aee6873104de39fa9796fb27b7045687fcd /compiler/pragmas.nim
parent3a01eab4df76e24b67ea62337411a23bc5987e28 (diff)
parent24ad2cb39247039c50db1b0a8633d00130814fda (diff)
downloadNim-5cfce2623b0ba1fba0085881c3e1cc42912a5225.tar.gz
Merge pull request #3160 from r-ku/coroutines
Coroutines
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 128a90138..5f317ed24 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))