Support changing C# nullable references context build option

This commit is contained in:
2023-06-19 19:32:38 +03:00
parent 6f487bcab5
commit b82f19a0df
3 changed files with 40 additions and 2 deletions

View File

@@ -23,6 +23,32 @@ namespace Flax.Build.NativeCpp
GenerateProject = 1,
}
/// <summary>
/// The nullable context type used with reference types (C#).
/// </summary>
public enum CSharpNullableReferences
{
/// <summary>
/// The code is nullable oblivious, nullable warnings and language analysis features are disabled.
/// </summary>
Disable,
/// <summary>
/// The compiler enables all null reference analysis and all language features.
/// </summary>
Enable,
/// <summary>
/// The compiler performs all null analysis and emits warnings when code might dereference null.
/// </summary>
Warnings,
/// <summary>
/// The compiler doesn't perform null analysis or emit warnings when code might dereference null.
/// </summary>
Annotations,
}
/// <summary>
/// The native C++ module build settings container.
/// </summary>
@@ -188,6 +214,15 @@ namespace Flax.Build.NativeCpp
/// </summary>
public bool IgnoreMissingDocumentationWarnings;
/// <summary>
/// The nullable context used in C# project.
/// </summary>
public CSharpNullableReferences CSharpNullableReferences = CSharpNullableReferences.Disable;
public ScriptingAPIOptions()
{
}
/// <summary>
/// Adds the other options into this.
/// </summary>