Allow ppflags and related to be OS specific
This commit is contained in:
parent
217161bb4d
commit
b894dbd17a
2 changed files with 20 additions and 18 deletions
36
nimgen.nim
36
nimgen.nim
|
|
@ -647,23 +647,25 @@ proc runFile(file: string, cfgin: OrderedTableRef) =
|
||||||
var noprocess = false
|
var noprocess = false
|
||||||
|
|
||||||
for act in cfg.keys():
|
for act in cfg.keys():
|
||||||
if cfg[act] == "true":
|
let (action, val) = getKey(act)
|
||||||
if act == "recurse":
|
if val == true:
|
||||||
c2nimConfig.recurse = true
|
if cfg[act] == "true":
|
||||||
elif act == "inline":
|
if action == "recurse":
|
||||||
c2nimConfig.inline = true
|
c2nimConfig.recurse = true
|
||||||
elif act == "preprocess":
|
elif action == "inline":
|
||||||
c2nimConfig.preprocess = true
|
c2nimConfig.inline = true
|
||||||
elif act == "ctags":
|
elif action == "preprocess":
|
||||||
c2nimConfig.ctags = true
|
c2nimConfig.preprocess = true
|
||||||
elif act == "defines":
|
elif action == "ctags":
|
||||||
c2nimConfig.defines = true
|
c2nimConfig.ctags = true
|
||||||
elif act == "noprocess":
|
elif action == "defines":
|
||||||
noprocess = true
|
c2nimConfig.defines = true
|
||||||
elif act == "flags":
|
elif action == "noprocess":
|
||||||
c2nimConfig.flags = cfg[act]
|
noprocess = true
|
||||||
elif act == "ppflags":
|
elif action == "flags":
|
||||||
c2nimConfig.ppflags = cfg[act]
|
c2nimConfig.flags = cfg[act]
|
||||||
|
elif action == "ppflags":
|
||||||
|
c2nimConfig.ppflags = cfg[act]
|
||||||
|
|
||||||
if c2nimConfig.recurse and c2nimConfig.inline:
|
if c2nimConfig.recurse and c2nimConfig.inline:
|
||||||
echo "Cannot use recurse and inline simultaneously"
|
echo "Cannot use recurse and inline simultaneously"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# Package
|
# Package
|
||||||
|
|
||||||
version = "0.2.3"
|
version = "0.2.4"
|
||||||
author = "genotrance"
|
author = "genotrance"
|
||||||
description = "c2nim helper to simplify and automate the wrapping of C libraries"
|
description = "c2nim helper to simplify and automate the wrapping of C libraries"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue