Browse Source

Added a new verbose flag to the CLI tool and improved verbose handling.

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

1
src/CLI/CLI.cs

@ -36,6 +36,7 @@ namespace CppSharp @@ -36,6 +36,7 @@ namespace CppSharp
optionSet.Add("cs|checksymbols", "enable the symbol check for the generated code", cs => { options.CheckSymbols = (cs != null); } );
optionSet.Add("ub|unitybuild|unity", "enable unity build", ub => { options.UnityBuild = (ub != null); } );
optionSet.Add("v|verbose", "enables verbose mode", v => { options.Verbose = true; });
optionSet.Add("h|help", "shows the help", hl => { showHelp = (hl != null); });
List<string> additionalArguments = null;

2
src/CLI/Generator.cs

@ -144,6 +144,7 @@ namespace CppSharp @@ -144,6 +144,7 @@ namespace CppSharp
var parserOptions = driver.ParserOptions;
parserOptions.TargetTriple = triple;
parserOptions.Abi = abi;
parserOptions.Verbose = options.Verbose;
var driverOptions = driver.Options;
driverOptions.GeneratorKind = options.Kind;
@ -187,6 +188,7 @@ namespace CppSharp @@ -187,6 +188,7 @@ namespace CppSharp
driverOptions.OutputDir = options.OutputDir;
driverOptions.CheckSymbols = options.CheckSymbols;
driverOptions.UnityBuild = options.UnityBuild;
driverOptions.Verbose = options.Verbose;
}
private void SetupLinuxOptions(ParserOptions parserOptions)

2
src/CLI/Options.cs

@ -46,5 +46,7 @@ namespace CppSharp @@ -46,5 +46,7 @@ namespace CppSharp
public bool Compile { get; set; }
public bool Debug { get; set; }
public bool Verbose { get; set; }
}
}

2
src/Generator/Driver.cs

@ -475,7 +475,7 @@ namespace CppSharp @@ -475,7 +475,7 @@ namespace CppSharp
driver.Setup();
if(driver.ParserOptions.Verbose)
if(driver.Options.Verbose)
Diagnostics.Level = DiagnosticKind.Debug;
if (!options.Quiet)

Loading…
Cancel
Save