Merge branch 'configurable_compiler' into all_merged
This commit is contained in:
commit
0e0eadde37
2 changed files with 12 additions and 1 deletions
|
|
@ -73,6 +73,10 @@ _[n.global]_
|
||||||
|
|
||||||
```filter``` = string to identify and recurse into library .h files in #include statements and exclude standard headers
|
```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++]
|
||||||
|
|
||||||
|
```c_compiler``` = string to specify a C compiler executable. [default: gcc]
|
||||||
|
|
||||||
_[n.include]_
|
_[n.include]_
|
||||||
|
|
||||||
List of all directories, one per line, to include in the search path. This is used by:-
|
List of all directories, one per line, to include in the search path. This is used by:-
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@ var
|
||||||
gConfig: Config
|
gConfig: Config
|
||||||
gFilter = ""
|
gFilter = ""
|
||||||
gQuotes = true
|
gQuotes = true
|
||||||
|
gCppCompiler = "g++"
|
||||||
|
gCCompiler = "gcc"
|
||||||
gOutput = ""
|
gOutput = ""
|
||||||
gIncludes: seq[string] = @[]
|
gIncludes: seq[string] = @[]
|
||||||
gExcludes: seq[string] = @[]
|
gExcludes: seq[string] = @[]
|
||||||
|
|
@ -376,7 +378,7 @@ proc getDefines(file: string, inline=false): string =
|
||||||
|
|
||||||
proc runPreprocess(file, ppflags, flags: string, inline: bool): string =
|
proc runPreprocess(file, ppflags, flags: string, inline: bool): string =
|
||||||
var
|
var
|
||||||
pproc = if flags.contains("cpp"): "g++" else: "gcc"
|
pproc = if flags.contains("cpp"): gCppCompiler else: gCCompiler
|
||||||
cmd = "$# -E $# $#" % [pproc, ppflags, file]
|
cmd = "$# -E $# $#" % [pproc, ppflags, file]
|
||||||
|
|
||||||
for inc in gIncludes:
|
for inc in gIncludes:
|
||||||
|
|
@ -680,6 +682,11 @@ proc runCfg(cfg: string) =
|
||||||
quit(1)
|
quit(1)
|
||||||
createDir(gOutput)
|
createDir(gOutput)
|
||||||
|
|
||||||
|
if gConfig["n.global"].hasKey("cpp_compiler"):
|
||||||
|
gCppCompiler = gConfig["n.global"]["cpp_compiler"]
|
||||||
|
if gConfig["n.global"].hasKey("c_compiler"):
|
||||||
|
gCCompiler = gConfig["n.global"]["c_compiler"]
|
||||||
|
|
||||||
if gConfig["n.global"].hasKey("filter"):
|
if gConfig["n.global"].hasKey("filter"):
|
||||||
gFilter = gConfig["n.global"]["filter"]
|
gFilter = gConfig["n.global"]["filter"]
|
||||||
if gConfig["n.global"].hasKey("quotes"):
|
if gConfig["n.global"].hasKey("quotes"):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue