Add section for resetting files
This commit is contained in:
parent
e0ea3d09ac
commit
cc0999b70b
2 changed files with 10 additions and 2 deletions
|
|
@ -79,6 +79,8 @@ _[n.global]_
|
|||
|
||||
```quotes``` = pick up any headers included using "" (and not <> which is typically used for standard headers) [default: true]
|
||||
|
||||
```reset``` = whether or not to reset all files after processing [default: false]
|
||||
|
||||
```filter``` = string to identify and recurse into library .h files in #include statements and exclude standard headers
|
||||
|
||||
```cpp_compiler``` = string to specify a CPP compiler executable. [default: g++]
|
||||
|
|
|
|||
10
nimgen.nim
10
nimgen.nim
|
|
@ -9,6 +9,7 @@ var
|
|||
gConfig: Config
|
||||
gFilter = ""
|
||||
gQuotes = true
|
||||
gReset = false
|
||||
gCppCompiler = "g++"
|
||||
gCCompiler = "gcc"
|
||||
gOutput = ""
|
||||
|
|
@ -822,6 +823,10 @@ proc runCfg(cfg: string) =
|
|||
if gConfig["n.global"]["quotes"] == "false":
|
||||
gQuotes = false
|
||||
|
||||
if gConfig["n.global"].hasKey("reset"):
|
||||
if gConfig["n.global"]["reset"] == "true":
|
||||
gReset = true
|
||||
|
||||
if gConfig.hasKey("n.include"):
|
||||
for inc in gConfig["n.include"].keys():
|
||||
gIncludes.add(inc.addEnv())
|
||||
|
|
@ -878,8 +883,9 @@ proc runCfg(cfg: string) =
|
|||
|
||||
runFile(file, gConfig[file])
|
||||
|
||||
# Reset files
|
||||
gitReset()
|
||||
if gReset:
|
||||
# Reset files
|
||||
gitReset()
|
||||
|
||||
|
||||
# ###
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue