diff options
author | Giovanni <sinkingsugar@gmail.com> | 2018-09-15 20:06:26 +0900 |
---|---|---|
committer | Giovanni <sinkingsugar@gmail.com> | 2018-09-15 20:10:54 +0900 |
commit | f1b64e4b96bc943d194e2e107b59b1c74cde911e (patch) | |
tree | 444a5b56bd479138bebe27098a5d05a199d188bc /compiler/commands.nim | |
parent | 4342b79a3c05fcfb1e6fc97152daa0075b0b9603 (diff) | |
download | Nim-f1b64e4b96bc943d194e2e107b59b1c74cde911e.tar.gz |
improve the compiler option "cppCompileToNamespace", a custom namespace can now be set
Diffstat (limited to 'compiler/commands.nim')
-rw-r--r-- | compiler/commands.nim | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim index fe820a589..0b3bc1b2d 100644 --- a/compiler/commands.nim +++ b/compiler/commands.nim @@ -735,7 +735,11 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo; of "nep1": processOnOffSwitchG(conf, {optCheckNep1}, arg, pass, info) of "cppcompiletonamespace": - expectNoArg(conf, switch, arg, pass, info) + if conf != nil: + if arg != "": + conf.cppCustomNamespace = arg + else: + conf.cppCustomNamespace = "Nim" incl conf.globalOptions, optUseNimNamespace defineSymbol(conf.symbols, "cppCompileToNamespace") else: |