diff --git a/config.nims b/config.nims index 0523845d..01d95d77 100644 --- a/config.nims +++ b/config.nims @@ -1,5 +1,15 @@ import std/os +const currentDir = currentSourcePath()[0 .. ^(len("config.nims") + 1)] + +if getEnv("NIMBUS_BUILD_SYSTEM") == "yes" and + # BEWARE + # In Nim 1.6, config files are evaluated with a working directory + # matching where the Nim command was invocated. This means that we + # must do all file existance checks with full absolute paths: + system.fileExists(currentDir & "nimbus-build-system.paths"): + include "nimbus-build-system.paths" + if defined(release): switch("nimcache", joinPath(currentSourcePath.parentDir, "nimcache/release/$projectName")) else: