Browse Source

Added new quiet option in the driver that does not output unnecessary information.

pull/43/head
triton 12 years ago
parent
commit
a5363e2f6c
  1. 11
      src/Generator/Driver.cs

11
src/Generator/Driver.cs

@ -225,6 +225,7 @@ namespace CppSharp
// General options // General options
public bool Verbose; public bool Verbose;
public bool Quiet;
public bool ShowHelpText; public bool ShowHelpText;
public bool OutputDebug; public bool OutputDebug;
@ -280,18 +281,26 @@ namespace CppSharp
library.Setup(driver); library.Setup(driver);
driver.Setup(); driver.Setup();
if (!options.Quiet)
Console.WriteLine("Parsing libraries..."); Console.WriteLine("Parsing libraries...");
if (!driver.ParseLibraries()) if (!driver.ParseLibraries())
return; return;
if (!options.Quiet)
Console.WriteLine("Indexing library symbols..."); Console.WriteLine("Indexing library symbols...");
driver.LibrarySymbols.IndexSymbols(); driver.LibrarySymbols.IndexSymbols();
if (!options.Quiet)
Console.WriteLine("Parsing code..."); Console.WriteLine("Parsing code...");
if (!driver.ParseCode()) if (!driver.ParseCode())
return; return;
if (!options.Quiet)
Console.WriteLine("Processing code..."); Console.WriteLine("Processing code...");
library.Preprocess(driver, driver.Library); library.Preprocess(driver, driver.Library);
driver.SetupPasses(library); driver.SetupPasses(library);
@ -299,7 +308,9 @@ namespace CppSharp
driver.ProcessCode(); driver.ProcessCode();
library.Postprocess(driver.Library); library.Postprocess(driver.Library);
if (!options.Quiet)
Console.WriteLine("Generating code..."); Console.WriteLine("Generating code...");
var outputs = driver.GenerateCode(); var outputs = driver.GenerateCode();
foreach (var output in outputs) foreach (var output in outputs)

Loading…
Cancel
Save