From e00b44b366902ac5041b8694ccf72c72377f7c48 Mon Sep 17 00:00:00 2001 From: Lukas Gasselsberger Date: Fri, 17 Jul 2026 19:30:57 +0200 Subject: [PATCH 1/2] Add tool definition for `cmake` --- src/Fallout.Common/Tools/CMake/CMake.json | 119 ++++++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 src/Fallout.Common/Tools/CMake/CMake.json diff --git a/src/Fallout.Common/Tools/CMake/CMake.json b/src/Fallout.Common/Tools/CMake/CMake.json new file mode 100644 index 000000000..3b4152df3 --- /dev/null +++ b/src/Fallout.Common/Tools/CMake/CMake.json @@ -0,0 +1,119 @@ +{ + "$schema": "https://raw.githubusercontent.com/Fallout-build/Fallout/main/src/Fallout.Tooling.Generator/schema.json", + "references": [ + "https://cmake.org/cmake/help/latest/manual/cmake.1.html" + ], + "name": "CMake", + "officialUrl": "https://cmake.org/cmake/help/latest/manual/cmake.1.html", + "help": "The cmake executable is the command-line interface of the cross-platform build system generator CMake.", + "pathExecutable": "cmake", + "tasks": [ + { + "help": "Generates a build project using cmake.", + "postfix": "Generate", + "settingsClass": { + "properties": [ + { + "name": "Generator", + "type": "CMakeGenerator", + "format": "-G {value}", + "default": "CMakeGenerator.Visual_Studio_16_2019", + "help": "Specify the build system to generate." + }, + { + "name": "Platform", + "type": "CMakePlatform", + "format": "-A {value}", + "default": "CMakePlatform.x64", + "help": "Specify the platform to build for." + }, + { + "name": "RootDirectory", + "type": "string", + "format": "-S {value}", + "default": "\".\"", + "help": "Specify the root directory of the 'CMakeLists.txt' file." + }, + { + "name": "OutputDirectory", + "type": "string", + "format": "-B {value}", + "default": "\"./out\"", + "help": "Specify the configuration to use when running the install script." + }, + { + "name": "ToolChain", + "type": "string", + "format": "-DCMAKE_TOOLCHAIN_FILE:FILEPATH={value}", + "help": "Specify the path to a toolchain file to use." + } + ] + } + }, + { + "help": "Runs the `cmake --install` command on a project generated with cmake.", + "postfix": "Install", + "definiteArgument": "--install", + "settingsClass": { + "properties": [ + { + "name": "RootDirectory", + "type": "string", + "format": "{value}", + "default": "\".\"", + "help": "Specify the root directory of the cmake install script." + }, + { + "name": "Configuration", + "type": "CMakeConfiguration", + "format": "--config {value}", + "default": "CMakeConfiguration.Debug", + "help": "Specify the root directory of the 'CMakeLists.txt' file." + }, + { + "name": "OutputDirectory", + "type": "string", + "format": "--prefix {value}", + "help": "Specify the output directory of the install script." + }, + { + "name": "Component", + "type": "string", + "format": "--component {value}", + "help": "Specify the component to install." + } + ] + } + } + ], + "enumerations": [ + { + "name": "CMakeGenerator", + "values": [ + "Visual Studio 15 2017", + "Visual Studio 16 2019", + "Visual Studio 17 2022", + "Ninja", + "Xcode" + ] + }, + { + "name": "CMakePlatform", + "values": [ + "Win32", + "x64", + "ARM", + "ARM64" + ] + }, + { + "name": "CMakeConfiguration", + "values": [ + "Debug", + "RelWithDebInfo", + "Release", + "MinSizeRel" + ] + } + ] +} \ No newline at end of file From 5b0df21954676e26b52407b0921cd19fb6cee6af Mon Sep 17 00:00:00 2001 From: Lukas Gasselsberger | alu-one Date: Sat, 18 Jul 2026 23:28:52 +0200 Subject: [PATCH 2/2] Add missing options --- .../Tools/CMake/CMake.Generated.cs | 645 ++++++++++++++++++ src/Fallout.Common/Tools/CMake/CMake.json | 394 +++++++---- 2 files changed, 921 insertions(+), 118 deletions(-) create mode 100644 src/Fallout.Common/Tools/CMake/CMake.Generated.cs diff --git a/src/Fallout.Common/Tools/CMake/CMake.Generated.cs b/src/Fallout.Common/Tools/CMake/CMake.Generated.cs new file mode 100644 index 000000000..54cd33608 --- /dev/null +++ b/src/Fallout.Common/Tools/CMake/CMake.Generated.cs @@ -0,0 +1,645 @@ +// Generated from https://github.com/Fallout-build/Fallout/blob/main/src/Fallout.Common/Tools/CMake/CMake.json + +using Fallout.Common; +using Fallout.Common.Tooling; +using Fallout.Common.Tools; +using Fallout.Common.Utilities.Collections; +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Linq; +using System.Text; +using System.Text.Json.Serialization; + +namespace Fallout.Common.Tools.CMake; + +///

The cmake executable is the command-line interface of the cross-platform build system generator CMake.

For more details, visit the official website.

+[ExcludeFromCodeCoverage] +[PathTool(Executable = PathExecutable)] +public partial class CMakeTasks : ToolTasks, IRequirePathTool +{ + public static string CMakePath { get => new CMakeTasks().GetToolPathInternal(); set => new CMakeTasks().SetToolPath(value); } + public const string PathExecutable = "cmake"; + ///

The cmake executable is the command-line interface of the cross-platform build system generator CMake.

For more details, visit the official website.

+ public static IReadOnlyCollection CMake(ArgumentStringHandler arguments, string workingDirectory = null, IReadOnlyDictionary environmentVariables = null, int? timeout = null, bool? logOutput = null, bool? logInvocation = null, Action logger = null, Func exitHandler = null) => new CMakeTasks().Run(arguments, workingDirectory, environmentVariables, timeout, logOutput, logInvocation, logger, exitHandler); + ///

Generates a build project using cmake.

For more details, visit the official website.

+ ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

  • --debug-output via
  • --fresh via
  • --install-prefix via
  • --log-level via
  • --trace via
  • --trace-expand via
  • --warn-uninitialized via
  • --warn-unused-vars via
  • -A via
  • -B via
  • -D via
  • -DCMAKE_TOOLCHAIN_FILE:FILEPATH via
  • -G via
  • -S via
  • -T via
  • -U via
  • -Wdev via
  • -Wno-dev via
+ public static IReadOnlyCollection CMakeGenerate(CMakeGenerateSettings options = null) => new CMakeTasks().Run(options); + /// + public static IReadOnlyCollection CMakeGenerate(Configure configurator) => new CMakeTasks().Run(configurator.Invoke(new CMakeGenerateSettings())); + /// + public static IEnumerable<(CMakeGenerateSettings Settings, IReadOnlyCollection Output)> CMakeGenerate(CombinatorialConfigure configurator, int degreeOfParallelism = 1, bool completeOnFailure = false) => configurator.Invoke(CMakeGenerate, degreeOfParallelism, completeOnFailure); + ///

Runs the `cmake --build` command on a project generated with cmake.

For more details, visit the official website.

+ ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

  • <outputDirectory> via
  • -- via
  • --clean-first via
  • --config via
  • --parallel via
  • --target via
  • --verbose via
+ public static IReadOnlyCollection CMakeBuild(CMakeBuildSettings options = null) => new CMakeTasks().Run(options); + /// + public static IReadOnlyCollection CMakeBuild(Configure configurator) => new CMakeTasks().Run(configurator.Invoke(new CMakeBuildSettings())); + /// + public static IEnumerable<(CMakeBuildSettings Settings, IReadOnlyCollection Output)> CMakeBuild(CombinatorialConfigure configurator, int degreeOfParallelism = 1, bool completeOnFailure = false) => configurator.Invoke(CMakeBuild, degreeOfParallelism, completeOnFailure); + ///

Runs the `cmake --install` command on a project generated with cmake.

For more details, visit the official website.

+ ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

  • <rootDirectory> via
  • --component via
  • --config via
  • --prefix via
  • --strip via
  • --verbose via
+ public static IReadOnlyCollection CMakeInstall(CMakeInstallSettings options = null) => new CMakeTasks().Run(options); + /// + public static IReadOnlyCollection CMakeInstall(Configure configurator) => new CMakeTasks().Run(configurator.Invoke(new CMakeInstallSettings())); + /// + public static IEnumerable<(CMakeInstallSettings Settings, IReadOnlyCollection Output)> CMakeInstall(CombinatorialConfigure configurator, int degreeOfParallelism = 1, bool completeOnFailure = false) => configurator.Invoke(CMakeInstall, degreeOfParallelism, completeOnFailure); +} +#region CMakeGenerateSettings +/// +[ExcludeFromCodeCoverage] +[Command(Type = typeof(CMakeTasks), Command = nameof(CMakeTasks.CMakeGenerate))] +public partial class CMakeGenerateSettings : ToolOptions +{ + /// Specify the build system to generate. + [Argument(Format = "-G {value}")] public CMakeGenerator Generator => Get(() => Generator); + /// Specify the platform to build for. + [Argument(Format = "-A {value}")] public CMakePlatform Platform => Get(() => Platform); + /// Specify the root directory of the 'CMakeLists.txt' file. + [Argument(Format = "-S {value}")] public string RootDirectory => Get(() => RootDirectory); + /// Specify the configuration to use when running the install script. + [Argument(Format = "-B {value}")] public string OutputDirectory => Get(() => OutputDirectory); + /// Specify the path to a toolchain file to use. + [Argument(Format = "-DCMAKE_TOOLCHAIN_FILE:FILEPATH={value}")] public string ToolChain => Get(() => ToolChain); + /// Specify the toolset name if supported by the generator. + [Argument(Format = "-T {value}")] public string ToolsetSpec => Get(() => ToolsetSpec); + /// Specify the installation prefix to be used in the generated project. + [Argument(Format = "--install-prefix {value}")] public string InstallPrefix => Get(() => InstallPrefix); + /// Create or update a CMake cache entry, in the form [:]=. + [Argument(Format = "-D {value}")] public IReadOnlyList Define => Get>(() => Define); + /// Remove matching entries from the CMake cache, given a globbing expression. + [Argument(Format = "-U {value}")] public IReadOnlyList Undefine => Get>(() => Undefine); + /// Perform a fresh configuration, removing any existing cache file. + [Argument(Format = "--fresh")] public bool? Fresh => Get(() => Fresh); + /// Enable developer warnings. + [Argument(Format = "-Wdev")] public bool? WarnDev => Get(() => WarnDev); + /// Suppress developer warnings. + [Argument(Format = "-Wno-dev")] public bool? NoWarnDev => Get(() => NoWarnDev); + /// Warn about uninitialized values. + [Argument(Format = "--warn-uninitialized")] public bool? WarnUninitialized => Get(() => WarnUninitialized); + /// Warn about unused variables. + [Argument(Format = "--warn-unused-vars")] public bool? WarnUnusedVars => Get(() => WarnUnusedVars); + /// Set the log level to one of: ERROR, WARNING, NOTICE, STATUS, VERBOSE, DEBUG, TRACE. + [Argument(Format = "--log-level={value}")] public CMakeLogLevel LogLevel => Get(() => LogLevel); + /// Put cmake in a debug mode. + [Argument(Format = "--debug-output")] public bool? Debug => Get(() => Debug); + /// Put cmake in trace mode. + [Argument(Format = "--trace")] public bool? Trace => Get(() => Trace); + /// Put cmake in trace mode, expanding variables. + [Argument(Format = "--trace-expand")] public bool? TraceExpand => Get(() => TraceExpand); +} +#endregion +#region CMakeBuildSettings +/// +[ExcludeFromCodeCoverage] +[Command(Type = typeof(CMakeTasks), Command = nameof(CMakeTasks.CMakeBuild), Arguments = "--build")] +public partial class CMakeBuildSettings : ToolOptions +{ + /// Specify the project binary directory to build. + [Argument(Format = "{value}")] public string OutputDirectory => Get(() => OutputDirectory); + /// Specify the build configuration for multi-config generators. + [Argument(Format = "--config {value}")] public CMakeConfiguration Configuration => Get(() => Configuration); + /// Specify the targets to build instead of the default target. + [Argument(Format = "--target {value}")] public IReadOnlyList Target => Get>(() => Target); + /// Specify the maximum number of concurrent processes to use when building. + [Argument(Format = "--parallel {value}")] public int? Parallel => Get(() => Parallel); + /// Build target 'clean' first, then build. + [Argument(Format = "--clean-first")] public bool? CleanFirst => Get(() => CleanFirst); + /// Enable verbose output - if supported - including the build commands to be executed. + [Argument(Format = "--verbose")] public bool? Verbose => Get(() => Verbose); + /// Pass remaining options to the native build tool, placed after '--'. + [Argument(Format = "-- {value}", Position = -1, Separator = " ")] public IReadOnlyList NativeToolOptions => Get>(() => NativeToolOptions); +} +#endregion +#region CMakeInstallSettings +/// +[ExcludeFromCodeCoverage] +[Command(Type = typeof(CMakeTasks), Command = nameof(CMakeTasks.CMakeInstall), Arguments = "--install")] +public partial class CMakeInstallSettings : ToolOptions +{ + /// Specify the root directory of the cmake install script. + [Argument(Format = "{value}")] public string RootDirectory => Get(() => RootDirectory); + /// Specify the root directory of the 'CMakeLists.txt' file. + [Argument(Format = "--config {value}")] public CMakeConfiguration Configuration => Get(() => Configuration); + /// Specify the output directory of the install script. + [Argument(Format = "--prefix {value}")] public string OutputDirectory => Get(() => OutputDirectory); + /// Specify the component to install. + [Argument(Format = "--component {value}")] public string Component => Get(() => Component); + /// Strip before installing. + [Argument(Format = "--strip")] public bool? Strip => Get(() => Strip); + /// Enable verbose output. + [Argument(Format = "--verbose")] public bool? Verbose => Get(() => Verbose); +} +#endregion +#region CMakeGenerateSettingsExtensions +/// +[ExcludeFromCodeCoverage] +public static partial class CMakeGenerateSettingsExtensions +{ + #region Generator + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Generator))] + public static T SetGenerator(this T o, CMakeGenerator v) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.Generator, v)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Generator))] + public static T ResetGenerator(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Remove(() => o.Generator)); + #endregion + #region Platform + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Platform))] + public static T SetPlatform(this T o, CMakePlatform v) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.Platform, v)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Platform))] + public static T ResetPlatform(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Remove(() => o.Platform)); + #endregion + #region RootDirectory + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.RootDirectory))] + public static T SetRootDirectory(this T o, string v) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.RootDirectory, v)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.RootDirectory))] + public static T ResetRootDirectory(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Remove(() => o.RootDirectory)); + #endregion + #region OutputDirectory + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.OutputDirectory))] + public static T SetOutputDirectory(this T o, string v) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.OutputDirectory, v)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.OutputDirectory))] + public static T ResetOutputDirectory(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Remove(() => o.OutputDirectory)); + #endregion + #region ToolChain + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.ToolChain))] + public static T SetToolChain(this T o, string v) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.ToolChain, v)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.ToolChain))] + public static T ResetToolChain(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Remove(() => o.ToolChain)); + #endregion + #region ToolsetSpec + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.ToolsetSpec))] + public static T SetToolsetSpec(this T o, string v) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.ToolsetSpec, v)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.ToolsetSpec))] + public static T ResetToolsetSpec(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Remove(() => o.ToolsetSpec)); + #endregion + #region InstallPrefix + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.InstallPrefix))] + public static T SetInstallPrefix(this T o, string v) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.InstallPrefix, v)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.InstallPrefix))] + public static T ResetInstallPrefix(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Remove(() => o.InstallPrefix)); + #endregion + #region Define + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Define))] + public static T SetDefine(this T o, params string[] v) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.Define, v)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Define))] + public static T SetDefine(this T o, IEnumerable v) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.Define, v)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Define))] + public static T AddDefine(this T o, params string[] v) where T : CMakeGenerateSettings => o.Modify(b => b.AddCollection(() => o.Define, v)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Define))] + public static T AddDefine(this T o, IEnumerable v) where T : CMakeGenerateSettings => o.Modify(b => b.AddCollection(() => o.Define, v)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Define))] + public static T RemoveDefine(this T o, params string[] v) where T : CMakeGenerateSettings => o.Modify(b => b.RemoveCollection(() => o.Define, v)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Define))] + public static T RemoveDefine(this T o, IEnumerable v) where T : CMakeGenerateSettings => o.Modify(b => b.RemoveCollection(() => o.Define, v)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Define))] + public static T ClearDefine(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.ClearCollection(() => o.Define)); + #endregion + #region Undefine + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Undefine))] + public static T SetUndefine(this T o, params string[] v) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.Undefine, v)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Undefine))] + public static T SetUndefine(this T o, IEnumerable v) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.Undefine, v)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Undefine))] + public static T AddUndefine(this T o, params string[] v) where T : CMakeGenerateSettings => o.Modify(b => b.AddCollection(() => o.Undefine, v)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Undefine))] + public static T AddUndefine(this T o, IEnumerable v) where T : CMakeGenerateSettings => o.Modify(b => b.AddCollection(() => o.Undefine, v)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Undefine))] + public static T RemoveUndefine(this T o, params string[] v) where T : CMakeGenerateSettings => o.Modify(b => b.RemoveCollection(() => o.Undefine, v)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Undefine))] + public static T RemoveUndefine(this T o, IEnumerable v) where T : CMakeGenerateSettings => o.Modify(b => b.RemoveCollection(() => o.Undefine, v)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Undefine))] + public static T ClearUndefine(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.ClearCollection(() => o.Undefine)); + #endregion + #region Fresh + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Fresh))] + public static T SetFresh(this T o, bool? v) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.Fresh, v)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Fresh))] + public static T ResetFresh(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Remove(() => o.Fresh)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Fresh))] + public static T EnableFresh(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.Fresh, true)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Fresh))] + public static T DisableFresh(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.Fresh, false)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Fresh))] + public static T ToggleFresh(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.Fresh, !o.Fresh)); + #endregion + #region WarnDev + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.WarnDev))] + public static T SetWarnDev(this T o, bool? v) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.WarnDev, v)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.WarnDev))] + public static T ResetWarnDev(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Remove(() => o.WarnDev)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.WarnDev))] + public static T EnableWarnDev(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.WarnDev, true)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.WarnDev))] + public static T DisableWarnDev(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.WarnDev, false)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.WarnDev))] + public static T ToggleWarnDev(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.WarnDev, !o.WarnDev)); + #endregion + #region NoWarnDev + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.NoWarnDev))] + public static T SetNoWarnDev(this T o, bool? v) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.NoWarnDev, v)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.NoWarnDev))] + public static T ResetNoWarnDev(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Remove(() => o.NoWarnDev)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.NoWarnDev))] + public static T EnableNoWarnDev(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.NoWarnDev, true)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.NoWarnDev))] + public static T DisableNoWarnDev(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.NoWarnDev, false)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.NoWarnDev))] + public static T ToggleNoWarnDev(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.NoWarnDev, !o.NoWarnDev)); + #endregion + #region WarnUninitialized + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.WarnUninitialized))] + public static T SetWarnUninitialized(this T o, bool? v) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.WarnUninitialized, v)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.WarnUninitialized))] + public static T ResetWarnUninitialized(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Remove(() => o.WarnUninitialized)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.WarnUninitialized))] + public static T EnableWarnUninitialized(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.WarnUninitialized, true)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.WarnUninitialized))] + public static T DisableWarnUninitialized(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.WarnUninitialized, false)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.WarnUninitialized))] + public static T ToggleWarnUninitialized(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.WarnUninitialized, !o.WarnUninitialized)); + #endregion + #region WarnUnusedVars + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.WarnUnusedVars))] + public static T SetWarnUnusedVars(this T o, bool? v) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.WarnUnusedVars, v)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.WarnUnusedVars))] + public static T ResetWarnUnusedVars(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Remove(() => o.WarnUnusedVars)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.WarnUnusedVars))] + public static T EnableWarnUnusedVars(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.WarnUnusedVars, true)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.WarnUnusedVars))] + public static T DisableWarnUnusedVars(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.WarnUnusedVars, false)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.WarnUnusedVars))] + public static T ToggleWarnUnusedVars(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.WarnUnusedVars, !o.WarnUnusedVars)); + #endregion + #region LogLevel + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.LogLevel))] + public static T SetLogLevel(this T o, CMakeLogLevel v) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.LogLevel, v)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.LogLevel))] + public static T ResetLogLevel(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Remove(() => o.LogLevel)); + #endregion + #region Debug + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Debug))] + public static T SetDebug(this T o, bool? v) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.Debug, v)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Debug))] + public static T ResetDebug(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Remove(() => o.Debug)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Debug))] + public static T EnableDebug(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.Debug, true)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Debug))] + public static T DisableDebug(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.Debug, false)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Debug))] + public static T ToggleDebug(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.Debug, !o.Debug)); + #endregion + #region Trace + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Trace))] + public static T SetTrace(this T o, bool? v) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.Trace, v)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Trace))] + public static T ResetTrace(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Remove(() => o.Trace)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Trace))] + public static T EnableTrace(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.Trace, true)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Trace))] + public static T DisableTrace(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.Trace, false)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.Trace))] + public static T ToggleTrace(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.Trace, !o.Trace)); + #endregion + #region TraceExpand + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.TraceExpand))] + public static T SetTraceExpand(this T o, bool? v) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.TraceExpand, v)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.TraceExpand))] + public static T ResetTraceExpand(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Remove(() => o.TraceExpand)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.TraceExpand))] + public static T EnableTraceExpand(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.TraceExpand, true)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.TraceExpand))] + public static T DisableTraceExpand(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.TraceExpand, false)); + /// + [Builder(Type = typeof(CMakeGenerateSettings), Property = nameof(CMakeGenerateSettings.TraceExpand))] + public static T ToggleTraceExpand(this T o) where T : CMakeGenerateSettings => o.Modify(b => b.Set(() => o.TraceExpand, !o.TraceExpand)); + #endregion +} +#endregion +#region CMakeBuildSettingsExtensions +/// +[ExcludeFromCodeCoverage] +public static partial class CMakeBuildSettingsExtensions +{ + #region OutputDirectory + /// + [Builder(Type = typeof(CMakeBuildSettings), Property = nameof(CMakeBuildSettings.OutputDirectory))] + public static T SetOutputDirectory(this T o, string v) where T : CMakeBuildSettings => o.Modify(b => b.Set(() => o.OutputDirectory, v)); + /// + [Builder(Type = typeof(CMakeBuildSettings), Property = nameof(CMakeBuildSettings.OutputDirectory))] + public static T ResetOutputDirectory(this T o) where T : CMakeBuildSettings => o.Modify(b => b.Remove(() => o.OutputDirectory)); + #endregion + #region Configuration + /// + [Builder(Type = typeof(CMakeBuildSettings), Property = nameof(CMakeBuildSettings.Configuration))] + public static T SetConfiguration(this T o, CMakeConfiguration v) where T : CMakeBuildSettings => o.Modify(b => b.Set(() => o.Configuration, v)); + /// + [Builder(Type = typeof(CMakeBuildSettings), Property = nameof(CMakeBuildSettings.Configuration))] + public static T ResetConfiguration(this T o) where T : CMakeBuildSettings => o.Modify(b => b.Remove(() => o.Configuration)); + #endregion + #region Target + /// + [Builder(Type = typeof(CMakeBuildSettings), Property = nameof(CMakeBuildSettings.Target))] + public static T SetTarget(this T o, params string[] v) where T : CMakeBuildSettings => o.Modify(b => b.Set(() => o.Target, v)); + /// + [Builder(Type = typeof(CMakeBuildSettings), Property = nameof(CMakeBuildSettings.Target))] + public static T SetTarget(this T o, IEnumerable v) where T : CMakeBuildSettings => o.Modify(b => b.Set(() => o.Target, v)); + /// + [Builder(Type = typeof(CMakeBuildSettings), Property = nameof(CMakeBuildSettings.Target))] + public static T AddTarget(this T o, params string[] v) where T : CMakeBuildSettings => o.Modify(b => b.AddCollection(() => o.Target, v)); + /// + [Builder(Type = typeof(CMakeBuildSettings), Property = nameof(CMakeBuildSettings.Target))] + public static T AddTarget(this T o, IEnumerable v) where T : CMakeBuildSettings => o.Modify(b => b.AddCollection(() => o.Target, v)); + /// + [Builder(Type = typeof(CMakeBuildSettings), Property = nameof(CMakeBuildSettings.Target))] + public static T RemoveTarget(this T o, params string[] v) where T : CMakeBuildSettings => o.Modify(b => b.RemoveCollection(() => o.Target, v)); + /// + [Builder(Type = typeof(CMakeBuildSettings), Property = nameof(CMakeBuildSettings.Target))] + public static T RemoveTarget(this T o, IEnumerable v) where T : CMakeBuildSettings => o.Modify(b => b.RemoveCollection(() => o.Target, v)); + /// + [Builder(Type = typeof(CMakeBuildSettings), Property = nameof(CMakeBuildSettings.Target))] + public static T ClearTarget(this T o) where T : CMakeBuildSettings => o.Modify(b => b.ClearCollection(() => o.Target)); + #endregion + #region Parallel + /// + [Builder(Type = typeof(CMakeBuildSettings), Property = nameof(CMakeBuildSettings.Parallel))] + public static T SetParallel(this T o, int? v) where T : CMakeBuildSettings => o.Modify(b => b.Set(() => o.Parallel, v)); + /// + [Builder(Type = typeof(CMakeBuildSettings), Property = nameof(CMakeBuildSettings.Parallel))] + public static T ResetParallel(this T o) where T : CMakeBuildSettings => o.Modify(b => b.Remove(() => o.Parallel)); + #endregion + #region CleanFirst + /// + [Builder(Type = typeof(CMakeBuildSettings), Property = nameof(CMakeBuildSettings.CleanFirst))] + public static T SetCleanFirst(this T o, bool? v) where T : CMakeBuildSettings => o.Modify(b => b.Set(() => o.CleanFirst, v)); + /// + [Builder(Type = typeof(CMakeBuildSettings), Property = nameof(CMakeBuildSettings.CleanFirst))] + public static T ResetCleanFirst(this T o) where T : CMakeBuildSettings => o.Modify(b => b.Remove(() => o.CleanFirst)); + /// + [Builder(Type = typeof(CMakeBuildSettings), Property = nameof(CMakeBuildSettings.CleanFirst))] + public static T EnableCleanFirst(this T o) where T : CMakeBuildSettings => o.Modify(b => b.Set(() => o.CleanFirst, true)); + /// + [Builder(Type = typeof(CMakeBuildSettings), Property = nameof(CMakeBuildSettings.CleanFirst))] + public static T DisableCleanFirst(this T o) where T : CMakeBuildSettings => o.Modify(b => b.Set(() => o.CleanFirst, false)); + /// + [Builder(Type = typeof(CMakeBuildSettings), Property = nameof(CMakeBuildSettings.CleanFirst))] + public static T ToggleCleanFirst(this T o) where T : CMakeBuildSettings => o.Modify(b => b.Set(() => o.CleanFirst, !o.CleanFirst)); + #endregion + #region Verbose + /// + [Builder(Type = typeof(CMakeBuildSettings), Property = nameof(CMakeBuildSettings.Verbose))] + public static T SetVerbose(this T o, bool? v) where T : CMakeBuildSettings => o.Modify(b => b.Set(() => o.Verbose, v)); + /// + [Builder(Type = typeof(CMakeBuildSettings), Property = nameof(CMakeBuildSettings.Verbose))] + public static T ResetVerbose(this T o) where T : CMakeBuildSettings => o.Modify(b => b.Remove(() => o.Verbose)); + /// + [Builder(Type = typeof(CMakeBuildSettings), Property = nameof(CMakeBuildSettings.Verbose))] + public static T EnableVerbose(this T o) where T : CMakeBuildSettings => o.Modify(b => b.Set(() => o.Verbose, true)); + /// + [Builder(Type = typeof(CMakeBuildSettings), Property = nameof(CMakeBuildSettings.Verbose))] + public static T DisableVerbose(this T o) where T : CMakeBuildSettings => o.Modify(b => b.Set(() => o.Verbose, false)); + /// + [Builder(Type = typeof(CMakeBuildSettings), Property = nameof(CMakeBuildSettings.Verbose))] + public static T ToggleVerbose(this T o) where T : CMakeBuildSettings => o.Modify(b => b.Set(() => o.Verbose, !o.Verbose)); + #endregion + #region NativeToolOptions + /// + [Builder(Type = typeof(CMakeBuildSettings), Property = nameof(CMakeBuildSettings.NativeToolOptions))] + public static T SetNativeToolOptions(this T o, params string[] v) where T : CMakeBuildSettings => o.Modify(b => b.Set(() => o.NativeToolOptions, v)); + /// + [Builder(Type = typeof(CMakeBuildSettings), Property = nameof(CMakeBuildSettings.NativeToolOptions))] + public static T SetNativeToolOptions(this T o, IEnumerable v) where T : CMakeBuildSettings => o.Modify(b => b.Set(() => o.NativeToolOptions, v)); + /// + [Builder(Type = typeof(CMakeBuildSettings), Property = nameof(CMakeBuildSettings.NativeToolOptions))] + public static T AddNativeToolOptions(this T o, params string[] v) where T : CMakeBuildSettings => o.Modify(b => b.AddCollection(() => o.NativeToolOptions, v)); + /// + [Builder(Type = typeof(CMakeBuildSettings), Property = nameof(CMakeBuildSettings.NativeToolOptions))] + public static T AddNativeToolOptions(this T o, IEnumerable v) where T : CMakeBuildSettings => o.Modify(b => b.AddCollection(() => o.NativeToolOptions, v)); + /// + [Builder(Type = typeof(CMakeBuildSettings), Property = nameof(CMakeBuildSettings.NativeToolOptions))] + public static T RemoveNativeToolOptions(this T o, params string[] v) where T : CMakeBuildSettings => o.Modify(b => b.RemoveCollection(() => o.NativeToolOptions, v)); + /// + [Builder(Type = typeof(CMakeBuildSettings), Property = nameof(CMakeBuildSettings.NativeToolOptions))] + public static T RemoveNativeToolOptions(this T o, IEnumerable v) where T : CMakeBuildSettings => o.Modify(b => b.RemoveCollection(() => o.NativeToolOptions, v)); + /// + [Builder(Type = typeof(CMakeBuildSettings), Property = nameof(CMakeBuildSettings.NativeToolOptions))] + public static T ClearNativeToolOptions(this T o) where T : CMakeBuildSettings => o.Modify(b => b.ClearCollection(() => o.NativeToolOptions)); + #endregion +} +#endregion +#region CMakeInstallSettingsExtensions +/// +[ExcludeFromCodeCoverage] +public static partial class CMakeInstallSettingsExtensions +{ + #region RootDirectory + /// + [Builder(Type = typeof(CMakeInstallSettings), Property = nameof(CMakeInstallSettings.RootDirectory))] + public static T SetRootDirectory(this T o, string v) where T : CMakeInstallSettings => o.Modify(b => b.Set(() => o.RootDirectory, v)); + /// + [Builder(Type = typeof(CMakeInstallSettings), Property = nameof(CMakeInstallSettings.RootDirectory))] + public static T ResetRootDirectory(this T o) where T : CMakeInstallSettings => o.Modify(b => b.Remove(() => o.RootDirectory)); + #endregion + #region Configuration + /// + [Builder(Type = typeof(CMakeInstallSettings), Property = nameof(CMakeInstallSettings.Configuration))] + public static T SetConfiguration(this T o, CMakeConfiguration v) where T : CMakeInstallSettings => o.Modify(b => b.Set(() => o.Configuration, v)); + /// + [Builder(Type = typeof(CMakeInstallSettings), Property = nameof(CMakeInstallSettings.Configuration))] + public static T ResetConfiguration(this T o) where T : CMakeInstallSettings => o.Modify(b => b.Remove(() => o.Configuration)); + #endregion + #region OutputDirectory + /// + [Builder(Type = typeof(CMakeInstallSettings), Property = nameof(CMakeInstallSettings.OutputDirectory))] + public static T SetOutputDirectory(this T o, string v) where T : CMakeInstallSettings => o.Modify(b => b.Set(() => o.OutputDirectory, v)); + /// + [Builder(Type = typeof(CMakeInstallSettings), Property = nameof(CMakeInstallSettings.OutputDirectory))] + public static T ResetOutputDirectory(this T o) where T : CMakeInstallSettings => o.Modify(b => b.Remove(() => o.OutputDirectory)); + #endregion + #region Component + /// + [Builder(Type = typeof(CMakeInstallSettings), Property = nameof(CMakeInstallSettings.Component))] + public static T SetComponent(this T o, string v) where T : CMakeInstallSettings => o.Modify(b => b.Set(() => o.Component, v)); + /// + [Builder(Type = typeof(CMakeInstallSettings), Property = nameof(CMakeInstallSettings.Component))] + public static T ResetComponent(this T o) where T : CMakeInstallSettings => o.Modify(b => b.Remove(() => o.Component)); + #endregion + #region Strip + /// + [Builder(Type = typeof(CMakeInstallSettings), Property = nameof(CMakeInstallSettings.Strip))] + public static T SetStrip(this T o, bool? v) where T : CMakeInstallSettings => o.Modify(b => b.Set(() => o.Strip, v)); + /// + [Builder(Type = typeof(CMakeInstallSettings), Property = nameof(CMakeInstallSettings.Strip))] + public static T ResetStrip(this T o) where T : CMakeInstallSettings => o.Modify(b => b.Remove(() => o.Strip)); + /// + [Builder(Type = typeof(CMakeInstallSettings), Property = nameof(CMakeInstallSettings.Strip))] + public static T EnableStrip(this T o) where T : CMakeInstallSettings => o.Modify(b => b.Set(() => o.Strip, true)); + /// + [Builder(Type = typeof(CMakeInstallSettings), Property = nameof(CMakeInstallSettings.Strip))] + public static T DisableStrip(this T o) where T : CMakeInstallSettings => o.Modify(b => b.Set(() => o.Strip, false)); + /// + [Builder(Type = typeof(CMakeInstallSettings), Property = nameof(CMakeInstallSettings.Strip))] + public static T ToggleStrip(this T o) where T : CMakeInstallSettings => o.Modify(b => b.Set(() => o.Strip, !o.Strip)); + #endregion + #region Verbose + /// + [Builder(Type = typeof(CMakeInstallSettings), Property = nameof(CMakeInstallSettings.Verbose))] + public static T SetVerbose(this T o, bool? v) where T : CMakeInstallSettings => o.Modify(b => b.Set(() => o.Verbose, v)); + /// + [Builder(Type = typeof(CMakeInstallSettings), Property = nameof(CMakeInstallSettings.Verbose))] + public static T ResetVerbose(this T o) where T : CMakeInstallSettings => o.Modify(b => b.Remove(() => o.Verbose)); + /// + [Builder(Type = typeof(CMakeInstallSettings), Property = nameof(CMakeInstallSettings.Verbose))] + public static T EnableVerbose(this T o) where T : CMakeInstallSettings => o.Modify(b => b.Set(() => o.Verbose, true)); + /// + [Builder(Type = typeof(CMakeInstallSettings), Property = nameof(CMakeInstallSettings.Verbose))] + public static T DisableVerbose(this T o) where T : CMakeInstallSettings => o.Modify(b => b.Set(() => o.Verbose, false)); + /// + [Builder(Type = typeof(CMakeInstallSettings), Property = nameof(CMakeInstallSettings.Verbose))] + public static T ToggleVerbose(this T o) where T : CMakeInstallSettings => o.Modify(b => b.Set(() => o.Verbose, !o.Verbose)); + #endregion +} +#endregion +#region CMakeGenerator +/// Used within . +[Serializable] +[ExcludeFromCodeCoverage] +[TypeConverter(typeof(TypeConverter))] +public partial class CMakeGenerator : Enumeration +{ + public static CMakeGenerator Visual_Studio_15_2017 = (CMakeGenerator) "Visual Studio 15 2017"; + public static CMakeGenerator Visual_Studio_16_2019 = (CMakeGenerator) "Visual Studio 16 2019"; + public static CMakeGenerator Visual_Studio_17_2022 = (CMakeGenerator) "Visual Studio 17 2022"; + public static CMakeGenerator Visual_Studio_18_2026 = (CMakeGenerator) "Visual Studio 18 2026"; + public static CMakeGenerator Ninja = (CMakeGenerator) "Ninja"; + public static CMakeGenerator Xcode = (CMakeGenerator) "Xcode"; + public static implicit operator CMakeGenerator(string value) + { + return new CMakeGenerator { Value = value }; + } +} +#endregion +#region CMakePlatform +/// Used within . +[Serializable] +[ExcludeFromCodeCoverage] +[TypeConverter(typeof(TypeConverter))] +public partial class CMakePlatform : Enumeration +{ + public static CMakePlatform Win32 = (CMakePlatform) "Win32"; + public static CMakePlatform x64 = (CMakePlatform) "x64"; + public static CMakePlatform ARM = (CMakePlatform) "ARM"; + public static CMakePlatform ARM64 = (CMakePlatform) "ARM64"; + public static implicit operator CMakePlatform(string value) + { + return new CMakePlatform { Value = value }; + } +} +#endregion +#region CMakeConfiguration +/// Used within . +[Serializable] +[ExcludeFromCodeCoverage] +[TypeConverter(typeof(TypeConverter))] +public partial class CMakeConfiguration : Enumeration +{ + public static CMakeConfiguration Debug = (CMakeConfiguration) "Debug"; + public static CMakeConfiguration RelWithDebInfo = (CMakeConfiguration) "RelWithDebInfo"; + public static CMakeConfiguration Release = (CMakeConfiguration) "Release"; + public static CMakeConfiguration MinSizeRel = (CMakeConfiguration) "MinSizeRel"; + public static implicit operator CMakeConfiguration(string value) + { + return new CMakeConfiguration { Value = value }; + } +} +#endregion +#region CMakeLogLevel +/// Used within . +[Serializable] +[ExcludeFromCodeCoverage] +[TypeConverter(typeof(TypeConverter))] +public partial class CMakeLogLevel : Enumeration +{ + public static CMakeLogLevel Error = (CMakeLogLevel) "Error"; + public static CMakeLogLevel Warning = (CMakeLogLevel) "Warning"; + public static CMakeLogLevel Notice = (CMakeLogLevel) "Notice"; + public static CMakeLogLevel Status = (CMakeLogLevel) "Status"; + public static CMakeLogLevel Verbose = (CMakeLogLevel) "Verbose"; + public static CMakeLogLevel Debug = (CMakeLogLevel) "Debug"; + public static CMakeLogLevel Trace = (CMakeLogLevel) "Trace"; + public static implicit operator CMakeLogLevel(string value) + { + return new CMakeLogLevel { Value = value }; + } +} +#endregion diff --git a/src/Fallout.Common/Tools/CMake/CMake.json b/src/Fallout.Common/Tools/CMake/CMake.json index 3b4152df3..d5e551848 100644 --- a/src/Fallout.Common/Tools/CMake/CMake.json +++ b/src/Fallout.Common/Tools/CMake/CMake.json @@ -1,119 +1,277 @@ { - "$schema": "https://raw.githubusercontent.com/Fallout-build/Fallout/main/src/Fallout.Tooling.Generator/schema.json", - "references": [ - "https://cmake.org/cmake/help/latest/manual/cmake.1.html" - ], - "name": "CMake", - "officialUrl": "https://cmake.org/cmake/help/latest/manual/cmake.1.html", - "help": "The cmake executable is the command-line interface of the cross-platform build system generator CMake.", - "pathExecutable": "cmake", - "tasks": [ - { - "help": "Generates a build project using cmake.", - "postfix": "Generate", - "settingsClass": { - "properties": [ - { - "name": "Generator", - "type": "CMakeGenerator", - "format": "-G {value}", - "default": "CMakeGenerator.Visual_Studio_16_2019", - "help": "Specify the build system to generate." - }, - { - "name": "Platform", - "type": "CMakePlatform", - "format": "-A {value}", - "default": "CMakePlatform.x64", - "help": "Specify the platform to build for." - }, - { - "name": "RootDirectory", - "type": "string", - "format": "-S {value}", - "default": "\".\"", - "help": "Specify the root directory of the 'CMakeLists.txt' file." - }, - { - "name": "OutputDirectory", - "type": "string", - "format": "-B {value}", - "default": "\"./out\"", - "help": "Specify the configuration to use when running the install script." - }, - { - "name": "ToolChain", - "type": "string", - "format": "-DCMAKE_TOOLCHAIN_FILE:FILEPATH={value}", - "help": "Specify the path to a toolchain file to use." - } - ] - } - }, - { - "help": "Runs the `cmake --install` command on a project generated with cmake.", - "postfix": "Install", - "definiteArgument": "--install", - "settingsClass": { - "properties": [ - { - "name": "RootDirectory", - "type": "string", - "format": "{value}", - "default": "\".\"", - "help": "Specify the root directory of the cmake install script." - }, - { - "name": "Configuration", - "type": "CMakeConfiguration", - "format": "--config {value}", - "default": "CMakeConfiguration.Debug", - "help": "Specify the root directory of the 'CMakeLists.txt' file." - }, - { - "name": "OutputDirectory", - "type": "string", - "format": "--prefix {value}", - "help": "Specify the output directory of the install script." - }, - { - "name": "Component", - "type": "string", - "format": "--component {value}", - "help": "Specify the component to install." - } - ] - } - } - ], - "enumerations": [ - { - "name": "CMakeGenerator", - "values": [ - "Visual Studio 15 2017", - "Visual Studio 16 2019", - "Visual Studio 17 2022", - "Ninja", - "Xcode" - ] - }, - { - "name": "CMakePlatform", - "values": [ - "Win32", - "x64", - "ARM", - "ARM64" - ] - }, - { - "name": "CMakeConfiguration", - "values": [ - "Debug", - "RelWithDebInfo", - "Release", - "MinSizeRel" - ] - } - ] -} \ No newline at end of file + "$schema": "https://raw.githubusercontent.com/Fallout-build/Fallout/main/src/Fallout.Tooling.Generator/schema.json", + "references": [ + "https://cmake.org/cmake/help/latest/manual/cmake.1.html" + ], + "name": "CMake", + "officialUrl": "https://cmake.org/cmake/help/latest/manual/cmake.1.html", + "help": "The cmake executable is the command-line interface of the cross-platform build system generator CMake.", + "pathExecutable": "cmake", + "tasks": [ + { + "help": "Generates a build project using cmake.", + "postfix": "Generate", + "settingsClass": { + "properties": [ + { + "name": "Generator", + "type": "CMakeGenerator", + "format": "-G {value}", + "default": "CMakeGenerator.Visual_Studio_16_2019", + "help": "Specify the build system to generate." + }, + { + "name": "Platform", + "type": "CMakePlatform", + "format": "-A {value}", + "default": "CMakePlatform.x64", + "help": "Specify the platform to build for." + }, + { + "name": "RootDirectory", + "type": "string", + "format": "-S {value}", + "default": "\".\"", + "help": "Specify the root directory of the 'CMakeLists.txt' file." + }, + { + "name": "OutputDirectory", + "type": "string", + "format": "-B {value}", + "default": "\"./out\"", + "help": "Specify the configuration to use when running the install script." + }, + { + "name": "ToolChain", + "type": "string", + "format": "-DCMAKE_TOOLCHAIN_FILE:FILEPATH={value}", + "help": "Specify the path to a toolchain file to use." + }, + { + "name": "ToolsetSpec", + "type": "string", + "format": "-T {value}", + "help": "Specify the toolset name if supported by the generator." + }, + { + "name": "InstallPrefix", + "type": "string", + "format": "--install-prefix {value}", + "help": "Specify the installation prefix to be used in the generated project." + }, + { + "name": "Define", + "type": "List", + "format": "-D {value}", + "help": "Create or update a CMake cache entry, in the form [:]=." + }, + { + "name": "Undefine", + "type": "List", + "format": "-U {value}", + "help": "Remove matching entries from the CMake cache, given a globbing expression." + }, + { + "name": "Fresh", + "type": "bool", + "format": "--fresh", + "help": "Perform a fresh configuration, removing any existing cache file." + }, + { + "name": "WarnDev", + "type": "bool", + "format": "-Wdev", + "help": "Enable developer warnings." + }, + { + "name": "NoWarnDev", + "type": "bool", + "format": "-Wno-dev", + "help": "Suppress developer warnings." + }, + { + "name": "WarnUninitialized", + "type": "bool", + "format": "--warn-uninitialized", + "help": "Warn about uninitialized values." + }, + { + "name": "WarnUnusedVars", + "type": "bool", + "format": "--warn-unused-vars", + "help": "Warn about unused variables." + }, + { + "name": "LogLevel", + "type": "CMakeLogLevel", + "format": "--log-level={value}", + "help": "Set the log level to one of: ERROR, WARNING, NOTICE, STATUS, VERBOSE, DEBUG, TRACE." + }, + { + "name": "Debug", + "type": "bool", + "format": "--debug-output", + "help": "Put cmake in a debug mode." + }, + { + "name": "Trace", + "type": "bool", + "format": "--trace", + "help": "Put cmake in trace mode." + }, + { + "name": "TraceExpand", + "type": "bool", + "format": "--trace-expand", + "help": "Put cmake in trace mode, expanding variables." + } + ] + } + }, + { + "help": "Runs the `cmake --build` command on a project generated with cmake.", + "postfix": "Build", + "definiteArgument": "--build", + "settingsClass": { + "properties": [ + { + "name": "OutputDirectory", + "type": "string", + "format": "{value}", + "default": "\"./out\"", + "help": "Specify the project binary directory to build." + }, + { + "name": "Configuration", + "type": "CMakeConfiguration", + "format": "--config {value}", + "default": "CMakeConfiguration.Debug", + "help": "Specify the build configuration for multi-config generators." + }, + { + "name": "Target", + "type": "List", + "format": "--target {value}", + "help": "Specify the targets to build instead of the default target." + }, + { + "name": "Parallel", + "type": "int", + "format": "--parallel {value}", + "help": "Specify the maximum number of concurrent processes to use when building." + }, + { + "name": "CleanFirst", + "type": "bool", + "format": "--clean-first", + "help": "Build target 'clean' first, then build." + }, + { + "name": "Verbose", + "type": "bool", + "format": "--verbose", + "help": "Enable verbose output - if supported - including the build commands to be executed." + }, + { + "name": "NativeToolOptions", + "type": "List", + "format": "-- {value}", + "separator": " ", + "position": -1, + "help": "Pass remaining options to the native build tool, placed after '--'." + } + ] + } + }, + { + "help": "Runs the `cmake --install` command on a project generated with cmake.", + "postfix": "Install", + "definiteArgument": "--install", + "settingsClass": { + "properties": [ + { + "name": "RootDirectory", + "type": "string", + "format": "{value}", + "default": "\".\"", + "help": "Specify the root directory of the cmake install script." + }, + { + "name": "Configuration", + "type": "CMakeConfiguration", + "format": "--config {value}", + "default": "CMakeConfiguration.Debug", + "help": "Specify the root directory of the 'CMakeLists.txt' file." + }, + { + "name": "OutputDirectory", + "type": "string", + "format": "--prefix {value}", + "help": "Specify the output directory of the install script." + }, + { + "name": "Component", + "type": "string", + "format": "--component {value}", + "help": "Specify the component to install." + }, + { + "name": "Strip", + "type": "bool", + "format": "--strip", + "help": "Strip before installing." + }, + { + "name": "Verbose", + "type": "bool", + "format": "--verbose", + "help": "Enable verbose output." + } + ] + } + } + ], + "enumerations": [ + { + "name": "CMakeGenerator", + "values": [ + "Visual Studio 15 2017", + "Visual Studio 16 2019", + "Visual Studio 17 2022", + "Visual Studio 18 2026", + "Ninja", + "Xcode" + ] + }, + { + "name": "CMakePlatform", + "values": [ + "Win32", + "x64", + "ARM", + "ARM64" + ] + }, + { + "name": "CMakeConfiguration", + "values": [ + "Debug", + "RelWithDebInfo", + "Release", + "MinSizeRel" + ] + }, + { + "name": "CMakeLogLevel", + "values": [ + "Error", + "Warning", + "Notice", + "Status", + "Verbose", + "Debug", + "Trace" + ] + } + ] +}