Browse Source

Split compilation options into Compilation.cs.

pull/829/head
Joao Matos 8 years ago
parent
commit
5857c2d17c
  1. 33
      src/Core/Compilation.cs
  2. 32
      src/Generator/Options.cs

33
src/Core/Compilation.cs

@ -0,0 +1,33 @@ @@ -0,0 +1,33 @@
namespace CppSharp
{
public enum CompilationTarget
{
SharedLibrary,
StaticLibrary,
Application
}
public class CompilationOptions
{
/// <summary>
/// Target platform for code compilation.
/// </summary>
public TargetPlatform Platform;
/// <summary>
/// Specifies the VS version.
/// </summary>
/// <remarks>When null, latest is used.</remarks>
public VisualStudioVersion VsVersion;
// If code compilation is enabled, then sets the compilation target.
public CompilationTarget Target;
// If true, will compile the generated as a shared library / DLL.
public bool CompileSharedLibrary => Target == CompilationTarget.SharedLibrary;
// If true, will force the generation of debug metadata for the native
// and managed code.
public bool DebugMode;
}
}

32
src/Generator/Options.cs

@ -8,13 +8,6 @@ using CppSharp.Generators; @@ -8,13 +8,6 @@ using CppSharp.Generators;
namespace CppSharp
{
public enum CompilationTarget
{
SharedLibrary,
StaticLibrary,
Application
}
public class DriverOptions
{
public DriverOptions()
@ -132,30 +125,7 @@ namespace CppSharp @@ -132,30 +125,7 @@ namespace CppSharp
#endregion
#region Compilation options (Embeddinator-specific for now)
/// <summary>
/// Target platform for code compilation.
/// </summary>
public TargetPlatform Platform;
/// <summary>
/// Specifies the VS version.
/// </summary>
/// <remarks>When null, latest is used.</remarks>
public VisualStudioVersion VsVersion;
// If code compilation is enabled, then sets the compilation target.
public CompilationTarget Target;
// If true, will compile the generated as a shared library / DLL.
public bool CompileSharedLibrary => Target == CompilationTarget.SharedLibrary;
// If true, will force the generation of debug metadata for the native
// and managed code.
public bool DebugMode;
#endregion
public CompilationOptions Compilation;
#region Generator options

Loading…
Cancel
Save