improve the compiler option "cppCompileToNamespace", a custom namespace can now be set

This commit is contained in:
Giovanni 2018-09-15 20:06:26 +09:00
commit f1b64e4b96
5 changed files with 22 additions and 10 deletions

View file

@ -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: