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. 2
      src/Generator/Driver.cs
  2. 8
      src/Generator/Options.cs

2
src/Generator/Driver.cs

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

8
src/Generator/Options.cs

@ -56,6 +56,14 @@ namespace CppSharp
public bool ShowHelpText; 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 // Parser options
public List<string> Headers; public List<string> Headers;
public bool IgnoreParseWarnings; public bool IgnoreParseWarnings;

Loading…
Cancel
Save