summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xcompiler/nimconf.nim5
-rwxr-xr-xdoc/nimrodc.txt7
-rwxr-xr-xlib/nimrtl.nimrod.cfg (renamed from lib/nimrtl.cfg)0
-rwxr-xr-xtools/nimgrep.nimrod.cfg (renamed from tools/nimgrep.cfg)0
4 files changed, 8 insertions, 4 deletions
diff --git a/compiler/nimconf.nim b/compiler/nimconf.nim
index 971ce6127..c3592e03a 100755
--- a/compiler/nimconf.nim
+++ b/compiler/nimconf.nim
@@ -241,4 +241,7 @@ proc LoadConfigs*(cfg: string) =
     if conffile != pd / cfg and existsFile(conffile):
       readConfigFile(conffile)
       rawMessage(warnConfigDeprecated, conffile)
-      
+    
+    # new project wide config file:
+    readConfigFile(changeFileExt(gProjectFull, "nimrod.cfg"))
+ 
diff --git a/doc/nimrodc.txt b/doc/nimrodc.txt
index 53efb6a22..fd7d9d226 100755
--- a/doc/nimrodc.txt
+++ b/doc/nimrodc.txt
@@ -43,14 +43,15 @@ Configuration files
 **Note:** The *project file name* is the name of the ``.nim`` file that is 

 passed as a command line argument to the compiler.

 

-All configuration files have the name ``nimrod.cfg``. The ``nimrod`` 

-executable processes configuration files in the following directories 

-(in this order; later files overwrite previous settings):

+

+The ``nimrod`` executable processes configuration files in the following

+directories (in this order; later files overwrite previous settings):

 

 1) ``$nimrod/config/nimrod.cfg``, ``/etc/nimrod.cfg`` (UNIX) or ``%NIMROD%/config/nimrod.cfg`` (Windows). This file can be skipped with the ``--skipCfg`` command line option.

 2) ``/home/$user/.config/nimrod.cfg`` (UNIX) or  ``%APPDATA%/nimrod.cfg`` (Windows). This file can be skipped with the ``--skipUserCfg`` command line option.

 3) ``$parentDir/nimrod.cfg`` where ``$parentDir`` stands for any parent  directory of the project file's path. These files can be skipped with the ``--skipParentCfg`` command line option.

 4) ``$projectDir/nimrod.cfg`` where ``$projectDir`` stands for the project  file's path. This file can be skipped with the ``--skipProjCfg`` command line option.

+5) A project can also have a project specific configuration file named ``$project.nimrod.cfg`` that resides in the same directory as ``$project.nim``. This file can be skipped with the ``--skipProjCfg`` command line option.

 

 

 Command line settings have priority over configuration file settings.

diff --git a/lib/nimrtl.cfg b/lib/nimrtl.nimrod.cfg
index b60de183a..b60de183a 100755
--- a/lib/nimrtl.cfg
+++ b/lib/nimrtl.nimrod.cfg
diff --git a/tools/nimgrep.cfg b/tools/nimgrep.nimrod.cfg
index b931ff567..b931ff567 100755
--- a/tools/nimgrep.cfg
+++ b/tools/nimgrep.nimrod.cfg