project wide configuration file now with suffix '.nimrod.cfg'

This commit is contained in:
Araq
2012-01-15 13:54:28 +01:00
parent 8836bbdb94
commit 9a2df340a7
4 changed files with 8 additions and 4 deletions

View File

@@ -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"))

View File

@@ -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.