summary refs log tree commit diff stats
path: root/compiler/nimconf.nim
diff options
context:
space:
mode:
authordef <dennis@felsin9.de>2015-02-04 13:01:21 +0100
committerdef <dennis@felsin9.de>2015-02-04 13:01:21 +0100
commit2b9d7068cbb38fd9281dde00936eac6d48fe91b1 (patch)
tree31faaaf4b4039b62d797782ad3bfe2c843b8a5e3 /compiler/nimconf.nim
parent12ad32e951374c31ff951c8023ef683f454277bc (diff)
downloadNim-2b9d7068cbb38fd9281dde00936eac6d48fe91b1.tar.gz
Add support for nimcfg and warning for nimrod.cfg
Diffstat (limited to 'compiler/nimconf.nim')
-rw-r--r--compiler/nimconf.nim11
1 files changed, 8 insertions, 3 deletions
diff --git a/compiler/nimconf.nim b/compiler/nimconf.nim
index cd1fa784f..5304dc265 100644
--- a/compiler/nimconf.nim
+++ b/compiler/nimconf.nim
@@ -246,6 +246,11 @@ proc loadConfigs*(cfg: string) =
     
     if gProjectName.len != 0:
       # new project wide config file:
-      let projectConfig = changeFileExt(gProjectFull, "nim.cfg")
-      if fileExists(projectConfig): readConfigFile(projectConfig)
-      else: readConfigFile(changeFileExt(gProjectFull, "nimrod.cfg"))
+      var projectConfig = changeFileExt(gProjectFull, "nimcfg")
+      if not fileExists(projectConfig):
+        projectConfig = changeFileExt(gProjectFull, "nim.cfg")
+      if not fileExists(projectConfig):
+        projectConfig = changeFileExt(gProjectFull, "nimrod.cfg")
+        if fileExists(projectConfig):
+          rawMessage(warnDeprecated, projectConfig)
+      readConfigFile(projectConfig)