Browse Source

[cli] Added an option for enabling debug mode for generated output.

pull/914/head
Joao Matos 8 years ago
parent
commit
4f77dafb2e
  1. 1
      src/CLI/CLI.cs
  2. 1
      src/CLI/Generator.cs
  3. 2
      src/CLI/Options.cs

1
src/CLI/CLI.cs

@ -24,6 +24,7 @@ namespace CppSharp @@ -24,6 +24,7 @@ namespace CppSharp
optionSet.Add("on=|outputnamespace=", "the {NAMESPACE} that will be used for the generated code", on => options.OutputNamespace = on );
optionSet.Add("iln=|inputlibraryname=", "the {NAME} of the shared library that contains the symbols of the generated code", iln => options.InputLibraryName = iln );
optionSet.Add("d|debug", "enables debug mode which generates more verbose code to aid debugging", v => options.Debug = true);
optionSet.Add("c|compile", "enables automatic compilation of the generated code", v => options.Compile = true);
optionSet.Add("g=|gen=|generator=", "the {TYPE} of generated code: 'chsarp' or 'cli' ('cli' supported only for Windows)", g => { GetGeneratorKind(g, messages); } );
optionSet.Add("p=|platform=", "the {PLATFORM} that the generated code will target: 'win', 'osx' or 'linux'", p => { GetDestinationPlatform(p, messages); } );

1
src/CLI/Generator.cs

@ -182,6 +182,7 @@ namespace CppSharp @@ -182,6 +182,7 @@ namespace CppSharp
parserOptions.AddDefines(d.Key + "=" + d.Value);
}
driverOptions.GenerateDebugOutput = options.Debug;
driverOptions.CompileCode = options.Compile;
driverOptions.OutputDir = options.OutputDir;
driverOptions.CheckSymbols = options.CheckSymbols;

2
src/CLI/Options.cs

@ -44,5 +44,7 @@ namespace CppSharp @@ -44,5 +44,7 @@ namespace CppSharp
public bool Cpp11ABI { get; set; }
public bool Compile { get; set; }
public bool Debug { get; set; }
}
}
Loading…
Cancel
Save