diff options
author | Araq <rumpf_a@web.de> | 2015-08-16 13:40:52 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-08-16 13:41:30 +0200 |
commit | 69b32637b1f12000b64fa4db452323dc30b3567f (patch) | |
tree | ceb379ddd4282471378c52fa678b321941094231 /compiler/nim.nim | |
parent | d81578cb9b4776356d610e2329ffc7f3323d13db (diff) | |
download | Nim-69b32637b1f12000b64fa4db452323dc30b3567f.tar.gz |
implements experimental new config system based on NimScript
Diffstat (limited to 'compiler/nim.nim')
-rw-r--r-- | compiler/nim.nim | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/compiler/nim.nim b/compiler/nim.nim index ce9028d53..51f4cae92 100644 --- a/compiler/nim.nim +++ b/compiler/nim.nim @@ -1,7 +1,7 @@ # # # The Nim Compiler -# (c) Copyright 2013 Andreas Rumpf +# (c) Copyright 2015 Andreas Rumpf # # See the file "copying.txt", included in this # distribution, for details about the copyright. @@ -16,7 +16,7 @@ when defined(gcc) and defined(windows): import commands, lexer, condsyms, options, msgs, nversion, nimconf, ropes, extccomp, strutils, os, osproc, platform, main, parseopt, service, - nodejs + nodejs, scriptconfig when hasTinyCBackend: import tccgen @@ -54,6 +54,11 @@ proc handleCmdLine() = else: gProjectPath = getCurrentDir() loadConfigs(DefaultConfig) # load all config files + let scriptFile = gProjectFull.changeFileExt("nims") + if fileExists(scriptFile): + runNimScript(scriptFile) + # 'nim foo.nims' means to just run the NimScript file and do nothing more: + if scriptFile == gProjectFull: return # now process command line arguments again, because some options in the # command line can overwite the config file's settings extccomp.initVars() |