diff options
author | rku <rokups@zoho.com> | 2015-07-31 15:57:10 +0300 |
---|---|---|
committer | rku <rokups@zoho.com> | 2015-07-31 15:57:10 +0300 |
commit | 626226efa40441d03b2f9121e2a73faaa44b2517 (patch) | |
tree | 96151de7d832f40976adc16089b96bc8bc5c176a | |
parent | c9084585dc507267d48c5f79674847da7fc4a6bb (diff) | |
download | Nim-626226efa40441d03b2f9121e2a73faaa44b2517.tar.gz |
{.compile.} pragma accepts paths relative to file pragma is in.
-rw-r--r-- | compiler/pragmas.nim | 2 |
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)) |