summary refs log tree commit diff stats
path: root/compiler/nim.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/nim.nim')
-rw-r--r--compiler/nim.nim5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/nim.nim b/compiler/nim.nim
index 51f4cae92..1293ec922 100644
--- a/compiler/nim.nim
+++ b/compiler/nim.nim
@@ -48,7 +48,7 @@ proc handleCmdLine() =
         gProjectFull = canonicalizePath(gProjectName)
       except OSError:
         gProjectFull = gProjectName
-      var p = splitFile(gProjectFull)
+      let p = splitFile(gProjectFull)
       gProjectPath = p.dir
       gProjectName = p.name
     else:
@@ -59,6 +59,9 @@ proc handleCmdLine() =
       runNimScript(scriptFile)
       # 'nim foo.nims' means to just run the NimScript file and do nothing more:
       if scriptFile == gProjectFull: return
+    elif fileExists(gProjectPath / "config.nims"):
+      # directory wide NimScript file
+      runNimScript(gProjectPath / "config.nims")
     # now process command line arguments again, because some options in the
     # command line can overwite the config file's settings
     extccomp.initVars()