Nim namespace for cpp (#7453)

- new option --usenamespace to generate nim cpp code in its own namespace Nim
- minor changes for compatibility with the new Embarcadero = Borland C++-Builder (bcc)
This commit is contained in:
AdrianV 2018-04-15 13:43:01 +02:00 • committed by Andreas Rumpf
commit 0ce28d15cc
8 changed files with 44 additions and 7 deletions

View file

@ -698,6 +698,11 @@ proc processSwitch(switch, arg: string, pass: TCmdLinePass, info: TLineInfo;
expectNoArg(switch, arg, pass, info)
newDestructors = true
defineSymbol("nimNewRuntime")
of "cppcompiletonamespace":
expectNoArg(switch, arg, pass, info)
useNimNamespace = true
defineSymbol("cppCompileToNamespace")
else:
if strutils.find(switch, '.') >= 0: options.setConfigVar(switch, arg)
else: invalidCmdLineOption(pass, switch, info)