Browse Source

Added support for a "dry run" option that does not write anything to disk.

pull/238/head
triton 11 years ago
parent
commit
acef972a55
  1. 4
      src/Generator/Driver.cs
  2. 10
      src/Generator/Options.cs

4
src/Generator/Driver.cs

@ -470,7 +470,9 @@ namespace CppSharp @@ -470,7 +470,9 @@ namespace CppSharp
}
}
driver.WriteCode(outputs);
if (!driver.Options.DryRun)
driver.WriteCode(outputs);
if (driver.Options.IsCSharpGenerator)
driver.CompileCode();
}

10
src/Generator/Options.cs

@ -54,7 +54,15 @@ namespace CppSharp @@ -54,7 +54,15 @@ namespace CppSharp
// General options
public bool Quiet;
public bool ShowHelpText;
public bool OutputDebug;
public bool OutputDebug;
/// <summary>
/// Set to true to simulate generating without actually writing
/// any output to disk. This can be useful to activate while
/// debugging the parser generator so generator bugs do not get
/// in the way while iterating.
/// </summary>
public bool DryRun;
// Parser options
public List<string> Headers;

Loading…
Cancel
Save