summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--compiler/nim.nim3
-rw-r--r--doc/nims.txt3
2 files changed, 5 insertions, 1 deletions
diff --git a/compiler/nim.nim b/compiler/nim.nim
index 64c4e2026..1293ec922 100644
--- a/compiler/nim.nim
+++ b/compiler/nim.nim
@@ -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()
diff --git a/doc/nims.txt b/doc/nims.txt
index 2b9df4a87..7c76efe42 100644
--- a/doc/nims.txt
+++ b/doc/nims.txt
@@ -9,7 +9,8 @@ system.
 
 So instead of a ``myproject.nim.cfg`` configuration file, you can use
 a ``myproject.nims`` file that simply contains Nim code controlling the
-compilation process.
+compilation process. For a directory wide configuration, use ``config.nims``
+instead of ``nim.cfg``.
 
 The VM cannot deal with ``importc``, the FFI is not available, so there are not
 many stdlib modules that you can use with Nim's VM. However, at least the