aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGanesh Viswanathan <dev@genotrance.com>2018-07-09 14:09:45 -0500
committerGanesh Viswanathan <dev@genotrance.com>2018-07-09 14:09:45 -0500
commit0e016bd7bb66b3d0a69b92d8ca058604c9d0417b (patch)
tree2da984d539b334bde1f89f2f5d0172c1c028d4a4
parent1f2bd20da1a546c867e2347ac4ad35a1e2d791d8 (diff)
parentb894dbd17ac94af6e7e83407910de8750a8d9545 (diff)
downloadnimgen-0e016bd7bb66b3d0a69b92d8ca058604c9d0417b.tar.gz
nimgen-0e016bd7bb66b3d0a69b92d8ca058604c9d0417b.zip
Merge branch 'master' of https://github.com/genotrance/nimgen
-rw-r--r--nimgen.nim36
-rw-r--r--nimgen.nimble2
2 files changed, 20 insertions, 18 deletions
diff --git a/nimgen.nim b/nimgen.nim
index f4631c3..328dd2d 100644
--- a/nimgen.nim
+++ b/nimgen.nim
@@ -647,23 +647,25 @@ proc runFile(file: string, cfgin: OrderedTableRef) =
var noprocess = false
for act in cfg.keys():
- if cfg[act] == "true":
- if act == "recurse":
- c2nimConfig.recurse = true
- elif act == "inline":
- c2nimConfig.inline = true
- elif act == "preprocess":
- c2nimConfig.preprocess = true
- elif act == "ctags":
- c2nimConfig.ctags = true
- elif act == "defines":
- c2nimConfig.defines = true
- elif act == "noprocess":
- noprocess = true
- elif act == "flags":
- c2nimConfig.flags = cfg[act]
- elif act == "ppflags":
- c2nimConfig.ppflags = cfg[act]
+ let (action, val) = getKey(act)
+ if val == true:
+ if cfg[act] == "true":
+ if action == "recurse":
+ c2nimConfig.recurse = true
+ elif action == "inline":
+ c2nimConfig.inline = true
+ elif action == "preprocess":
+ c2nimConfig.preprocess = true
+ elif action == "ctags":
+ c2nimConfig.ctags = true
+ elif action == "defines":
+ c2nimConfig.defines = true
+ elif action == "noprocess":
+ noprocess = true
+ elif action == "flags":
+ c2nimConfig.flags = cfg[act]
+ elif action == "ppflags":
+ c2nimConfig.ppflags = cfg[act]
if c2nimConfig.recurse and c2nimConfig.inline:
echo "Cannot use recurse and inline simultaneously"
diff --git a/nimgen.nimble b/nimgen.nimble
index 043fc86..28967d4 100644
--- a/nimgen.nimble
+++ b/nimgen.nimble
@@ -1,6 +1,6 @@
# Package
-version = "0.2.3"
+version = "0.2.4"
author = "genotrance"
description = "c2nim helper to simplify and automate the wrapping of C libraries"
license = "MIT"