Browse Source

Added an option to compile the generated C# code.

pull/224/head
triton 12 years ago
parent
commit
2426c3eedb
  1. 7
      src/Generator/Driver.cs
  2. 5
      src/Generator/Options.cs

7
src/Generator/Driver.cs

@ -351,8 +351,11 @@ namespace CppSharp
} }
} }
public void CompileCode() public void CompileCode()
{ {
if (!Options.CompileCode)
return;
var assemblyFile = string.IsNullOrEmpty(Options.LibraryName) ? var assemblyFile = string.IsNullOrEmpty(Options.LibraryName) ?
"out.dll" : Options.LibraryName + ".dll"; "out.dll" : Options.LibraryName + ".dll";

5
src/Generator/Options.cs

@ -101,6 +101,11 @@ namespace CppSharp
public List<string> NoGenIncludeDirs; public List<string> NoGenIncludeDirs;
public string NoGenIncludePrefix = ""; public string NoGenIncludePrefix = "";
/// <summary>
/// Wether the generated C# code should be automatically compiled.
/// </summary>
public bool CompileCode;
/// <summary> /// <summary>
/// Enable this option to enable generation of finalizers. /// Enable this option to enable generation of finalizers.
/// Works in both CLI and C# backends. /// Works in both CLI and C# backends.

Loading…
Cancel
Save