diff options
author | Araq <rumpf_a@web.de> | 2013-09-27 08:45:14 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2013-09-27 08:45:14 +0200 |
commit | 2f0671eb795192b079402e452a229e51a7ca990f (patch) | |
tree | c3021a0d31c99549c4241f6e439948aa29b2f349 /tools/niminst | |
parent | a0b82db40229620a29726fa33a4358db2f5fcd44 (diff) | |
download | Nim-2f0671eb795192b079402e452a229e51a7ca990f.tar.gz |
examples from the talk part of test suite
Diffstat (limited to 'tools/niminst')
-rw-r--r-- | tools/niminst/niminst.nim | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/niminst/niminst.nim b/tools/niminst/niminst.nim index 0feac6de8..6ed8fe3fe 100644 --- a/tools/niminst/niminst.nim +++ b/tools/niminst/niminst.nim @@ -244,6 +244,7 @@ proc parseIniFile(c: var TConfigData) = var p: TCfgParser section = "" + hasCpuOs = false var input = newFileStream(c.infile, fmRead) if input != nil: open(p, input, c.infile) @@ -265,16 +266,18 @@ proc parseIniFile(c: var TConfigData) = of "version": c.version = v of "os": c.oses = split(v, {';'}) + hasCpuOs = true if c.explicitPlatforms: quit(errorStr(p, "you cannot have both 'platforms' and 'os'")) of "cpu": c.cpus = split(v, {';'}) + hasCpuOs = true if c.explicitPlatforms: quit(errorStr(p, "you cannot have both 'platforms' and 'cpu'")) of "platforms": platforms(c, v) c.explicitPlatforms = true - if c.cpus.len > 0 or c.oses.len > 0: + if hasCpuOs: quit(errorStr(p, "you cannot have both 'platforms' and 'os'")) of "authors": c.authors = split(v, {';'}) of "description": c.description = v |