From f26e9fcbae37a73710052e6931fa2d3ea335d00f Mon Sep 17 00:00:00 2001 From: Matthew Woehlke Date: Wed, 8 Apr 2026 10:45:21 -0400 Subject: [PATCH] Help: Generate presets JSON schema, documentation Replace the CMake presets schema.json with a YAML document, from which both the JSON schema and (most of) the reST documentation are generated. This achieves three main goals. First, the YAML document is much closer to being human-readable than the JSON schema. Second, the JSON and reST prose (when the latter differs) are contained in the same file, in most cases adjacent (and at worst, still nearby) rather than in separate files, which should greatly facilitate keeping the two in sync. Third, changes are monumentally easier, as changes merely need to annotate the version(s) to which variants apply, rather than creating entirely separate schema trees for each variant. Since requiring Python as part of the build process is not desired, the outputs are kept in the source repository. This is consistent with other areas which are seldom updated and require special tools, such as the lexer. While this does not represent any functional change for users, some grammatical edits and other such editorial improvements have been made in the process of transferring everything to the new YAML. However, these are mainly incidental rather than representative of an attempt at a thorough editorial pass. Finally, for clarity, monkey-patch `sphing.domains.changesets` and add additional 'version modified' directives with slightly tweaked text to identify changes to the presets schema. These are nearly identical to the built-in directives, but use the text 'in presets version N' rather than 'in version N[.N]'. --- Help/manual/cmake-presets.7.rst | 1247 +--- .../presets/architecture-properties.rst | 27 + .../presets/buildPresets-properties.rst | 213 + .../presets/cacheVariables-properties.rst | 7 + .../cmakeMinimumRequired-properties.rst | 17 + .../presets/configurePresets-properties.rst | 251 + Help/manual/presets/debug-properties.rst | 20 + Help/manual/presets/errors-properties.rst | 22 + Help/manual/presets/exclude-properties.rst | 25 + Help/manual/presets/execution-properties.rst | 115 + Help/manual/presets/filter-properties.rst | 18 + Help/manual/presets/fixtures-properties.rst | 27 + Help/manual/presets/include-properties.rst | 37 + Help/manual/presets/index-properties.rst | 22 + .../presets/packageOutput-properties.rst | 16 + .../presets/packagePresets-properties.rst | 174 + Help/manual/presets/repeat-properties.rst | 18 + Help/manual/presets/root-properties.rst | 78 + Help/manual/presets/schema.json | 5848 +++++++++++------ Help/manual/presets/schema.yaml | 1990 ++++++ Help/manual/presets/steps-properties.rst | 14 + Help/manual/presets/testOutput-properties.rst | 107 + .../manual/presets/testPresets-properties.rst | 146 + Help/manual/presets/toolset-properties.rst | 27 + Help/manual/presets/trace-properties.rst | 53 + Help/manual/presets/warnings-properties.rst | 43 + .../presets/workflowPresets-properties.rst | 44 + Help/variable/CMAKE_INSTALL_PREFIX.rst | 4 +- Utilities/Scripts/regenerate-presets.py | 686 ++ Utilities/Sphinx/cmake.py | 19 + Utilities/Sphinx/conf.py.in | 3 +- 31 files changed, 8081 insertions(+), 3237 deletions(-) create mode 100644 Help/manual/presets/architecture-properties.rst create mode 100644 Help/manual/presets/buildPresets-properties.rst create mode 100644 Help/manual/presets/cacheVariables-properties.rst create mode 100644 Help/manual/presets/cmakeMinimumRequired-properties.rst create mode 100644 Help/manual/presets/configurePresets-properties.rst create mode 100644 Help/manual/presets/debug-properties.rst create mode 100644 Help/manual/presets/errors-properties.rst create mode 100644 Help/manual/presets/exclude-properties.rst create mode 100644 Help/manual/presets/execution-properties.rst create mode 100644 Help/manual/presets/filter-properties.rst create mode 100644 Help/manual/presets/fixtures-properties.rst create mode 100644 Help/manual/presets/include-properties.rst create mode 100644 Help/manual/presets/index-properties.rst create mode 100644 Help/manual/presets/packageOutput-properties.rst create mode 100644 Help/manual/presets/packagePresets-properties.rst create mode 100644 Help/manual/presets/repeat-properties.rst create mode 100644 Help/manual/presets/root-properties.rst create mode 100644 Help/manual/presets/schema.yaml create mode 100644 Help/manual/presets/steps-properties.rst create mode 100644 Help/manual/presets/testOutput-properties.rst create mode 100644 Help/manual/presets/testPresets-properties.rst create mode 100644 Help/manual/presets/toolset-properties.rst create mode 100644 Help/manual/presets/trace-properties.rst create mode 100644 Help/manual/presets/warnings-properties.rst create mode 100644 Help/manual/presets/workflowPresets-properties.rst create mode 100755 Utilities/Scripts/regenerate-presets.py diff --git a/Help/manual/cmake-presets.7.rst b/Help/manual/cmake-presets.7.rst index ed3e56d0c1..e4ddfbb6c9 100644 --- a/Help/manual/cmake-presets.7.rst +++ b/Help/manual/cmake-presets.7.rst @@ -21,7 +21,7 @@ supports files included with the ``include`` field. ``CMakePresets.json`` and ``CMakeUserPresets.json`` live in the project's root directory. They both have exactly the same format, and both are optional -(though at least one must be present if :option:`--preset ` +(though at least one must be present if :cmake-option:`--preset` is specified). ``CMakePresets.json`` is meant to specify project-wide build details, while ``CMakeUserPresets.json`` is meant for developers to specify their own local build details. @@ -39,72 +39,14 @@ The files are a JSON document with an object as the root: .. literalinclude:: presets/example.json :language: json -Preset files specifying version ``10`` or above may include comments using the -key ``$comment`` at any level within the JSON object to provide documentation. +.. presets-versionadded:: 10 + + Preset files may include comments using the key ``$comment`` at any level + within the JSON object to provide documentation. The root object recognizes the following fields: -.. _`CMakePresets schema`: - -``$schema`` - An optional string that provides a URI to the JSON schema that describes the - structure of this JSON document. This field is used for validation and - autocompletion in editors that support JSON schema. It doesn't affect the - behavior of the document itself. If this field is not specified, the JSON - document will still be valid, but tools that use JSON schema for validation - and autocompletion may not function correctly. - -``version`` - A required integer representing the version of the JSON schema. See - `Versions`_ for discussion of the supported versions and the corresponding - version of CMake in which they were added. - -``cmakeMinimumRequired`` - An optional object representing the minimum version of CMake needed to - build this project. This object consists of the following fields: - - ``major`` - An optional integer representing the major version. - - ``minor`` - An optional integer representing the minor version. - - ``patch`` - An optional integer representing the patch version. - -``include`` - An optional array of strings representing files to include. If the filenames - are not absolute, they are considered relative to the current file. - This is allowed in preset files specifying version ``4`` or above. - See `Includes`_ for discussion of the constraints on included files. - -``vendor`` - An optional map containing vendor-specific information. CMake does not - interpret the contents of this field except to verify that it is a map if - it does exist. However, the keys should be a vendor-specific domain name - followed by a ``/``-separated path. For example, the Example IDE 1.0 could - use ``example.com/ExampleIDE/1.0``. The value of each field can be anything - desired by the vendor, though will typically be a map. - -``configurePresets`` - An optional array of `Configure Preset`_ objects. - This is allowed in preset files specifying version ``1`` or above. - -``buildPresets`` - An optional array of `Build Preset`_ objects. - This is allowed in preset files specifying version ``2`` or above. - -``testPresets`` - An optional array of `Test Preset`_ objects. - This is allowed in preset files specifying version ``2`` or above. - -``packagePresets`` - An optional array of `Package Preset`_ objects. - This is allowed in preset files specifying version ``6`` or above. - -``workflowPresets`` - An optional array of `Workflow Preset`_ objects. - This is allowed in preset files specifying version ``6`` or above. +.. include:: presets/root-properties.rst Includes ^^^^^^^^ @@ -126,11 +68,18 @@ Files directly or indirectly included from ``CMakePresets.json`` should be guaranteed to be provided by the project. ``CMakeUserPresets.json`` may include files from anywhere. -Starting from version ``7``, the ``include`` field supports -`macro expansion`_, but only ``$penv{}`` macro expansion. Starting from version -``9``, other macro expansions are also available, except for ``$env{}`` and -preset-specific macros, i.e., those derived from the fields inside a preset's -definition like ``presetName``. +.. presets-versionchanged:: 7 + + The ``include`` field supports `macro expansion`_, but only ``$penv{}`` macro + expansion. + +.. presets-versionchanged:: 9 + + The ``include`` field supports `macro expansion`_, except for ``$env{}`` and + preset-specific macros (i.e., those derived from the fields inside a preset's + definition like ``presetName``). + +.. _`Configure Preset`: Configure Preset ^^^^^^^^^^^^^^^^ @@ -138,1062 +87,69 @@ Configure Preset Each entry of the ``configurePresets`` array is a JSON object that may contain the following fields: -``name`` - A required string representing the machine-friendly name of the preset. - This identifier is used in the :option:`cmake --preset` option. - There must not be two configure presets in the union of ``CMakePresets.json`` - and ``CMakeUserPresets.json`` in the same directory with the same name. - However, a configure preset may have the same name as a build, test, - package, or workflow preset. +.. include:: presets/configurePresets-properties.rst -``hidden`` - An optional boolean specifying whether or not a preset should be hidden. - If a preset is hidden, it cannot be used in the - :option:`--preset ` argument, will not show up in the - :manual:`CMake GUI `, and does not have to have a valid - ``generator`` or ``binaryDir``, even from inheritance. ``hidden`` presets are - intended to be used as a base for other presets to inherit via the - ``inherits`` field. - -``inherits`` - An optional array of strings representing the names of presets to inherit - from. This field can also be a string, which is equivalent to an array - containing one string. - - The preset will inherit all of the fields from the ``inherits`` - presets by default (except ``name``, ``hidden``, ``inherits``, - ``description``, and ``displayName``), but can override them as - desired. If multiple ``inherits`` presets provide conflicting values for - the same field, the earlier preset in the ``inherits`` array will be - preferred. - - A preset can only inherit from another preset that is defined in the - same file or in one of the files it includes (directly or indirectly). - Presets in ``CMakePresets.json`` may not inherit from presets in - ``CMakeUserPresets.json``. - -``condition`` - An optional `Condition`_ object. This is allowed in preset files specifying - version ``3`` or above. - -``vendor`` - An optional map containing vendor-specific information. CMake does not - interpret the contents of this field except to verify that it is a map - if it does exist. However, it should follow the same conventions as the - root-level ``vendor`` field. If vendors use their own per-preset - ``vendor`` field, they should implement inheritance in a sensible manner - when appropriate. - -``displayName`` - An optional string with a human-friendly name of the preset. - -``description`` - An optional string with a human-friendly description of the preset. - -.. _`CMakePresets generator`: - -``generator`` - An optional string representing the :manual:`generator ` - to use for the preset. If ``generator`` is not specified, it must be - inherited from the ``inherits`` preset (unless this preset is ``hidden``). - In version ``3`` or above, this field may be omitted to fall back to regular - generator discovery procedure. - - Note that for :ref:`Visual Studio generators`, unlike in the command line - :option:`-G ` argument, you cannot include the platform name - in the generator name. Use the ``architecture`` field instead. - -``architecture``, ``toolset`` - Optional fields representing the platform and toolset, respectively, for - :manual:`generators ` that support them. - - See :option:`cmake -A` option for possible values for ``architecture`` - and :option:`cmake -T` for ``toolset``. - - Each may be either a string or an object with the following fields: - - ``value`` - An optional string representing the value. - - ``strategy`` - An optional string telling CMake how to handle the ``architecture`` or - ``toolset`` field. Valid values are: - - ``"set"`` - Set the respective value. This will result in an error for generators - that do not support the respective field. - - ``"external"`` - Do not set the value, even if the generator supports it. This is - useful if, for example, a preset uses the Ninja generator, and an IDE - knows how to set up the Visual C++ environment from the - ``architecture`` and ``toolset`` fields. In that case, CMake will - ignore the field, but the IDE can use them to set up the environment - before invoking CMake. - - If no ``strategy`` field is given, or if the field uses the string form - rather than the object form, the behavior is the same as ``"set"``. - -.. _`CMakePresets toolchainFile`: - -``toolchainFile`` - An optional string representing the path to the toolchain file. - This field supports `macro expansion`_. If a relative path is specified, - it is calculated relative to the build directory, and if not found, - relative to the source directory. This field takes precedence over any - :variable:`CMAKE_TOOLCHAIN_FILE` value. It is allowed in preset files - specifying version ``3`` or above. - -.. _`CMakePresets graphviz`: - -``graphviz`` - An optional string representing the path to the graphviz input file, - that will contain all the library and executable dependencies - in the project. See the documentation for :option:`cmake --graphviz` for - more details. - - This field supports `macro expansion`_. If a relative path is specified, - it is calculated relative to the current working directory. It is allowed - in preset files specifying version ``10`` or above. - -.. _`CMakePresets binaryDir`: - -``binaryDir`` - An optional string representing the path to the output binary directory. - This field supports `macro expansion`_. If a relative path is specified, - it is calculated relative to the source directory. If ``binaryDir`` is not - specified, it must be inherited from the ``inherits`` preset (unless this - preset is ``hidden``). In version ``3`` or above, this field may be - omitted. - -.. _`CMakePresets installDir`: - -``installDir`` - An optional string representing the path to the installation directory, - which will be used as the :variable:`CMAKE_INSTALL_PREFIX` variable. - This field supports `macro expansion`_. If a relative path is specified, - it is calculated relative to the source directory. This is allowed in - preset files specifying version ``3`` or above. - -``cmakeExecutable`` - An optional string representing the path to the CMake executable to use - for this preset. This is reserved for use by IDEs, and is not used by - CMake itself. IDEs that use this field should expand any macros in it. - -``cacheVariables`` - An optional map of cache variables. The key is the variable name (which - may not be an empty string), and the value is either ``null``, a boolean - (which is equivalent to a value of ``"TRUE"`` or ``"FALSE"`` and a type - of ``BOOL``), a string representing the value of the variable (which - supports `macro expansion`_), or an object with the following fields: - - ``type`` - An optional string representing the type of the variable. - - ``value`` - A required string or boolean representing the value of the variable. - A boolean is equivalent to ``"TRUE"`` or ``"FALSE"``. This field - supports `macro expansion`_. - - Cache variables are inherited through the ``inherits`` field, and the - preset's variables will be the union of its own ``cacheVariables`` and - the ``cacheVariables`` from all its parents. If multiple presets in this - union define the same variable, the standard rules of ``inherits`` are - applied. Setting a variable to ``null`` causes it to not be set, even if - a value was inherited from another preset. - -``environment`` - An optional map of environment variables. The key is the variable name - (which may not be an empty string), and the value is either ``null`` or - a string representing the value of the variable. Each variable is set - regardless of whether or not a value was given to it by the process's - environment. - - This field supports `macro expansion`_, and environment variables in this map - may reference each other, and may be listed in any order, as long as such - references do not cause a cycle (for example, if ``ENV_1`` is - ``$env{ENV_2}``, ``ENV_2`` may not be ``$env{ENV_1}``). ``$penv{NAME}`` - allows one to prepend or append values to existing environment variables by - accessing only values from the parent environment. - - Environment variables are inherited through the ``inherits`` field, and - the preset's environment will be the union of its own ``environment`` and - the ``environment`` from all its parents. If multiple presets in this - union define the same variable, the standard rules of ``inherits`` are - applied. Setting a variable to ``null`` causes it to not be set, even if - a value was inherited from another preset. - -``warnings`` - An optional object specifying the warnings to enable. The object may - contain the following fields: - - ``dev`` - An optional boolean. Equivalent to passing :option:`-Wdev ` - or :option:`-Wno-dev ` on the command line. This may not - be set to ``false`` if ``errors.dev`` is set to ``true``. - - ``deprecated`` - An optional boolean. Equivalent to passing - :option:`-Wdeprecated ` or - :option:`-Wno-deprecated ` on the command line. - This may not be set to ``false`` if ``errors.deprecated`` is set to - ``true``. - - ``uninitialized`` - An optional boolean. Setting this to ``true`` is equivalent to passing - :option:`--warn-uninitialized ` on the command - line. - - ``unusedCli`` - An optional boolean. Setting this to ``false`` is equivalent to passing - :option:`--no-warn-unused-cli ` on the command - line. - - ``systemVars`` - An optional boolean. Setting this to ``true`` is equivalent to passing - :option:`--check-system-vars ` on the command - line. - -``errors`` - An optional object specifying the errors to enable. The object may - contain the following fields: - - ``dev`` - An optional boolean. Equivalent to passing :option:`-Werror=dev ` - or :option:`-Wno-error=dev ` on the command line. - This may not be set to ``true`` if ``warnings.dev`` is set to ``false``. - - ``deprecated`` - An optional boolean. Equivalent to passing - :option:`-Werror=deprecated ` or - :option:`-Wno-error=deprecated ` on the command line. - This may not be set to ``true`` if ``warnings.deprecated`` is set to - ``false``. - -``debug`` - An optional object specifying debug options. The object may contain the - following fields: - - ``output`` - An optional boolean. Setting this to ``true`` is equivalent to passing - :option:`--debug-output ` on the command line. - - ``tryCompile`` - An optional boolean. Setting this to ``true`` is equivalent to passing - :option:`--debug-trycompile ` on the command - line. - - ``find`` - An optional boolean. Setting this to ``true`` is equivalent to passing - :option:`--debug-find ` on the command line. - -.. _`CMakePresets trace`: - -``trace`` - An optional object specifying trace options. This is allowed in preset - files specifying version ``7``. The object may contain the following fields: - - ``mode`` - An optional string that specifies the trace mode. Valid values are: - - ``on`` - Causes a trace of all calls made and from where to be printed. - Equivalent to passing :option:`--trace ` on the command - line. - - ``off`` - A trace of all calls will not be printed. - - ``expand`` - Causes a trace with variables expanded of all calls made and from where - to be printed. Equivalent to passing :option:`--trace-expand ` - on the command line. - - ``format`` - An optional string that specifies the format output of the trace. - Valid values are: - - ``human`` - Prints each trace line in a human-readable format. - This is the default format. Equivalent to passing - :option:`--trace-format=human ` - on the command line. - - ``json-v1`` - Prints each line as a separate JSON document. Equivalent to passing - :option:`--trace-format=json-v1 ` - on the command line. - - ``source`` - An optional array of strings representing the paths of source files to - be traced. This field can also be a string, which is equivalent to an - array containing one string. Equivalent to passing - :option:`--trace-source ` on the command line. - - ``redirect`` - An optional string specifying a path to a trace output file. Equivalent - to passing :option:`--trace-redirect ` - on the command line. +.. _`Build Preset`: Build Preset ^^^^^^^^^^^^ +.. presets-versionadded:: 2 + Each entry of the ``buildPresets`` array is a JSON object that may contain the following fields: -``name`` - A required string representing the machine-friendly name of the preset. - This identifier is used in the - :option:`cmake --build --preset ` option. - There must not be two build presets in the union of ``CMakePresets.json`` - and ``CMakeUserPresets.json`` in the same directory with the same name. - However, a build preset may have the same name as a configure, test, - package, or workflow preset. +.. include:: presets/buildPresets-properties.rst -``hidden`` - An optional boolean specifying whether or not a preset should be hidden. - If a preset is hidden, it cannot be used in the - :option:`--preset ` argument - and does not have to have a valid ``configurePreset``, even from - inheritance. ``hidden`` presets are intended to be used as a base for - other presets to inherit via the ``inherits`` field. - -``inherits`` - An optional array of strings representing the names of presets to inherit - from. This field can also be a string, which is equivalent to an array - containing one string. - - The preset will inherit all of the fields from the - ``inherits`` presets by default (except ``name``, ``hidden``, - ``inherits``, ``description``, and ``displayName``), but can override - them as desired. If multiple ``inherits`` presets provide conflicting - values for the same field, the earlier preset in the ``inherits`` array - will be preferred. - - A preset can only inherit from another preset that is defined in the - same file or in one of the files it includes (directly or indirectly). - Presets in ``CMakePresets.json`` may not inherit from presets in - ``CMakeUserPresets.json``. - -``condition`` - An optional `Condition`_ object. This is allowed in preset files specifying - version ``3`` or above. - -``vendor`` - An optional map containing vendor-specific information. CMake does not - interpret the contents of this field except to verify that it is a map - if it does exist. However, it should follow the same conventions as the - root-level ``vendor`` field. If vendors use their own per-preset - ``vendor`` field, they should implement inheritance in a sensible manner - when appropriate. - -``displayName`` - An optional string with a human-friendly name of the preset. - -``description`` - An optional string with a human-friendly description of the preset. - -.. _`CMakePresets build environment`: - -``environment`` - An optional map of environment variables. The key is the variable name - (which may not be an empty string), and the value is either ``null`` or - a string representing the value of the variable. Each variable is set - regardless of whether or not a value was given to it by the process's - environment. - - This field supports `macro expansion`_, and environment variables in this map - may reference each other, and may be listed in any order, as long as such - references do not cause a cycle (for example, if ``ENV_1`` is - ``$env{ENV_2}``, ``ENV_2`` may not be ``$env{ENV_1}``). ``$penv{NAME}`` - allows one to prepend or append values to existing environment variables by - accessing only values from the parent environment. - - Environment variables are inherited through the ``inherits`` field, and - the preset's environment will be the union of its own ``environment`` - and the ``environment`` from all its parents. If multiple presets in - this union define the same variable, the standard rules of ``inherits`` - are applied. Setting a variable to ``null`` causes it to not be set, - even if a value was inherited from another preset. - - .. note:: - - For a CMake project using :module:`ExternalProject` with a configuration - preset having environment variables needed in the ExternalProject, use a - build preset that inherits that configuration preset or the ExternalProject - will not have the environment variables set in the configuration preset. - Example: suppose the host defaults to one compiler (say Clang) - and the user wishes to use another compiler (say GCC). Set configuration - preset environment variables :envvar:`CC` and :envvar:`CXX` and use a build - preset that inherits that configuration preset. Otherwise the - ExternalProject may use a different (system default) compiler than the - top-level CMake project. - -``configurePreset`` - An optional string specifying the name of a configure preset to - associate with this build preset. If ``configurePreset`` is not - specified, it must be inherited from the inherits preset (unless this - preset is hidden). The build directory is inferred from the configure - preset, so the build will take place in the same ``binaryDir`` that the - configuration did. - -``inheritConfigureEnvironment`` - An optional boolean that defaults to true. If true, the environment - variables from the associated configure preset are inherited after all - inherited build preset environments, but before environment variables - explicitly specified in this build preset. - -.. _`CMakePresets build jobs`: - -``jobs`` - An optional integer. Equivalent to passing - :option:`--parallel ` or ``-j`` on the command line. - If the value is ``0``, it is equivalent to passing ``--parallel`` with - ```` omitted; alternatively, one can define the environment variable - :envvar:`CMAKE_BUILD_PARALLEL_LEVEL` as an empty string using the - ``environment`` field. - - .. versionchanged:: 4.3 - - This field does not accept negative integer values, regardless of the - version in the preset file. - -``targets`` - An optional string or array of strings. Equivalent to passing - :option:`--target ` or ``-t`` on the command line. - Vendors may ignore the targets property or hide build presets that - explicitly specify targets. This field supports macro expansion. - -``configuration`` - An optional string. Equivalent to passing - :option:`--config ` on the command line. - -``cleanFirst`` - An optional bool. If true, equivalent to passing - :option:`--clean-first ` on the command line. - -.. _`CMakePresets resolvePackageReferences`: - -``resolvePackageReferences`` - An optional string that specifies the package resolve mode. This is - allowed in preset files specifying version ``4`` or above. - - Package references are used to define dependencies to packages from - external package managers. Currently only NuGet in combination with the - :ref:`Visual Studio generators` is supported. If there are no targets that - define package references, this option does nothing. Valid values are: - - ``on`` - Causes package references to be resolved before attempting a build. - - ``off`` - Package references will not be resolved. Note that this may cause - errors in some build environments, such as .NET SDK style projects. - - ``only`` - Only resolve package references, but do not perform a build. - - .. note:: - - The command line parameter - :option:`--resolve-package-references ` - will take priority over this setting. If the command line parameter is not - provided and this setting is not specified, an environment-specific cache - variable will be evaluated to decide, if package restoration should be - performed. - - When using the :ref:`Visual Studio generators`, package references are - defined using the :prop_tgt:`VS_PACKAGE_REFERENCES` property. Package - references are restored using NuGet. It can be disabled by setting the - :variable:`CMAKE_VS_NUGET_PACKAGE_RESTORE` variable to ``OFF``. This can - also be done from within a configure preset. - -``verbose`` - An optional bool. If true, equivalent to passing - :option:`--verbose ` on the command line. - -``nativeToolOptions`` - An optional array of strings. Equivalent to passing options after ``--`` - on the command line. The array values support macro expansion. +.. _`Test Preset`: Test Preset ^^^^^^^^^^^ +.. presets-versionadded:: 2 + Each entry of the ``testPresets`` array is a JSON object that may contain the following fields: -``name`` - A required string representing the machine-friendly name of the preset. - This identifier is used in the :option:`ctest --preset` option. - There must not be two test presets in the union of ``CMakePresets.json`` - and ``CMakeUserPresets.json`` in the same directory with the same name. - However, a test preset may have the same name as a configure, build, - package, or workflow preset. +.. include:: presets/testPresets-properties.rst -``hidden`` - An optional boolean specifying whether or not a preset should be hidden. - If a preset is hidden, it cannot be used in the - :option:`--preset ` argument - and does not have to have a valid ``configurePreset``, even from - inheritance. ``hidden`` presets are intended to be used as a base for - other presets to inherit via the ``inherits`` field. - -``inherits`` - An optional array of strings representing the names of presets to inherit - from. This field can also be a string, which is equivalent to an array - containing one string. - - The preset will inherit all of the fields from the - ``inherits`` presets by default (except ``name``, ``hidden``, - ``inherits``, ``description``, and ``displayName``), but can override - them as desired. If multiple ``inherits`` presets provide conflicting - values for the same field, the earlier preset in the ``inherits`` array - will be preferred. - - A preset can only inherit from another preset that is defined in the - same file or in one of the files it includes (directly or indirectly). - Presets in ``CMakePresets.json`` may not inherit from presets in - ``CMakeUserPresets.json``. - -``condition`` - An optional `Condition`_ object. This is allowed in preset files specifying - version ``3`` or above. - -``vendor`` - An optional map containing vendor-specific information. CMake does not - interpret the contents of this field except to verify that it is a map - if it does exist. However, it should follow the same conventions as the - root-level ``vendor`` field. If vendors use their own per-preset - ``vendor`` field, they should implement inheritance in a sensible manner - when appropriate. - -``displayName`` - An optional string with a human-friendly name of the preset. - -``description`` - An optional string with a human-friendly description of the preset. - -``environment`` - An optional map of environment variables. The key is the variable name - (which may not be an empty string), and the value is either ``null`` or - a string representing the value of the variable. Each variable is set - regardless of whether or not a value was given to it by the process's - environment. - - This field supports `macro expansion`_, and environment variables in this map - may reference each other, and may be listed in any order, as long as such - references do not cause a cycle (for example, if ``ENV_1`` is - ``$env{ENV_2}``, ``ENV_2`` may not be ``$env{ENV_1}``). ``$penv{NAME}`` - allows one to prepend or append values to existing environment variables by - accessing only values from the parent environment. - - Environment variables are inherited through the ``inherits`` field, and - the preset's environment will be the union of its own ``environment`` - and the ``environment`` from all its parents. If multiple presets in - this union define the same variable, the standard rules of ``inherits`` - are applied. Setting a variable to ``null`` causes it to not be set, - even if a value was inherited from another preset. - -``configurePreset`` - An optional string specifying the name of a configure preset to - associate with this test preset. If ``configurePreset`` is not - specified, it must be inherited from the inherits preset (unless this - preset is hidden). The build directory is inferred from the configure - preset, so tests will run in the same ``binaryDir`` that the - configuration did and build did. - -``inheritConfigureEnvironment`` - An optional boolean that defaults to true. If true, the environment - variables from the associated configure preset are inherited after all - inherited test preset environments, but before environment variables - explicitly specified in this test preset. - -``configuration`` - An optional string. Equivalent to passing - :option:`--build-config ` on the command line. - -``overwriteConfigurationFile`` - An optional array of configuration options to overwrite options - specified in the CTest configuration file. Equivalent to passing - :option:`--overwrite ` for each value in the array. - The array values support macro expansion. - -.. _`CMakePresets output`: - -``output`` - An optional object specifying output options. The object may contain the - following fields. - - ``shortProgress`` - An optional bool. If true, equivalent to passing - :option:`--progress ` on the command line. - - ``verbosity`` - An optional string specifying verbosity level. Must be one of the - following: - - ``default`` - Equivalent to passing no verbosity flags on the command line. - - ``verbose`` - Equivalent to passing :option:`--verbose ` on - the command line. - - ``extra`` - Equivalent to passing :option:`--extra-verbose ` - on the command line. - - ``debug`` - An optional bool. If true, equivalent to passing - :option:`--debug ` on the command line. - - ``outputOnFailure`` - An optional bool. If true, equivalent to passing - :option:`--output-on-failure ` on the command - line. - - ``quiet`` - An optional bool. If true, equivalent to passing - :option:`--quiet ` on the command line. - - ``outputLogFile`` - An optional string specifying a path to a log file. Equivalent to - passing :option:`--output-log ` on the command line. - This field supports macro expansion. - -.. _`CMakePresets outputJUnitFile`: - - ``outputJUnitFile`` - An optional string specifying a path to a JUnit file. Equivalent to - passing :option:`--output-junit ` on the command line. - This field supports macro expansion. This is allowed in preset files - specifying version ``6`` or above. - - ``labelSummary`` - An optional bool. If false, equivalent to passing - :option:`--no-label-summary ` on the command - line. - - ``subprojectSummary`` - An optional bool. If false, equivalent to passing - :option:`--no-subproject-summary ` - on the command line. - - ``maxPassedTestOutputSize`` - An optional integer specifying the maximum output for passed tests in - bytes. Equivalent to passing - :option:`--test-output-size-passed ` - on the command line. - - ``maxFailedTestOutputSize`` - An optional integer specifying the maximum output for failed tests in - bytes. Equivalent to passing - :option:`--test-output-size-failed ` - on the command line. - -.. _`CMakePresets testOutputTruncation`: - - ``testOutputTruncation`` - An optional string specifying the test output truncation mode. Equivalent - to passing - :option:`--test-output-truncation ` on - the command line. This is allowed in preset files specifying version - ``5`` or above. - - ``maxTestNameWidth`` - An optional integer specifying the maximum width of a test name to - output. Equivalent to passing :option:`--max-width ` - on the command line. - -``filter`` - An optional object specifying how to filter the tests to run. The object - may contain the following fields. - - ``include`` - An optional object specifying which tests to include. The object may - contain the following fields. - - ``name`` - An optional string specifying a regex for test names. Equivalent to - passing :option:`--tests-regex ` on the command - line. This field supports macro expansion. CMake regex syntax is - described under :ref:`string(REGEX) `. - - ``label`` - An optional string specifying a regex for test labels. Equivalent to - passing :option:`--label-regex ` on the command - line. This field supports macro expansion. - - ``useUnion`` - An optional bool. Equivalent to passing :option:`--union ` - on the command line. - - ``index`` - An optional object specifying tests to include by test index. The - object may contain the following fields. Can also be an optional - string specifying a file with the command line syntax for - :option:`--tests-information `. - If specified as a string, this field supports macro expansion. - - ``start`` - An optional integer specifying a test index to start testing at. - - ``end`` - An optional integer specifying a test index to stop testing at. - - ``stride`` - An optional integer specifying the increment. - - ``specificTests`` - An optional array of integers specifying specific test indices to - run. - - ``exclude`` - An optional object specifying which tests to exclude. The object may - contain the following fields. - - ``name`` - An optional string specifying a regex for test names. Equivalent to - passing :option:`--exclude-regex ` on the - command line. This field supports macro expansion. - - ``label`` - An optional string specifying a regex for test labels. Equivalent to - passing :option:`--label-exclude ` on the - command line. This field supports macro expansion. - - ``fixtures`` - An optional object specifying which fixtures to exclude from adding - tests. The object may contain the following fields. - - ``any`` - An optional string specifying a regex for text fixtures to exclude - from adding any tests. Equivalent to - :option:`--fixture-exclude-any ` on - the command line. This field supports macro expansion. - - ``setup`` - An optional string specifying a regex for text fixtures to exclude - from adding setup tests. Equivalent to - :option:`--fixture-exclude-setup ` - on the command line. This field supports macro expansion. - - ``cleanup`` - An optional string specifying a regex for text fixtures to exclude - from adding cleanup tests. Equivalent to - :option:`--fixture-exclude-cleanup ` - on the command line. This field supports macro expansion. - -``execution`` - An optional object specifying options for test execution. The object may - contain the following fields. - - ``stopOnFailure`` - An optional bool. If true, equivalent to passing - :option:`--stop-on-failure ` on the command - line. - - ``enableFailover`` - An optional bool. If true, equivalent to passing :option:`-F ` - on the command line. - -.. _`CMakePresets test jobs`: - - ``jobs`` - An optional integer. Equivalent to passing - :option:`--parallel ` on the command line. If the value - is ``0``, it is equivalent to unbounded parallelism. - - In preset files specifying version ``11`` or above, this field can also be - a string, in which case it must be empty, and is equivalent to passing - ``--parallel`` with ```` omitted. - - .. versionchanged:: 4.3 - - This field does not accept negative integer values, regardless of the - version in the preset file. - - ``resourceSpecFile`` - An optional string. Equivalent to passing - :option:`--resource-spec-file ` on - the command line. This field supports macro expansion. - - ``testLoad`` - An optional integer. Equivalent to passing - :option:`--test-load ` on the command line. - - ``showOnly`` - An optional string. Equivalent to passing - :option:`--show-only ` on the - command line. The string must be one of the following values: - - ``human`` - - ``json-v1`` - - ``repeat`` - An optional object specifying how to repeat tests. Equivalent to - passing :option:`--repeat ` on the command line. - The object must have the following fields. - - ``mode`` - A required string. Must be one of the following values: - - ``until-fail`` - - ``until-pass`` - - ``after-timeout`` - - ``count`` - A required integer. - - ``interactiveDebugging`` - An optional bool. If true, equivalent to passing - :option:`--interactive-debug-mode 1 ` - on the command line. If false, equivalent to passing - :option:`--interactive-debug-mode 0 ` - on the command line. - - ``scheduleRandom`` - An optional bool. If true, equivalent to passing - :option:`--schedule-random ` on the command - line. - - ``timeout`` - An optional integer. Equivalent to passing - :option:`--timeout ` on the command line. - - ``noTestsAction`` - An optional string specifying the behavior if no tests are found. Must - be one of the following values: - - ``default`` - Equivalent to not passing any value on the command line. - - ``error`` - Equivalent to passing :option:`--no-tests=error ` - on the command line. - - ``ignore`` - Equivalent to passing :option:`--no-tests=ignore ` - on the command line. - -.. _`CMakePresets test testPassthroughArguments`: - - ``testPassthroughArguments`` - An optional array of strings. Each element is forwarded as an argument - to every test executable, equivalent to passing arguments after - :option:`ctest --` on the command line. - This is allowed in preset files specifying version ``12`` or above. - - When both preset and command-line passthrough arguments are specified, - preset arguments appear first, followed by command-line arguments. +.. _`Package Preset`: Package Preset ^^^^^^^^^^^^^^ -Package presets may be used in schema version ``6`` or above. Each entry of -the ``packagePresets`` array is a JSON object that may contain the following -fields: +.. presets-versionadded:: 6 -``name`` - A required string representing the machine-friendly name of the preset. - This identifier is used in the :option:`cpack --preset` option. - There must not be two package presets in the union of ``CMakePresets.json`` - and ``CMakeUserPresets.json`` in the same directory with the same name. - However, a package preset may have the same name as a configure, build, - test, or workflow preset. +Each entry of the ``packagePresets`` array is a JSON object +that may contain the following fields: -``hidden`` - An optional boolean specifying whether or not a preset should be hidden. - If a preset is hidden, it cannot be used in the - :option:`--preset ` argument - and does not have to have a valid ``configurePreset``, even from - inheritance. ``hidden`` presets are intended to be used as a base for - other presets to inherit via the ``inherits`` field. - -``inherits`` - An optional array of strings representing the names of presets to inherit - from. This field can also be a string, which is equivalent to an array - containing one string. - - The preset will inherit all of the fields from the - ``inherits`` presets by default (except ``name``, ``hidden``, - ``inherits``, ``description``, and ``displayName``), but can override - them as desired. If multiple ``inherits`` presets provide conflicting - values for the same field, the earlier preset in the ``inherits`` array - will be preferred. - - A preset can only inherit from another preset that is defined in the - same file or in one of the files it includes (directly or indirectly). - Presets in ``CMakePresets.json`` may not inherit from presets in - ``CMakeUserPresets.json``. - -``condition`` - An optional `Condition`_ object. - -``vendor`` - An optional map containing vendor-specific information. CMake does not - interpret the contents of this field except to verify that it is a map - if it does exist. However, it should follow the same conventions as the - root-level ``vendor`` field. If vendors use their own per-preset - ``vendor`` field, they should implement inheritance in a sensible manner - when appropriate. - -``displayName`` - An optional string with a human-friendly name of the preset. - -``description`` - An optional string with a human-friendly description of the preset. - -``environment`` - An optional map of environment variables. The key is the variable name - (which may not be an empty string), and the value is either ``null`` or - a string representing the value of the variable. Each variable is set - regardless of whether or not a value was given to it by the process's - environment. - - This field supports `macro expansion`_, and environment variables in this map - may reference each other, and may be listed in any order, as long as such - references do not cause a cycle (for example, if ``ENV_1`` is - ``$env{ENV_2}``, ``ENV_2`` may not be ``$env{ENV_1}``). ``$penv{NAME}`` - allows one to prepend or append values to existing environment variables by - accessing only values from the parent environment. - - Environment variables are inherited through the ``inherits`` field, and - the preset's environment will be the union of its own ``environment`` - and the ``environment`` from all its parents. If multiple presets in - this union define the same variable, the standard rules of ``inherits`` - are applied. Setting a variable to ``null`` causes it to not be set, - even if a value was inherited from another preset. - -``configurePreset`` - An optional string specifying the name of a configure preset to - associate with this package preset. If ``configurePreset`` is not - specified, it must be inherited from the inherits preset (unless this - preset is hidden). The build directory is inferred from the configure - preset, so packaging will run in the same ``binaryDir`` that the - configuration did and build did. - -``inheritConfigureEnvironment`` - An optional boolean that defaults to true. If true, the environment - variables from the associated configure preset are inherited after all - inherited package preset environments, but before environment variables - explicitly specified in this package preset. - -``generators`` - An optional array of strings representing generators for CPack to use. - -``configurations`` - An optional array of strings representing build configurations for CPack to - package. - -``variables`` - An optional map of variables to pass to CPack, equivalent to - :option:`-D ` arguments. Each key is the name of a variable, and - the value is the string to assign to that variable. - -``configFile`` - An optional string representing the config file for CPack to use. - -``output`` - An optional object specifying output options. Valid keys are: - - ``debug`` - An optional boolean specifying whether or not to print debug information. - A value of ``true`` is equivalent to passing - :option:`--debug ` on the command line. - - ``verbose`` - An optional boolean specifying whether or not to print verbosely. A value - of ``true`` is equivalent to passing :option:`--verbose ` - on the command line. - -``packageName`` - An optional string representing the package name. - - .. note:: - - Due to problems with the implementation, this field does not affect the - name of the final package file produced. Other aspects of the package - may use the value though, leading to inconsistencies. - A future CMake release may address this problem, but until then, it is - recommended that this field not be used. - -``packageVersion`` - An optional string representing the package version. - - .. note:: - - Due to problems with the implementation, this field does not affect the - name of the final package file produced. Other aspects of the package - may use the value though, leading to inconsistencies. - A future CMake release may address this problem, but until then, it is - recommended that this field not be used. - -``packageDirectory`` - An optional string representing the directory in which to place the package. - -``vendorName`` - An optional string representing the vendor name. +.. include:: presets/packagePresets-properties.rst .. _`Workflow Preset`: Workflow Preset ^^^^^^^^^^^^^^^ -Workflow presets may be used in schema version ``6`` or above. Each entry of -the ``workflowPresets`` array is a JSON object that may contain the following -fields: +.. presets-versionadded:: 6 -``name`` - A required string representing the machine-friendly name of the preset. - This identifier is used in the - :option:`cmake --workflow --preset ` option. There - must not be two workflow presets in the union of ``CMakePresets.json`` and - ``CMakeUserPresets.json`` in the same directory with the same name. However, - a workflow preset may have the same name as a configure, build, test, or - package preset. +Each entry of the ``workflowPresets`` array is a JSON object +that may contain the following fields: -``vendor`` - An optional map containing vendor-specific information. CMake does not - interpret the contents of this field except to verify that it is a map - if it does exist. However, it should follow the same conventions as the - root-level ``vendor`` field. - -``displayName`` - An optional string with a human-friendly name of the preset. - -``description`` - An optional string with a human-friendly description of the preset. - -``steps`` - A required array of objects describing the steps of the workflow. The first - step must be a configure preset, and all subsequent steps must be - non-configure presets whose ``configurePreset`` field matches the starting - configure preset. Each object may contain the following fields: - - ``type`` - A required string. The first step must be ``configure``. Subsequent steps - must be either ``build``, ``test``, or ``package``. - - ``name`` - A required string representing the name of the configure, build, test, or - package preset to run as this workflow step. +.. include:: presets/workflowPresets-properties.rst Condition ^^^^^^^^^ -The ``condition`` field of a preset, allowed in preset files specifying version -``3`` or above, is used to determine whether or not the preset is enabled. For -example, this can be used to disable a preset on platforms other than Windows. -``condition`` may be either a boolean, ``null``, or an object. If it is a -boolean, the boolean indicates whether the preset is enabled or disabled. If it -is ``null``, the preset is enabled, but the ``null`` condition is not inherited -by any presets that may inherit from the preset. Sub-conditions (for example in -a ``not``, ``anyOf``, or ``allOf`` condition) may not be ``null``. If it is an -object, it has the following fields: +.. presets-versionadded:: 3 + +The ``condition`` field of a preset is used to determine whether or not the +preset is enabled. For example, this can be used to disable a preset on +platforms other than Windows. ``condition`` may be either a boolean, ``null``, +or an object. If it is a boolean, the boolean indicates whether the preset is +enabled or disabled. If it is ``null``, the preset is enabled, but the ``null`` +condition is not inherited by any presets that may inherit from the preset. +Sub-conditions (for example in a ``not``, ``anyOf``, or ``allOf`` condition) +may not be ``null``. If it is an object, it has the following fields: ``type`` A required string with one of the following values: @@ -1207,9 +163,7 @@ object, it has the following fields: A required boolean which provides a constant value for the condition's evaluation. - ``"equals"`` - - ``"notEquals"`` + ``"equals"``, ``"notEquals"`` Indicates that the condition compares two strings to see if they are equal (or not equal). The condition object will have the following additional fields: @@ -1220,9 +174,7 @@ object, it has the following fields: ``rhs`` Second string to compare. This field supports macro expansion. - ``"inList"`` - - ``"notInList"`` + ``"inList"``, ``"notInList"`` Indicates that the condition searches for a string in a list of strings. The condition object will have the following additional fields: @@ -1233,9 +185,7 @@ object, it has the following fields: A required array of strings to search. This field supports macro expansion, and uses short-circuit evaluation. - ``"matches"`` - - ``"notMatches"`` + ``"matches"``, ``"notMatches"`` Indicates that the condition searches for a regular expression in a string. The condition object will have the following additional fields: @@ -1246,9 +196,7 @@ object, it has the following fields: A required regular expression to search for. This field supports macro expansion. - ``"anyOf"`` - - ``"allOf"`` + ``"anyOf"``, ``"allOf"`` Indicates that the condition is an aggregation of zero or more nested conditions. The condition object will have the following additional fields: @@ -1310,44 +258,47 @@ Recognized macros include: .. _`CMakePresets hostSystemName`: ``${hostSystemName}`` + .. presets-versionadded:: 3 + The name of the host operating system. Contains the same value as - :variable:`CMAKE_HOST_SYSTEM_NAME`. This is allowed in preset files - specifying version ``3`` or above. + :variable:`CMAKE_HOST_SYSTEM_NAME`. .. _`CMakePresets fileDir`: ``${fileDir}`` + .. presets-versionadded:: 4 + Path to the directory containing the preset file which defines the preset being used. - This is allowed in preset files specifying version ``4`` or above. + .. presets-versionchanged:: 12 - In preset files specifying version ``12`` or above, this *always* expands to - the directory of the current preset file containing the macro, regardless - of the preset being used. + This macro *always* expands to the directory of the current preset file + containing the macro, regardless of the preset being used. - For example, consider the following scenario. + For example, consider the following scenario. - * ``/path/to/CMakePresets.json`` includes - ``/path/to/subdir/CMakePresets.json``. - * ``/path/to/subdir/CMakePresets.json`` defines preset ``Base``, which - sets variable ``MY_DIR`` to ``${fileDir}``. - * ``/path/to/CMakePresets.json`` defines preset ``Derived``, and - ``Derived`` inherits from ``Base``. + * ``/path/to/CMakePresets.json`` includes + ``/path/to/subdir/CMakePresets.json``. + * ``/path/to/subdir/CMakePresets.json`` defines preset ``Base``, which + sets variable ``MY_DIR`` to ``${fileDir}``. + * ``/path/to/CMakePresets.json`` defines preset ``Derived``, and + ``Derived`` inherits from ``Base``. - Under preset versions 4-11, ``MY_DIR`` will be set to ``/path/to/`` when - using the ``Base`` preset, and ``/path/to/subdir/`` when using the - ``Derived`` preset. - When ``/path/to/subdir/CMakePresets.json`` specifies version ``12`` or - above, ``MY_DIR`` will always be set to ``/path/to/subdir/``, regardless of - the preset being used. + Under preset versions ``4``-``11``, ``MY_DIR`` will be set to ``/path/to/`` + when using the ``Base`` preset, and ``/path/to/subdir/`` when using the + ``Derived`` preset. - .. note:: + When ``/path/to/subdir/CMakePresets.json`` specifies version ``12`` or + above, ``MY_DIR`` will always be set to ``/path/to/subdir/``, regardless of + the preset being used. - Since the ``${fileDir}`` macro in version 12 is expanded in the context of - the current preset file, it is the version of the current file, rather than - the version of the root file containing the preset being used, which - enables this alternative behavior. + .. note:: + + Since the ``${fileDir}`` macro in version 12 is expanded in the context + of the current preset file, it is the version of the current file, rather + than the version of the root file containing the preset being used, which + enables this alternative behavior. ``${dollar}`` A literal dollar sign (``$``). @@ -1355,6 +306,8 @@ Recognized macros include: .. _`CMakePresets pathListSep`: ``${pathListSep}`` + .. presets-versionadded:: 5 + Native character for separating lists of paths, such as ``:`` or ``;``. For example, by setting ``PATH`` to @@ -1362,8 +315,6 @@ Recognized macros include: expand to the underlying operating system's character used for concatenation in ``PATH``. - This is allowed in preset files specifying version ``5`` or above. - ``$env{}`` Environment variable with name ````. The variable name may not be an empty string. If the variable is defined in the ``environment`` @@ -1426,10 +377,14 @@ they were added and a summary of the new features and changes is given below. `Build `_, and `Test Presets `_. * Changes to `Configure Presets `_ - * The `installDir `_ field was added. - * The `toolchainFile `_ field was added. - * The `binaryDir `_ field is now optional. - * The `generator `_ field is now optional. + * The `installDir `_ field was + added. + * The `toolchainFile `_ + field was added. + * The `binaryDir `_ field is + now optional. + * The `generator `_ field is + now optional. * Changes to `Macro Expansion`_ @@ -1444,7 +399,7 @@ they were added and a summary of the new features and changes is given below. * Changes to `Build Presets `_ * The - `resolvePackageReferences `_ + `resolvePackageReferences `_ field was added. * Changes to `Macro Expansion`_ @@ -1456,8 +411,9 @@ they were added and a summary of the new features and changes is given below. * Changes to `Test Presets `_ - * The `testOutputTruncation `_ - field was added to the `output `_ object. + * The `testOutputTruncation `_ + field was added to the `output `_ + object. * Changes to `Macro Expansion`_ @@ -1470,15 +426,16 @@ they were added and a summary of the new features and changes is given below. * `Workflow Presets `_ were added. * Changes to `Test Presets `_ - * The `outputJUnitFile `_ field was added - to the `output `_ object. + * The `outputJUnitFile `_ + field was added to the `output `_ + object. ``7`` .. versionadded:: 3.27 * Changes to `Configure Presets `_ - * The `trace `_ field was added. + * The `trace `_ field was added. * Changes to `Includes`_ @@ -1487,7 +444,8 @@ they were added and a summary of the new features and changes is given below. ``8`` .. versionadded:: 3.28 - * The `$schema `_ field was added to the root object. + * The `$schema `_ field was added to the root + object. ``9`` .. versionadded:: 3.30 @@ -1503,16 +461,17 @@ they were added and a summary of the new features and changes is given below. throughout ``CMakePresets.json`` and ``CMakeUserPresets.json``. * Changes to `Configure Presets `_: - * The `graphviz `_ field was added. + * The `graphviz `_ field was + added. ``11`` .. versionadded:: 4.3 * Changes to `Test Presets `_ - * The `jobs `_ field now accepts an empty string - representing :option:`--parallel ` with ```` - omitted. + * The `jobs `_ field now + accepts an empty string representing + :ctest-option:`--parallel` with ```` omitted. ``12`` .. versionadded:: 4.4 @@ -1526,7 +485,7 @@ they were added and a summary of the new features and changes is given below. * Changes to `Test Presets `_ - * The `testPassthroughArguments `_ + * The `testPassthroughArguments `_ field was added to forward arguments to test executables. Schema diff --git a/Help/manual/presets/architecture-properties.rst b/Help/manual/presets/architecture-properties.rst new file mode 100644 index 0000000000..31182b5356 --- /dev/null +++ b/Help/manual/presets/architecture-properties.rst @@ -0,0 +1,27 @@ +.. This file was generated by Utilities/Scripts/regenerate-presets.py + from Help/manual/presets/schema.yaml. Do not edit. + +.. _`CMakePresets.configurePresets.architecture.value`: + +``value`` + An optional string representing the value. + +.. _`CMakePresets.configurePresets.architecture.strategy`: + +``strategy`` + An optional string telling CMake how to handle the field. + Valid values are: + + ``"set"`` + Set the respective value. This will result in an error for generators + that do not support the respective field. + + ``"external"`` + Do not set the value, even if the generator supports it. This is + useful if, for example, a preset uses the Ninja generator, and an IDE + knows how to set up the Visual C++ environment from the architecture + and toolset fields. In that case, CMake will ignore the field, but + the IDE can use them to set up the environment before invoking CMake. + + If no ``strategy`` field is given, or if the field uses the string form + rather than the object form, the behavior is the same as ``"set"``. diff --git a/Help/manual/presets/buildPresets-properties.rst b/Help/manual/presets/buildPresets-properties.rst new file mode 100644 index 0000000000..842ee40e45 --- /dev/null +++ b/Help/manual/presets/buildPresets-properties.rst @@ -0,0 +1,213 @@ +.. This file was generated by Utilities/Scripts/regenerate-presets.py + from Help/manual/presets/schema.yaml. Do not edit. + +.. _`CMakePresets.buildPresets.name`: + +``name`` + A required string representing the machine-friendly name of the + preset. This identifier is used in the + :option:`cmake --build --preset ` option. + There must not be two build presets in the union of + ``CMakePresets.json`` and ``CMakeUserPresets.json`` in the same + directory with the same name. However, a build preset may have the + same name as a configure, test, package, or workflow preset. + +.. _`CMakePresets.buildPresets.hidden`: + +``hidden`` + An optional boolean specifying whether or not a preset should be + hidden. If a preset is hidden, it cannot be used in the + :cmake-build-option:`--preset` argument and does not have to have a + valid ``configurePreset``, even from inheritance. ``hidden`` + presets are intended to be used as a base for other presets to + inherit via the ``inherits`` field. + +.. _`CMakePresets.buildPresets.inherits`: + +``inherits`` + An optional array of strings representing the names of presets from which + to inherit. This field can also be a string, which is equivalent to an + array containing one string. + + The preset will inherit all of the fields from the ``inherits`` presets + by default (except ``name``, ``hidden``, ``inherits``, ``description``, + and ``displayName``), but can override them as desired. If multiple + ``inherits`` presets provide conflicting values for the same field, the + earlier preset in the ``inherits`` array will be preferred. + + A preset can only inherit from another preset that is defined in the same + file or in one of the files it includes (directly or indirectly). Presets + in ``CMakePresets.json`` may not inherit from presets in + ``CMakeUserPresets.json``. + +.. _`CMakePresets.buildPresets.condition`: + +``condition`` + .. presets-versionadded:: 3 + + An optional `Condition`_ object. + +.. _`CMakePresets.buildPresets.vendor`: + +``vendor`` + An optional map containing vendor-specific information. CMake does not + interpret the contents of this field except to verify that it is a map if + it does exist. However, it should follow the same conventions as the + root-level ``vendor`` field. If vendors use their own per-preset + ``vendor`` field, they should implement inheritance in a sensible manner + when appropriate. + +.. _`CMakePresets.buildPresets.displayName`: + +``displayName`` + An optional string with a human-friendly name of the preset. + +.. _`CMakePresets.buildPresets.description`: + +``description`` + An optional string with a human-friendly description of the preset. + +.. _`CMakePresets.buildPresets.environment`: + +``environment`` + An optional map of environment variables. The key is the variable name + (which may not be an empty string), and the value is either ``null`` or a + string representing the value of the variable. Each variable is set + regardless of whether or not a value was given to it by the process's + environment. + + This field supports `macro expansion`_, and environment variables in this + map may reference each other, and may be listed in any order, as long as + such references do not cause a cycle (for example, if ``ENV_1`` is + ``$env{ENV_2}``, ``ENV_2`` may not be ``$env{ENV_1}``). ``$penv{NAME}`` + allows one to prepend or append values to existing environment variables + by accessing only values from the parent environment. + + Environment variables are inherited through the ``inherits`` field, and + the preset's environment will be the union of its own ``environment`` and + the ``environment`` from all its parents. If multiple presets in this + union define the same variable, the standard rules of ``inherits`` are + applied. Setting a variable to ``null`` causes it to not be set, even if + a value was inherited from another preset. + + .. note:: + + For a CMake project using :module:`ExternalProject` with a + configuration preset having environment variables needed in the + ExternalProject, use a build preset that inherits that + configuration preset or the ExternalProject will not have the + environment variables set in the configuration preset. Example: + suppose the host defaults to one compiler (say Clang) and the user + wishes to use another compiler (say GCC). Set configuration preset + environment variables :envvar:`CC` and :envvar:`CXX` and use a + build preset that inherits that configuration preset. Otherwise the + ExternalProject may use a different (system default) compiler than + the top-level CMake project. + + +.. _`CMakePresets.buildPresets.configurePreset`: + +``configurePreset`` + An optional string specifying the name of a configure preset to + associate with this build preset. If ``configurePreset`` is not + specified, it must be inherited from the inherits preset (unless + this preset is hidden). The build directory is inferred from the + configure preset, so the build will take place in the same + ``binaryDir`` that the configuration did. + +.. _`CMakePresets.buildPresets.inheritConfigureEnvironment`: + +``inheritConfigureEnvironment`` + An optional boolean that defaults to ``true``. If ``true``, the + environment variables from the associated configure preset are + inherited after all inherited build preset environments, but before + environment variables explicitly specified in this build preset. + +.. _`CMakePresets.buildPresets.jobs`: + +``jobs`` + An optional integer. Equivalent to passing + :cmake-build-option:`--parallel` or ``-j`` on the command line. + If the value is ``0``, it is equivalent to passing ``--parallel`` + with ```` omitted; alternatively, one can define the + environment variable :envvar:`CMAKE_BUILD_PARALLEL_LEVEL` as an + empty string using the ``environment`` field. + + .. versionchanged:: 4.3 + + This field does not accept negative integer values, regardless of + the version in the preset file. + +.. _`CMakePresets.buildPresets.targets`: + +``targets`` + An optional string or array of strings. Equivalent to passing + :cmake-build-option:`--target` or ``-t`` on the command line. + Vendors may ignore the targets property or hide build presets that + explicitly specify targets. This field supports `macro expansion`_. + +.. _`CMakePresets.buildPresets.configuration`: + +``configuration`` + An optional string. Equivalent to passing + :cmake-build-option:`--config` on the command line. + +.. _`CMakePresets.buildPresets.cleanFirst`: + +``cleanFirst`` + An optional bool. If ``true``, equivalent to passing + :cmake-build-option:`--clean-first` on the command line. + +.. _`CMakePresets.buildPresets.resolvePackageReferences`: + +``resolvePackageReferences`` + .. presets-versionadded:: 4 + + An optional string that specifies the package resolve mode. + + Package references are used to define dependencies to packages from + external package managers. Currently only NuGet in combination with + the :ref:`Visual Studio generators` is supported. If there are no + targets that define package references, this option does nothing. + Valid values are: + + ``on`` + Causes package references to be resolved before attempting a + build. + + ``off`` + Package references will not be resolved. Note that this may cause + errors in some build environments, such as .NET SDK style + projects. + + ``only`` + Only resolve package references, but do not perform a build. + + .. note:: + + The command line parameter + :cmake-build-option:`--resolve-package-references` + will take priority over this setting. If the command line + parameter is not provided and this setting is not specified, an + environment-specific cache variable will be evaluated to decide, + if package restoration should be performed. + + When using the :ref:`Visual Studio generators`, + package references are defined using the + :prop_tgt:`VS_PACKAGE_REFERENCES` property. Package references + are restored using NuGet. It can be disabled by setting the + :variable:`CMAKE_VS_NUGET_PACKAGE_RESTORE` variable to ``OFF``. + This can also be done from within a configure preset. + +.. _`CMakePresets.buildPresets.verbose`: + +``verbose`` + An optional boolean. If ``true``, equivalent to passing + :cmake-build-option:`--verbose` on the command line. + +.. _`CMakePresets.buildPresets.nativeToolOptions`: + +``nativeToolOptions`` + An optional array of strings. Equivalent to passing options after + :cmake-build-option:`--` on the command line. The array values + support `macro expansion`_. diff --git a/Help/manual/presets/cacheVariables-properties.rst b/Help/manual/presets/cacheVariables-properties.rst new file mode 100644 index 0000000000..76e1a6666a --- /dev/null +++ b/Help/manual/presets/cacheVariables-properties.rst @@ -0,0 +1,7 @@ +.. This file was generated by Utilities/Scripts/regenerate-presets.py + from Help/manual/presets/schema.yaml. Do not edit. + +.. _`CMakePresets.configurePresets.cacheVariables.type`: + +``type`` + An optional string representing the type of the variable. It should be BOOL, FILEPATH, PATH, STRING, or INTERNAL. diff --git a/Help/manual/presets/cmakeMinimumRequired-properties.rst b/Help/manual/presets/cmakeMinimumRequired-properties.rst new file mode 100644 index 0000000000..e3ede9bc01 --- /dev/null +++ b/Help/manual/presets/cmakeMinimumRequired-properties.rst @@ -0,0 +1,17 @@ +.. This file was generated by Utilities/Scripts/regenerate-presets.py + from Help/manual/presets/schema.yaml. Do not edit. + +.. _`CMakePresets.cmakeMinimumRequired.major`: + +``major`` + An optional integer representing the major version. + +.. _`CMakePresets.cmakeMinimumRequired.minor`: + +``minor`` + An optional integer representing the minor version. + +.. _`CMakePresets.cmakeMinimumRequired.patch`: + +``patch`` + An optional integer representing the patch version. diff --git a/Help/manual/presets/configurePresets-properties.rst b/Help/manual/presets/configurePresets-properties.rst new file mode 100644 index 0000000000..c15874b343 --- /dev/null +++ b/Help/manual/presets/configurePresets-properties.rst @@ -0,0 +1,251 @@ +.. This file was generated by Utilities/Scripts/regenerate-presets.py + from Help/manual/presets/schema.yaml. Do not edit. + +.. _`CMakePresets.configurePresets.name`: + +``name`` + A required string representing the machine-friendly name of the + preset. This identifier is used in the :option:`cmake --preset` + option. There must not be two configure presets in the union of + ``CMakePresets.json`` and ``CMakeUserPresets.json`` in the same + directory with the same name. However, a configure preset may have + the same name as a build, test, package, or workflow preset. + +.. _`CMakePresets.configurePresets.hidden`: + +``hidden`` + An optional boolean specifying whether or not a preset should be + hidden. If a preset is hidden, it cannot be used in the + :cmake-option:`--preset` argument, will not show up in the + :manual:`CMake GUI `, and does not have to have a + valid ``generator`` or ``binaryDir``, even from inheritance. + ``hidden`` presets are intended to be used as a base for other + presets to inherit via the ``inherits`` field. + +.. _`CMakePresets.configurePresets.inherits`: + +``inherits`` + An optional array of strings representing the names of presets from which + to inherit. This field can also be a string, which is equivalent to an + array containing one string. + + The preset will inherit all of the fields from the ``inherits`` presets + by default (except ``name``, ``hidden``, ``inherits``, ``description``, + and ``displayName``), but can override them as desired. If multiple + ``inherits`` presets provide conflicting values for the same field, the + earlier preset in the ``inherits`` array will be preferred. + + A preset can only inherit from another preset that is defined in the same + file or in one of the files it includes (directly or indirectly). Presets + in ``CMakePresets.json`` may not inherit from presets in + ``CMakeUserPresets.json``. + +.. _`CMakePresets.configurePresets.condition`: + +``condition`` + .. presets-versionadded:: 3 + + An optional `Condition`_ object. + +.. _`CMakePresets.configurePresets.vendor`: + +``vendor`` + An optional map containing vendor-specific information. CMake does not + interpret the contents of this field except to verify that it is a map if + it does exist. However, it should follow the same conventions as the + root-level ``vendor`` field. If vendors use their own per-preset + ``vendor`` field, they should implement inheritance in a sensible manner + when appropriate. + +.. _`CMakePresets.configurePresets.displayName`: + +``displayName`` + An optional string with a human-friendly name of the preset. + +.. _`CMakePresets.configurePresets.description`: + +``description`` + An optional string with a human-friendly description of the preset. + +.. _`CMakePresets.configurePresets.generator`: + +``generator`` + An optional string representing the + :manual:`generator ` to use for the preset. + + .. presets-versionchanged:: 3 + + If omitted, CMake will fall back to regular generator discovery + procedure. In previous versions, if not specified, this field + must be inherited from the ``inherits`` preset (unless this + preset is ``hidden``). + + Note that for :ref:`Visual Studio generators`, unlike in the + command line :cmake-option:`-G` argument, you cannot include the + platform name in the generator name. Use the ``architecture`` + field instead. + +.. _`CMakePresets.configurePresets.architecture`: + +``architecture`` + Optional field representing the platform for + :manual:`generators ` that support it. + + See :option:`cmake -A` for possible values. + + ``architecture`` may be either a string or an object with the + following fields: + + .. include:: presets/architecture-properties.rst + +.. _`CMakePresets.configurePresets.toolset`: + +``toolset`` + Optional field representing the toolset for + :manual:`generators ` that support it. + + See :option:`cmake -T` for possible values. + + ``toolset`` may be either a string or an object with the following + fields: + + .. include:: presets/toolset-properties.rst + +.. _`CMakePresets.configurePresets.toolchainFile`: + +``toolchainFile`` + .. presets-versionadded:: 3 + + An optional string representing the path to the toolchain file. + This field supports `macro expansion`_. If a relative path is + specified, it is calculated relative to the build directory, and if + not found, relative to the source directory. This field takes + precedence over any :variable:`CMAKE_TOOLCHAIN_FILE` value. + +.. _`CMakePresets.configurePresets.graphviz`: + +``graphviz`` + .. presets-versionadded:: 10 + + An optional string representing the path to the graphviz input + file, that will contain all the library and executable dependencies + in the project. See the documentation for + :option:`cmake --graphviz` for more details. + + This field supports `macro expansion`_. If a relative path is + specified, it is calculated relative to the current working + directory. + +.. _`CMakePresets.configurePresets.binaryDir`: + +``binaryDir`` + An optional string representing the path to the output binary + directory. This field supports `macro expansion`_. If a relative + path is specified, it is calculated relative to the source + directory. + + .. presets-versionchanged:: 3 + + If omitted, CMake will calculate the path using regular methods. + In previous versions, if not specified, this field must be + inherited from the ``inherits`` preset (unless this preset is + ``hidden``). + +.. _`CMakePresets.configurePresets.installDir`: + +``installDir`` + .. presets-versionadded:: 3 + + An optional string representing the path to the installation + directory, which will be used as the + :variable:`CMAKE_INSTALL_PREFIX` variable. This field supports + `macro expansion`_. If a relative path is specified, it is + calculated relative to the source directory. + +.. _`CMakePresets.configurePresets.cmakeExecutable`: + +``cmakeExecutable`` + An optional string representing the path to the CMake executable to use for this preset. This is reserved for use by IDEs, and is not used by CMake itself. IDEs that use this field should expand any macros in it. + +.. _`CMakePresets.configurePresets.cacheVariables`: + +``cacheVariables`` + An optional map of cache variables. The key is the variable name + (which may not be an empty string), and the value is either + ``null``, a boolean (which is equivalent to a value of ``"TRUE"`` + or ``"FALSE"`` and a type of ``BOOL``), a string representing the + value of the variable (which supports `macro expansion`_), or an + object with the following fields: + + ``type`` + An optional string representing the type of the variable. + + ``value`` + A required string or boolean representing the value of the + variable. A boolean is equivalent to ``"TRUE"`` or ``"FALSE"``. + This field supports `macro expansion`_. + + Cache variables are inherited through the ``inherits`` field, and + the preset's variables will be the union of its own + ``cacheVariables`` and the ``cacheVariables`` from all its parents. + If multiple presets in this union define the same variable, the + standard rules of ``inherits`` are applied. Setting a variable to + ``null`` causes it to not be set, even if a value was inherited + from another preset. + +.. _`CMakePresets.configurePresets.environment`: + +``environment`` + An optional map of environment variables. The key is the variable name + (which may not be an empty string), and the value is either ``null`` or a + string representing the value of the variable. Each variable is set + regardless of whether or not a value was given to it by the process's + environment. + + This field supports `macro expansion`_, and environment variables in this + map may reference each other, and may be listed in any order, as long as + such references do not cause a cycle (for example, if ``ENV_1`` is + ``$env{ENV_2}``, ``ENV_2`` may not be ``$env{ENV_1}``). ``$penv{NAME}`` + allows one to prepend or append values to existing environment variables + by accessing only values from the parent environment. + + Environment variables are inherited through the ``inherits`` field, and + the preset's environment will be the union of its own ``environment`` and + the ``environment`` from all its parents. If multiple presets in this + union define the same variable, the standard rules of ``inherits`` are + applied. Setting a variable to ``null`` causes it to not be set, even if + a value was inherited from another preset. + +.. _`CMakePresets.configurePresets.warnings`: + +``warnings`` + An optional object specifying the warnings to enable. + The object may contain the following fields: + + .. include:: presets/warnings-properties.rst + +.. _`CMakePresets.configurePresets.errors`: + +``errors`` + An optional object specifying the errors to enable. + The object may contain the following fields: + + .. include:: presets/errors-properties.rst + +.. _`CMakePresets.configurePresets.debug`: + +``debug`` + An optional object specifying debug options. + The object may contain the following fields: + + .. include:: presets/debug-properties.rst + +.. _`CMakePresets.configurePresets.trace`: + +``trace`` + .. presets-versionadded:: 7 + + An optional object specifying trace options. + The object may contain the following fields: + + .. include:: presets/trace-properties.rst diff --git a/Help/manual/presets/debug-properties.rst b/Help/manual/presets/debug-properties.rst new file mode 100644 index 0000000000..6c8cbde781 --- /dev/null +++ b/Help/manual/presets/debug-properties.rst @@ -0,0 +1,20 @@ +.. This file was generated by Utilities/Scripts/regenerate-presets.py + from Help/manual/presets/schema.yaml. Do not edit. + +.. _`CMakePresets.configurePresets.debug.output`: + +``output`` + An optional boolean. Setting this to ``true`` is equivalent to + passing :cmake-option:`--debug-output` on the command line. + +.. _`CMakePresets.configurePresets.debug.tryCompile`: + +``tryCompile`` + An optional boolean. Setting this to ``true`` is equivalent to + passing :cmake-option:`--debug-trycompile` on the command line. + +.. _`CMakePresets.configurePresets.debug.find`: + +``find`` + An optional boolean. Setting this to ``true`` is equivalent to + passing :cmake-option:`--debug-find` on the command line. diff --git a/Help/manual/presets/errors-properties.rst b/Help/manual/presets/errors-properties.rst new file mode 100644 index 0000000000..6f3a0ffb2f --- /dev/null +++ b/Help/manual/presets/errors-properties.rst @@ -0,0 +1,22 @@ +.. This file was generated by Utilities/Scripts/regenerate-presets.py + from Help/manual/presets/schema.yaml. Do not edit. + +.. _`CMakePresets.configurePresets.errors.deprecated`: + +``deprecated`` + An optional boolean. Equivalent to passing + :cmake-option:`-Werror=deprecated` or + :cmake-option:`-Wno-error=deprecated` + on the command line. + This may not be set to ``true`` + if ``warnings.deprecated`` is set to ``false``. + +.. _`CMakePresets.configurePresets.errors.dev`: + +``dev`` + An optional boolean. Equivalent to passing + :cmake-option:`-Werror=dev` or + :cmake-option:`-Wno-error=dev` + on the command line. + This may not be set to ``true`` + if ``warnings.dev`` is set to ``false``. diff --git a/Help/manual/presets/exclude-properties.rst b/Help/manual/presets/exclude-properties.rst new file mode 100644 index 0000000000..24775b53fb --- /dev/null +++ b/Help/manual/presets/exclude-properties.rst @@ -0,0 +1,25 @@ +.. This file was generated by Utilities/Scripts/regenerate-presets.py + from Help/manual/presets/schema.yaml. Do not edit. + +.. _`CMakePresets.testPresets.filter.exclude.name`: + +``name`` + An optional string specifying a regex for test names. + Equivalent to passing :ctest-option:`--exclude-regex` on + the command line. This field supports `macro expansion`_. + +.. _`CMakePresets.testPresets.filter.exclude.label`: + +``label`` + An optional string specifying a regex for test labels. + Equivalent to passing :ctest-option:`--label-exclude` on + the command line. This field supports `macro expansion`_. + +.. _`CMakePresets.testPresets.filter.exclude.fixtures`: + +``fixtures`` + An optional object specifying which fixtures to exclude + from adding tests. The object may contain the following + fields: + + .. include:: presets/fixtures-properties.rst diff --git a/Help/manual/presets/execution-properties.rst b/Help/manual/presets/execution-properties.rst new file mode 100644 index 0000000000..ebe80fce91 --- /dev/null +++ b/Help/manual/presets/execution-properties.rst @@ -0,0 +1,115 @@ +.. This file was generated by Utilities/Scripts/regenerate-presets.py + from Help/manual/presets/schema.yaml. Do not edit. + +.. _`CMakePresets.testPresets.execution.stopOnFailure`: + +``stopOnFailure`` + An optional bool. If ``true``, equivalent to passing + :ctest-option:`--stop-on-failure` on the command line. + +.. _`CMakePresets.testPresets.execution.enableFailover`: + +``enableFailover`` + An optional bool. If ``true``, equivalent to passing + :ctest-option:`-F` on the command line. + +.. _`CMakePresets.testPresets.execution.jobs`: + +``jobs`` + An optional integer. Equivalent to passing + :ctest-option:`--parallel` on the command line. If the value is + ``0``, it is equivalent to unbounded parallelism. + + .. presets-versionchanged:: 11 + + This field can also be a string, in which case it must be + empty, and is equivalent to passing ``--parallel`` with + ```` omitted. + + .. versionchanged:: 4.3 + + This field does not accept negative integer values, + regardless of the version in the preset file. + +.. _`CMakePresets.testPresets.execution.resourceSpecFile`: + +``resourceSpecFile`` + An optional string. Equivalent to passing + :ctest-option:`--resource-spec-file` on the command line. This + field supports `macro expansion`_. + +.. _`CMakePresets.testPresets.execution.testLoad`: + +``testLoad`` + An optional integer. Equivalent to passing + :ctest-option:`--test-load` on the command line. + +.. _`CMakePresets.testPresets.execution.showOnly`: + +``showOnly`` + An optional string. Equivalent to passing + :ctest-option:`--show-only` on the command line. The string + must be one of the following values: + + * ``human`` + + * ``json-v1`` + +.. _`CMakePresets.testPresets.execution.repeat`: + +``repeat`` + An optional object specifying how to repeat tests. Equivalent + to passing :ctest-option:`--repeat` on the command line. + The object must have the following fields: + + .. include:: presets/repeat-properties.rst + +.. _`CMakePresets.testPresets.execution.interactiveDebugging`: + +``interactiveDebugging`` + An optional bool. If ``true``, equivalent to passing + :ctest-option:`--interactive-debug-mode 1` on the command line. + If ``false``, equivalent to passing + :ctest-option:`--interactive-debug-mode 0` on the command line. + +.. _`CMakePresets.testPresets.execution.scheduleRandom`: + +``scheduleRandom`` + An optional bool. If ``true``, equivalent to passing + :ctest-option:`--schedule-random` on the command line. + +.. _`CMakePresets.testPresets.execution.timeout`: + +``timeout`` + An optional integer. Equivalent to passing + :ctest-option:`--timeout` on the command line. + +.. _`CMakePresets.testPresets.execution.noTestsAction`: + +``noTestsAction`` + An optional string specifying the behavior if no tests are + found. Must be one of the following values: + + ``default`` + Equivalent to not passing any value on the command line. + + ``error`` + Equivalent to passing :ctest-option:`--no-tests=error` + on the command line. + + ``ignore`` + Equivalent to passing :ctest-option:`--no-tests=ignore` + on the command line. + +.. _`CMakePresets.testPresets.execution.testPassthroughArguments`: + +``testPassthroughArguments`` + .. presets-versionadded:: 12 + + An optional array of strings. Each element is forwarded as an + argument to every test executable, equivalent to passing + arguments after :option:`ctest --` on the command line. + + When both preset and command-line passthrough arguments are + specified, preset arguments appear first, followed by + command-line arguments. diff --git a/Help/manual/presets/filter-properties.rst b/Help/manual/presets/filter-properties.rst new file mode 100644 index 0000000000..083e268917 --- /dev/null +++ b/Help/manual/presets/filter-properties.rst @@ -0,0 +1,18 @@ +.. This file was generated by Utilities/Scripts/regenerate-presets.py + from Help/manual/presets/schema.yaml. Do not edit. + +.. _`CMakePresets.testPresets.filter.include`: + +``include`` + An optional object specifying which tests to include. + The object may contain the following fields: + + .. include:: presets/include-properties.rst + +.. _`CMakePresets.testPresets.filter.exclude`: + +``exclude`` + An optional object specifying which tests to exclude. + The object may contain the following fields: + + .. include:: presets/exclude-properties.rst diff --git a/Help/manual/presets/fixtures-properties.rst b/Help/manual/presets/fixtures-properties.rst new file mode 100644 index 0000000000..727236a0d5 --- /dev/null +++ b/Help/manual/presets/fixtures-properties.rst @@ -0,0 +1,27 @@ +.. This file was generated by Utilities/Scripts/regenerate-presets.py + from Help/manual/presets/schema.yaml. Do not edit. + +.. _`CMakePresets.testPresets.filter.exclude.fixtures.any`: + +``any`` + An optional string specifying a regex for text fixtures + to exclude from adding any tests. Equivalent to passing + :ctest-option:`--fixture-exclude-any` on the command + line. This field supports `macro expansion`_. + +.. _`CMakePresets.testPresets.filter.exclude.fixtures.setup`: + +``setup`` + An optional string specifying a regex for text fixtures + to exclude from adding setup tests. Equivalent to + passing :ctest-option:`--fixture-exclude-setup` on the + command line. This field supports `macro expansion`_. + +.. _`CMakePresets.testPresets.filter.exclude.fixtures.cleanup`: + +``cleanup`` + An optional string specifying a regex for text fixtures + to exclude from adding cleanup tests. Equivalent to + passing :ctest-option:`--fixture-exclude-cleanup` on + the command line. + This field supports `macro expansion`_. diff --git a/Help/manual/presets/include-properties.rst b/Help/manual/presets/include-properties.rst new file mode 100644 index 0000000000..b55c0e1046 --- /dev/null +++ b/Help/manual/presets/include-properties.rst @@ -0,0 +1,37 @@ +.. This file was generated by Utilities/Scripts/regenerate-presets.py + from Help/manual/presets/schema.yaml. Do not edit. + +.. _`CMakePresets.testPresets.filter.include.name`: + +``name`` + An optional string specifying a regex for test names. + Equivalent to passing :ctest-option:`--tests-regex` on the + command line. This field supports `macro expansion`_. + + CMake regex syntax is described under + :ref:`string(REGEX) `. + +.. _`CMakePresets.testPresets.filter.include.label`: + +``label`` + An optional string specifying a regex for test labels. + Equivalent to passing :ctest-option:`--label-regex` on the + command line. This field supports `macro expansion`_. + +.. _`CMakePresets.testPresets.filter.include.useUnion`: + +``useUnion`` + An optional bool. Equivalent to passing + :ctest-option:`--union` on the command line. + +.. _`CMakePresets.testPresets.filter.include.index`: + +``index`` + An optional object specifying tests to include by test + index. The object may contain the following fields. Can + also be an optional string specifying a file with the + command line syntax for + :ctest-option:`--tests-information`. If specified as a + string, this field supports `macro expansion`_. + + .. include:: presets/index-properties.rst diff --git a/Help/manual/presets/index-properties.rst b/Help/manual/presets/index-properties.rst new file mode 100644 index 0000000000..6bbce33042 --- /dev/null +++ b/Help/manual/presets/index-properties.rst @@ -0,0 +1,22 @@ +.. This file was generated by Utilities/Scripts/regenerate-presets.py + from Help/manual/presets/schema.yaml. Do not edit. + +.. _`CMakePresets.testPresets.filter.include.index.start`: + +``start`` + An optional integer specifying a test index at which to start testing. + +.. _`CMakePresets.testPresets.filter.include.index.end`: + +``end`` + An optional integer specifying a test index at which to stop testing. + +.. _`CMakePresets.testPresets.filter.include.index.stride`: + +``stride`` + An optional integer specifying the increment. + +.. _`CMakePresets.testPresets.filter.include.index.specificTests`: + +``specificTests`` + An optional array of integers specifying specific test indices to run. diff --git a/Help/manual/presets/packageOutput-properties.rst b/Help/manual/presets/packageOutput-properties.rst new file mode 100644 index 0000000000..d8ab6fb09c --- /dev/null +++ b/Help/manual/presets/packageOutput-properties.rst @@ -0,0 +1,16 @@ +.. This file was generated by Utilities/Scripts/regenerate-presets.py + from Help/manual/presets/schema.yaml. Do not edit. + +.. _`CMakePresets.packagePresets.output.debug`: + +``debug`` + An optional boolean specifying whether or not to print debug + information. A value of ``true`` is equivalent to passing + :cpack-option:`--debug` on the command line. + +.. _`CMakePresets.packagePresets.output.verbose`: + +``verbose`` + An optional boolean specifying whether or not to print + verbosely. A value of ``true`` is equivalent to passing + :cpack-option:`--verbose` on the command line. diff --git a/Help/manual/presets/packagePresets-properties.rst b/Help/manual/presets/packagePresets-properties.rst new file mode 100644 index 0000000000..2c21b53789 --- /dev/null +++ b/Help/manual/presets/packagePresets-properties.rst @@ -0,0 +1,174 @@ +.. This file was generated by Utilities/Scripts/regenerate-presets.py + from Help/manual/presets/schema.yaml. Do not edit. + +.. _`CMakePresets.packagePresets.name`: + +``name`` + A required string representing the machine-friendly name of the + preset. This identifier is used in the :option:`cpack --preset` + option. There must not be two package presets in the union of + ``CMakePresets.json`` and ``CMakeUserPresets.json`` in the same + directory with the same name. However, a package preset may have + the same name as a configure, build, test, or workflow preset. + +.. _`CMakePresets.packagePresets.hidden`: + +``hidden`` + An optional boolean specifying whether or not a preset should be + hidden. If a preset is hidden, it cannot be used in the + :cpack-option:`--preset` argument and does not have to have a valid + ``configurePreset``, even from inheritance. ``hidden`` presets are + intended to be used as a base for other presets to inherit via the + ``inherits`` field. + +.. _`CMakePresets.packagePresets.inherits`: + +``inherits`` + An optional array of strings representing the names of presets from which + to inherit. This field can also be a string, which is equivalent to an + array containing one string. + + The preset will inherit all of the fields from the ``inherits`` presets + by default (except ``name``, ``hidden``, ``inherits``, ``description``, + and ``displayName``), but can override them as desired. If multiple + ``inherits`` presets provide conflicting values for the same field, the + earlier preset in the ``inherits`` array will be preferred. + + A preset can only inherit from another preset that is defined in the same + file or in one of the files it includes (directly or indirectly). Presets + in ``CMakePresets.json`` may not inherit from presets in + ``CMakeUserPresets.json``. + +.. _`CMakePresets.packagePresets.condition`: + +``condition`` + An optional `Condition`_ object. + +.. _`CMakePresets.packagePresets.vendor`: + +``vendor`` + An optional map containing vendor-specific information. CMake does not + interpret the contents of this field except to verify that it is a map if + it does exist. However, it should follow the same conventions as the + root-level ``vendor`` field. If vendors use their own per-preset + ``vendor`` field, they should implement inheritance in a sensible manner + when appropriate. + +.. _`CMakePresets.packagePresets.displayName`: + +``displayName`` + An optional string with a human-friendly name of the preset. + +.. _`CMakePresets.packagePresets.description`: + +``description`` + An optional string with a human-friendly description of the preset. + +.. _`CMakePresets.packagePresets.environment`: + +``environment`` + An optional map of environment variables. The key is the variable name + (which may not be an empty string), and the value is either ``null`` or a + string representing the value of the variable. Each variable is set + regardless of whether or not a value was given to it by the process's + environment. + + This field supports `macro expansion`_, and environment variables in this + map may reference each other, and may be listed in any order, as long as + such references do not cause a cycle (for example, if ``ENV_1`` is + ``$env{ENV_2}``, ``ENV_2`` may not be ``$env{ENV_1}``). ``$penv{NAME}`` + allows one to prepend or append values to existing environment variables + by accessing only values from the parent environment. + + Environment variables are inherited through the ``inherits`` field, and + the preset's environment will be the union of its own ``environment`` and + the ``environment`` from all its parents. If multiple presets in this + union define the same variable, the standard rules of ``inherits`` are + applied. Setting a variable to ``null`` causes it to not be set, even if + a value was inherited from another preset. + +.. _`CMakePresets.packagePresets.configurePreset`: + +``configurePreset`` + An optional string specifying the name of a configure preset to + associate with this package preset. If ``configurePreset`` is not + specified, it must be inherited from the inherits preset (unless + this preset is hidden). The build directory is inferred from the + configure preset, so packaging will run in the same ``binaryDir`` + that the configuration did and build did. + +.. _`CMakePresets.packagePresets.inheritConfigureEnvironment`: + +``inheritConfigureEnvironment`` + An optional boolean that defaults to ``true``. If ``true``, the + environment variables from the associated configure preset are + inherited after all inherited package preset environments, but + before environment variables explicitly specified in this package + preset. + +.. _`CMakePresets.packagePresets.generators`: + +``generators`` + An optional array of strings representing generators for CPack to use. + +.. _`CMakePresets.packagePresets.configurations`: + +``configurations`` + An optional array of strings representing build configurations for CPack to package. + +.. _`CMakePresets.packagePresets.variables`: + +``variables`` + An optional map of variables to pass to CPack, equivalent to + :cpack-option:`-D` arguments. Each key is the name of a variable, + and the value is the string to assign to that variable. + +.. _`CMakePresets.packagePresets.configFile`: + +``configFile`` + An optional string representing the config file for CPack to use. + +.. _`CMakePresets.packagePresets.output`: + +``output`` + An optional object specifying output options. Valid keys are: + + .. include:: presets/packageOutput-properties.rst + +.. _`CMakePresets.packagePresets.packageName`: + +``packageName`` + An optional string representing the package name. + + .. note:: + + Due to problems with the implementation, this field does not affect + the name of the final package file produced. However, other aspects + of the package may use the value, leading to inconsistencies. A + future CMake release may address this problem, but until then, it + is recommended that this field not be used. + + +.. _`CMakePresets.packagePresets.packageVersion`: + +``packageVersion`` + An optional string representing the package version. + + .. note:: + + Due to problems with the implementation, this field does not affect + the name of the final package file produced. However, other aspects + of the package may use the value, leading to inconsistencies. A + future CMake release may address this problem, but until then, it + is recommended that this field not be used. + + +.. _`CMakePresets.packagePresets.packageDirectory`: + +``packageDirectory`` + An optional string representing the directory in which to place the package. + +.. _`CMakePresets.packagePresets.vendorName`: + +``vendorName`` + An optional string representing the vendor name. diff --git a/Help/manual/presets/repeat-properties.rst b/Help/manual/presets/repeat-properties.rst new file mode 100644 index 0000000000..98800ffac1 --- /dev/null +++ b/Help/manual/presets/repeat-properties.rst @@ -0,0 +1,18 @@ +.. This file was generated by Utilities/Scripts/regenerate-presets.py + from Help/manual/presets/schema.yaml. Do not edit. + +.. _`CMakePresets.testPresets.execution.repeat.mode`: + +``mode`` + A required string. Must be one of the following values: + + * ``until-fail`` + + * ``until-pass`` + + * ``after-timeout`` + +.. _`CMakePresets.testPresets.execution.repeat.count`: + +``count`` + A required integer. diff --git a/Help/manual/presets/root-properties.rst b/Help/manual/presets/root-properties.rst new file mode 100644 index 0000000000..a1ccccbae0 --- /dev/null +++ b/Help/manual/presets/root-properties.rst @@ -0,0 +1,78 @@ +.. This file was generated by Utilities/Scripts/regenerate-presets.py + from Help/manual/presets/schema.yaml. Do not edit. + +.. _`CMakePresets.$schema`: + +``$schema`` + .. presets-versionadded:: 8 + + An optional string that provides a URI to the JSON schema that describes the structure of this JSON document. This field is used for validation and autocompletion in editors that support JSON schema. It doesn't affect the behavior of the document itself. If this field is not specified, the JSON document will still be valid, but tools that use JSON schema for validation and autocompletion may not function correctly. + +.. _`CMakePresets.version`: + +``version`` + A required integer representing the version of the JSON schema. See + `Versions`_ for discussion of the supported versions and the + corresponding version of CMake in which they were added. + +.. _`CMakePresets.cmakeMinimumRequired`: + +``cmakeMinimumRequired`` + An optional object representing the minimum version of CMake + needed to build this project. This object consists of the following + fields: + + .. include:: presets/cmakeMinimumRequired-properties.rst + +.. _`CMakePresets.include`: + +``include`` + .. presets-versionadded:: 4 + + An optional array of strings representing files to include. If the + filenames are not absolute, they are considered relative to the current + file. See `Includes`_ for discussion of the constraints on included + files. + +.. _`CMakePresets.vendor`: + +``vendor`` + An optional map containing vendor-specific information. CMake does not + interpret the contents of this field except to verify that it is a map if + it does exist. However, the keys should be a vendor-specific domain name + followed by a ``/``-separated path. For example, the Example IDE 1.0 + could use ``example.com/ExampleIDE/1.0``. The value of each field can be + anything desired by the vendor, though will typically be a map. + +.. _`CMakePresets.configurePresets`: + +``configurePresets`` + An optional array of `Configure Preset`_ objects. + +.. _`CMakePresets.buildPresets`: + +``buildPresets`` + .. presets-versionadded:: 2 + + An optional array of `Build Preset`_ objects. + +.. _`CMakePresets.testPresets`: + +``testPresets`` + .. presets-versionadded:: 2 + + An optional array of `Test Preset`_ objects. + +.. _`CMakePresets.packagePresets`: + +``packagePresets`` + .. presets-versionadded:: 6 + + An optional array of `Package Preset`_ objects. + +.. _`CMakePresets.workflowPresets`: + +``workflowPresets`` + .. presets-versionadded:: 6 + + An optional array of `Workflow Preset`_ objects. diff --git a/Help/manual/presets/schema.json b/Help/manual/presets/schema.json index e54cc9fe3e..c1ae1e49de 100644 --- a/Help/manual/presets/schema.json +++ b/Help/manual/presets/schema.json @@ -1,203 +1,440 @@ { "$schema": "http://json-schema.org/draft/2020-12/schema#", "type": "object", - "description": "The presets specify the generator and the build directory, and optionally a list of variables and other arguments to pass to CMake.", "oneOf": [ { + "description": "The presets specify the generator and the build directory, and optionally an array of variables and other arguments to pass to CMake.", "properties": { "version": { - "const": 1, - "description": "A required integer representing the version of the JSON schema." + "type": "integer", + "description": "A required integer representing the version of the JSON schema.", + "const": 1 }, - "cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequiredV1" }, - "vendor": { "$ref": "#/definitions/vendor" }, - "configurePresets": { "$ref": "#/definitions/configurePresetsV1" } + "cmakeMinimumRequired": { + "$ref": "#/definitions/cmakeMinimumRequired@v1..v9" + }, + "vendor": { + "$ref": "#/definitions/vendor@v1.." + }, + "configurePresets": { + "$ref": "#/definitions/configurePresets@v1..v2" + } }, + "required": [ + "version" + ], "additionalProperties": false }, { + "description": "The presets specify the generator and the build directory, and optionally an array of variables and other arguments to pass to CMake.", "properties": { "version": { - "const": 2, - "description": "A required integer representing the version of the JSON schema." + "type": "integer", + "description": "A required integer representing the version of the JSON schema.", + "const": 2 }, - "cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequiredV1" }, - "vendor": { "$ref": "#/definitions/vendor" }, - "configurePresets": { "$ref": "#/definitions/configurePresetsV1" }, - "buildPresets": { "$ref": "#/definitions/buildPresetsV2" }, - "testPresets": { "$ref": "#/definitions/testPresetsV2" } + "cmakeMinimumRequired": { + "$ref": "#/definitions/cmakeMinimumRequired@v1..v9" + }, + "vendor": { + "$ref": "#/definitions/vendor@v1.." + }, + "configurePresets": { + "$ref": "#/definitions/configurePresets@v1..v2" + }, + "buildPresets": { + "$ref": "#/definitions/buildPresets@v2" + }, + "testPresets": { + "$ref": "#/definitions/testPresets@v2" + } }, + "required": [ + "version" + ], "additionalProperties": false }, { + "description": "The presets specify the generator and the build directory, and optionally an array of variables and other arguments to pass to CMake.", "properties": { "version": { - "const": 3, - "description": "A required integer representing the version of the JSON schema." + "type": "integer", + "description": "A required integer representing the version of the JSON schema.", + "const": 3 }, - "cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequiredV1" }, - "vendor": { "$ref": "#/definitions/vendor" }, - "configurePresets": { "$ref": "#/definitions/configurePresetsV3" }, - "buildPresets": { "$ref": "#/definitions/buildPresetsV3" }, - "testPresets": { "$ref": "#/definitions/testPresetsV3" } + "cmakeMinimumRequired": { + "$ref": "#/definitions/cmakeMinimumRequired@v1..v9" + }, + "vendor": { + "$ref": "#/definitions/vendor@v1.." + }, + "configurePresets": { + "$ref": "#/definitions/configurePresets@v3..v6" + }, + "buildPresets": { + "$ref": "#/definitions/buildPresets@v3" + }, + "testPresets": { + "$ref": "#/definitions/testPresets@v3..v4" + } }, + "required": [ + "version" + ], "additionalProperties": false }, { + "description": "The presets specify the generator and the build directory, and optionally an array of variables and other arguments to pass to CMake.", "properties": { "version": { - "const": 4, - "description": "A required integer representing the version of the JSON schema." + "type": "integer", + "description": "A required integer representing the version of the JSON schema.", + "const": 4 }, - "cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequiredV1" }, - "vendor": { "$ref": "#/definitions/vendor" }, - "configurePresets": { "$ref": "#/definitions/configurePresetsV3" }, - "buildPresets": { "$ref": "#/definitions/buildPresetsV4" }, - "testPresets": { "$ref": "#/definitions/testPresetsV3" }, - "include": { "$ref": "#/definitions/include" } + "cmakeMinimumRequired": { + "$ref": "#/definitions/cmakeMinimumRequired@v1..v9" + }, + "include": { + "$ref": "#/definitions/include@v4.." + }, + "vendor": { + "$ref": "#/definitions/vendor@v1.." + }, + "configurePresets": { + "$ref": "#/definitions/configurePresets@v3..v6" + }, + "buildPresets": { + "$ref": "#/definitions/buildPresets@v4..v9" + }, + "testPresets": { + "$ref": "#/definitions/testPresets@v3..v4" + } }, + "required": [ + "version" + ], "additionalProperties": false }, { + "description": "The presets specify the generator and the build directory, and optionally an array of variables and other arguments to pass to CMake.", "properties": { "version": { - "const": 5, - "description": "A required integer representing the version of the JSON schema." + "type": "integer", + "description": "A required integer representing the version of the JSON schema.", + "const": 5 }, - "cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequiredV1" }, - "vendor": { "$ref": "#/definitions/vendor" }, - "configurePresets": { "$ref": "#/definitions/configurePresetsV3" }, - "buildPresets": { "$ref": "#/definitions/buildPresetsV4" }, - "testPresets": { "$ref": "#/definitions/testPresetsV5" }, - "include": { "$ref": "#/definitions/include" } + "cmakeMinimumRequired": { + "$ref": "#/definitions/cmakeMinimumRequired@v1..v9" + }, + "include": { + "$ref": "#/definitions/include@v4.." + }, + "vendor": { + "$ref": "#/definitions/vendor@v1.." + }, + "configurePresets": { + "$ref": "#/definitions/configurePresets@v3..v6" + }, + "buildPresets": { + "$ref": "#/definitions/buildPresets@v4..v9" + }, + "testPresets": { + "$ref": "#/definitions/testPresets@v5" + } }, + "required": [ + "version" + ], "additionalProperties": false }, { + "description": "The presets specify the generator and the build directory, and optionally an array of variables and other arguments to pass to CMake.", "properties": { "version": { - "const": 6, - "description": "A required integer representing the version of the JSON schema." + "type": "integer", + "description": "A required integer representing the version of the JSON schema.", + "const": 6 }, - "cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequiredV1" }, - "vendor": { "$ref": "#/definitions/vendor" }, - "configurePresets": { "$ref": "#/definitions/configurePresetsV3" }, - "buildPresets": { "$ref": "#/definitions/buildPresetsV4" }, - "testPresets": { "$ref": "#/definitions/testPresetsV6" }, - "packagePresets": { "$ref": "#/definitions/packagePresetsV6" }, - "workflowPresets": { "$ref": "#/definitions/workflowPresetsV6" }, - "include": { "$ref": "#/definitions/include" } + "cmakeMinimumRequired": { + "$ref": "#/definitions/cmakeMinimumRequired@v1..v9" + }, + "include": { + "$ref": "#/definitions/include@v4.." + }, + "vendor": { + "$ref": "#/definitions/vendor@v1.." + }, + "configurePresets": { + "$ref": "#/definitions/configurePresets@v3..v6" + }, + "buildPresets": { + "$ref": "#/definitions/buildPresets@v4..v9" + }, + "testPresets": { + "$ref": "#/definitions/testPresets@v6..v9" + }, + "packagePresets": { + "$ref": "#/definitions/packagePresets@v6..v9" + }, + "workflowPresets": { + "$ref": "#/definitions/workflowPresets@v6..v9" + } }, + "required": [ + "version" + ], "additionalProperties": false }, { + "description": "The presets specify the generator and the build directory, and optionally an array of variables and other arguments to pass to CMake.", "properties": { "version": { - "const": 7, - "description": "A required integer representing the version of the JSON schema." + "type": "integer", + "description": "A required integer representing the version of the JSON schema.", + "const": 7 }, - "cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequiredV1" }, - "vendor": { "$ref": "#/definitions/vendor" }, - "configurePresets": { "$ref": "#/definitions/configurePresetsV7" }, - "buildPresets": { "$ref": "#/definitions/buildPresetsV4" }, - "testPresets": { "$ref": "#/definitions/testPresetsV6" }, - "packagePresets": { "$ref": "#/definitions/packagePresetsV6" }, - "workflowPresets": { "$ref": "#/definitions/workflowPresetsV6" }, - "include": { "$ref": "#/definitions/include" } + "cmakeMinimumRequired": { + "$ref": "#/definitions/cmakeMinimumRequired@v1..v9" + }, + "include": { + "$ref": "#/definitions/include@v4.." + }, + "vendor": { + "$ref": "#/definitions/vendor@v1.." + }, + "configurePresets": { + "$ref": "#/definitions/configurePresets@v7..v9" + }, + "buildPresets": { + "$ref": "#/definitions/buildPresets@v4..v9" + }, + "testPresets": { + "$ref": "#/definitions/testPresets@v6..v9" + }, + "packagePresets": { + "$ref": "#/definitions/packagePresets@v6..v9" + }, + "workflowPresets": { + "$ref": "#/definitions/workflowPresets@v6..v9" + } }, + "required": [ + "version" + ], "additionalProperties": false }, { + "description": "The presets specify the generator and the build directory, and optionally an array of variables and other arguments to pass to CMake.", "properties": { - "$schema": { "$ref": "#/definitions/$schema" }, - "version": { - "const": 8, - "description": "A required integer representing the version of the JSON schema." + "$schema": { + "$ref": "#/definitions/$schema@v8.." }, - "cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequiredV1" }, - "vendor": { "$ref": "#/definitions/vendor" }, - "configurePresets": { "$ref": "#/definitions/configurePresetsV7" }, - "buildPresets": { "$ref": "#/definitions/buildPresetsV4" }, - "testPresets": { "$ref": "#/definitions/testPresetsV6" }, - "packagePresets": { "$ref": "#/definitions/packagePresetsV6" }, - "workflowPresets": { "$ref": "#/definitions/workflowPresetsV6" }, - "include": { "$ref": "#/definitions/include" } + "version": { + "type": "integer", + "description": "A required integer representing the version of the JSON schema.", + "const": 8 + }, + "cmakeMinimumRequired": { + "$ref": "#/definitions/cmakeMinimumRequired@v1..v9" + }, + "include": { + "$ref": "#/definitions/include@v4.." + }, + "vendor": { + "$ref": "#/definitions/vendor@v1.." + }, + "configurePresets": { + "$ref": "#/definitions/configurePresets@v7..v9" + }, + "buildPresets": { + "$ref": "#/definitions/buildPresets@v4..v9" + }, + "testPresets": { + "$ref": "#/definitions/testPresets@v6..v9" + }, + "packagePresets": { + "$ref": "#/definitions/packagePresets@v6..v9" + }, + "workflowPresets": { + "$ref": "#/definitions/workflowPresets@v6..v9" + } }, + "required": [ + "version" + ], "additionalProperties": false }, { + "description": "The presets specify the generator and the build directory, and optionally an array of variables and other arguments to pass to CMake.", "properties": { - "$schema": { "$ref": "#/definitions/$schema" }, - "version": { - "const": 9, - "description": "A required integer representing the version of the JSON schema." + "$schema": { + "$ref": "#/definitions/$schema@v8.." }, - "cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequiredV1" }, - "vendor": { "$ref": "#/definitions/vendor" }, - "configurePresets": { "$ref": "#/definitions/configurePresetsV7" }, - "buildPresets": { "$ref": "#/definitions/buildPresetsV4" }, - "testPresets": { "$ref": "#/definitions/testPresetsV6" }, - "packagePresets": { "$ref": "#/definitions/packagePresetsV6" }, - "workflowPresets": { "$ref": "#/definitions/workflowPresetsV6" }, - "include": { "$ref": "#/definitions/include" } + "version": { + "type": "integer", + "description": "A required integer representing the version of the JSON schema.", + "const": 9 + }, + "cmakeMinimumRequired": { + "$ref": "#/definitions/cmakeMinimumRequired@v1..v9" + }, + "include": { + "$ref": "#/definitions/include@v4.." + }, + "vendor": { + "$ref": "#/definitions/vendor@v1.." + }, + "configurePresets": { + "$ref": "#/definitions/configurePresets@v7..v9" + }, + "buildPresets": { + "$ref": "#/definitions/buildPresets@v4..v9" + }, + "testPresets": { + "$ref": "#/definitions/testPresets@v6..v9" + }, + "packagePresets": { + "$ref": "#/definitions/packagePresets@v6..v9" + }, + "workflowPresets": { + "$ref": "#/definitions/workflowPresets@v6..v9" + } }, + "required": [ + "version" + ], "additionalProperties": false }, { + "description": "The presets specify the generator and the build directory, and optionally an array of variables and other arguments to pass to CMake.", "properties": { - "$schema": { "$ref": "#/definitions/$schema" }, - "$comment": { "$ref": "#/definitions/$comment" }, - "version": { - "const": 10, - "description": "A required integer representing the version of the JSON schema." + "$schema": { + "$ref": "#/definitions/$schema@v8.." }, - "cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequiredV10" }, - "vendor": { "$ref": "#/definitions/vendor" }, - "configurePresets": { "$ref": "#/definitions/configurePresetsV10" }, - "buildPresets": { "$ref": "#/definitions/buildPresetsV10" }, - "testPresets": { "$ref": "#/definitions/testPresetsV10" }, - "packagePresets": { "$ref": "#/definitions/packagePresetsV10" }, - "workflowPresets": { "$ref": "#/definitions/workflowPresetsV10" }, - "include": { "$ref": "#/definitions/include" } + "version": { + "type": "integer", + "description": "A required integer representing the version of the JSON schema.", + "const": 10 + }, + "cmakeMinimumRequired": { + "$ref": "#/definitions/cmakeMinimumRequired@v10.." + }, + "include": { + "$ref": "#/definitions/include@v4.." + }, + "vendor": { + "$ref": "#/definitions/vendor@v1.." + }, + "configurePresets": { + "$ref": "#/definitions/configurePresets@v10.." + }, + "buildPresets": { + "$ref": "#/definitions/buildPresets@v10.." + }, + "testPresets": { + "$ref": "#/definitions/testPresets@v10" + }, + "packagePresets": { + "$ref": "#/definitions/packagePresets@v10.." + }, + "workflowPresets": { + "$ref": "#/definitions/workflowPresets@v10.." + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } }, + "required": [ + "version" + ], "additionalProperties": false }, { + "description": "The presets specify the generator and the build directory, and optionally an array of variables and other arguments to pass to CMake.", "properties": { - "$schema": { "$ref": "#/definitions/$schema" }, - "$comment": { "$ref": "#/definitions/$comment" }, - "version": { - "const": 11, - "description": "A required integer representing the version of the JSON schema." + "$schema": { + "$ref": "#/definitions/$schema@v8.." }, - "cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequiredV10" }, - "vendor": { "$ref": "#/definitions/vendor" }, - "configurePresets": { "$ref": "#/definitions/configurePresetsV10" }, - "buildPresets": { "$ref": "#/definitions/buildPresetsV10" }, - "testPresets": { "$ref": "#/definitions/testPresetsV11" }, - "packagePresets": { "$ref": "#/definitions/packagePresetsV10" }, - "workflowPresets": { "$ref": "#/definitions/workflowPresetsV10" }, - "include": { "$ref": "#/definitions/include" } + "version": { + "type": "integer", + "description": "A required integer representing the version of the JSON schema.", + "const": 11 + }, + "cmakeMinimumRequired": { + "$ref": "#/definitions/cmakeMinimumRequired@v10.." + }, + "include": { + "$ref": "#/definitions/include@v4.." + }, + "vendor": { + "$ref": "#/definitions/vendor@v1.." + }, + "configurePresets": { + "$ref": "#/definitions/configurePresets@v10.." + }, + "buildPresets": { + "$ref": "#/definitions/buildPresets@v10.." + }, + "testPresets": { + "$ref": "#/definitions/testPresets@v11" + }, + "packagePresets": { + "$ref": "#/definitions/packagePresets@v10.." + }, + "workflowPresets": { + "$ref": "#/definitions/workflowPresets@v10.." + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } }, + "required": [ + "version" + ], "additionalProperties": false }, { + "description": "The presets specify the generator and the build directory, and optionally an array of variables and other arguments to pass to CMake.", "properties": { - "$schema": { "$ref": "#/definitions/$schema" }, - "$comment": { "$ref": "#/definitions/$comment" }, - "version": { - "const": 12, - "description": "A required integer representing the version of the JSON schema." + "$schema": { + "$ref": "#/definitions/$schema@v8.." }, - "cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequiredV10" }, - "vendor": { "$ref": "#/definitions/vendor" }, - "configurePresets": { "$ref": "#/definitions/configurePresetsV10" }, - "buildPresets": { "$ref": "#/definitions/buildPresetsV11" }, - "testPresets": { "$ref": "#/definitions/testPresetsV12" }, - "packagePresets": { "$ref": "#/definitions/packagePresetsV10" }, - "workflowPresets": { "$ref": "#/definitions/workflowPresetsV10" }, - "include": { "$ref": "#/definitions/include" } + "version": { + "type": "integer", + "description": "A required integer representing the version of the JSON schema.", + "const": 12 + }, + "cmakeMinimumRequired": { + "$ref": "#/definitions/cmakeMinimumRequired@v10.." + }, + "include": { + "$ref": "#/definitions/include@v4.." + }, + "vendor": { + "$ref": "#/definitions/vendor@v1.." + }, + "configurePresets": { + "$ref": "#/definitions/configurePresets@v10.." + }, + "buildPresets": { + "$ref": "#/definitions/buildPresets@v10.." + }, + "testPresets": { + "$ref": "#/definitions/testPresets@v12" + }, + "packagePresets": { + "$ref": "#/definitions/packagePresets@v10.." + }, + "workflowPresets": { + "$ref": "#/definitions/workflowPresets@v10.." + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } }, + "required": [ + "version" + ], "additionalProperties": false } ], @@ -205,1997 +442,3428 @@ "version" ], "definitions": { - "$schema": { + "$schema@v8..": { "type": "string", - "description": "The schema against which to verify this document.", - "format": "uri-reference" + "format": "uri-reference", + "description": "An optional string that provides a URI to the JSON schema that describes the structure of this JSON document. This field is used for validation and autocompletion in editors that support JSON schema. It doesn't affect the behavior of the document itself. If this field is not specified, the JSON document will still be valid, but tools that use JSON schema for validation and autocompletion may not function correctly." }, - "$comment": { + "cmakeMinimumRequired@v1..v9": { + "type": "object", + "description": "An optional object representing the minimum version of CMake needed to build this project.", + "unevaluatedProperties": false, + "properties": { + "major": { + "$ref": "#/definitions/cmakeMinimumRequired.major@v1.." + }, + "minor": { + "$ref": "#/definitions/cmakeMinimumRequired.minor@v1.." + }, + "patch": { + "$ref": "#/definitions/cmakeMinimumRequired.patch@v1.." + } + } + }, + "cmakeMinimumRequired@v10..": { + "type": "object", + "description": "An optional object representing the minimum version of CMake needed to build this project.", + "unevaluatedProperties": false, + "properties": { + "major": { + "$ref": "#/definitions/cmakeMinimumRequired.major@v1.." + }, + "minor": { + "$ref": "#/definitions/cmakeMinimumRequired.minor@v1.." + }, + "patch": { + "$ref": "#/definitions/cmakeMinimumRequired.patch@v1.." + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + } + }, + "cmakeMinimumRequired.major@v1..": { + "type": "integer", + "description": "An optional integer representing the major version." + }, + "cmakeMinimumRequired.minor@v1..": { + "type": "integer", + "description": "An optional integer representing the minor version." + }, + "cmakeMinimumRequired.patch@v1..": { + "type": "integer", + "description": "An optional integer representing the patch version." + }, + "$comment@v10..": { + "$ref": "#/definitions/comment@v10.." + }, + "comment@v10..": { "anyOf": [ { "type": "string", - "description": "The single-line comment" + "description": "A single-line comment." }, { "type": "array", - "description": "The multi-line comment", + "description": "A multi-line comment.", "minItems": 1, "items": { "type": "string", - "description": "One line of the multi-line comment" + "description": "One line of the multi-line comment." } } ] }, - "commonPropertiesAll": { - "properties": { - "name": { - "type": "string", - "description": "A required string representing the machine-friendly name of the preset. This identifier is used in the --preset argument. There must not be two presets (configure, build, test, package, or workflow) in the union of CMakePresets.json and CMakeUserPresets.json in the same directory with the same name.", - "minLength": 1 - }, - "vendor": { - "type": "object", - "description": "An optional map containing vendor-specific information. CMake does not interpret the contents of this field except to verify that it is a map if it does exist. However, it should follow the same conventions as the root-level vendor field.", - "properties": {} - }, - "displayName": { - "type": "string", - "description": "An optional string with a human-friendly name of the preset." - }, - "description": { - "type": "string", - "description": "An optional string with a human-friendly description of the preset." - } - } - }, - "configureBuildTestPackagePresetsEnvironmentProperty": { - "properties": { - "environment": { - "type": "object", - "description": "An optional map of environment variables. The key is the variable name (which must not be an empty string). Each variable is set regardless of whether or not a value was given to it by the process's environment. This field supports macro expansion, and environment variables in this map may reference each other, and may be listed in any order, as long as such references do not cause a cycle (for example,if ENV_1 is $env{ENV_2}, ENV_2 may not be $env{ENV_1}.) Environment variables are inherited through the inherits field, and the preset's environment will be the union of its own environment and the environment from all its parents. If multiple presets in this union define the same variable, the standard rules of inherits are applied. Setting a variable to null causes it to not be set, even if a value was inherited from another preset.", - "properties": {}, - "additionalProperties": { - "anyOf": [ - { - "type": "null", - "description": "Setting a variable to null causes it to not be set, even if a value was inherited from another preset." - }, - { - "type": "string", - "description": "A string representing the value of the variable." - } - ] - }, - "propertyNames": { - "pattern": "^.+$" - } - } - } - }, - "commentAsProperty": { - "properties": { - "$comment": { "$ref": "#/definitions/$comment" } - } - }, - "cmakeMinimumRequiredObject": { - "properties": { - "major": { - "type": "integer", - "description": "An optional integer representing the major version." - }, - "minor": { - "type": "integer", - "description": "An optional integer representing the minor version." - }, - "patch": { - "type": "integer", - "description": "An optional integer representing the patch version." - } - } - }, - "cmakeMinimumRequiredV10": { - "type": "object", - "description": "An optional object representing the minimum version of CMake needed to build this project. Available in version 10 and higher.", - "allOf": [ - { "$ref": "#/definitions/cmakeMinimumRequiredObject" }, - { "$ref": "#/definitions/commentAsProperty" } - ], - "unevaluatedProperties": false - }, - "cmakeMinimumRequiredV1": { - "type": "object", - "description": "An optional object representing the minimum version of CMake needed to build this project. Available in version 1 and higher.", - "allOf": [ - { "$ref": "#/definitions/cmakeMinimumRequiredObject" } - ], - "unevaluatedProperties": false - }, - "vendor": { - "type": "object", - "description": "An optional map containing vendor-specific information. CMake does not interpret the contents of this field except to verify that it is a map if it does exist. However, the keys should be a vendor-specific domain name followed by a /-separated path. For example, the Example IDE 1.0 could use example.com/ExampleIDE/1.0. The value of each field can be anything desired by the vendor, though will typically be a map.", - "properties": {} - }, - "configurePresetsArchitectureAsStringV1": { - "type": "string", - "description": "An optional string representing the platform for generators that support it." - }, - "configurePresetsArchitectureAsObjectV1": { - "properties": { - "value": { - "type": "string", - "description": "An optional string representing the value." - }, - "strategy": { - "type": "string", - "description": "An optional string telling CMake how to handle the field. Valid values are: \"set\" Set the respective value. This will result in an error for generators that do not support the respective field. \"external\" Do not set the value, even if the generator supports it. This is useful if, for example, a preset uses the Ninja generator, and an IDE knows how to set up the Visual C++ environment from the architecture and toolset fields. In that case, CMake will ignore the field, but the IDE can use them to set up the environment before invoking CMake.", - "enum": [ - "set", - "external" - ] - } - } - }, - "configurePresetsArchitectureV10": { - "anyOf": [ - { "$ref": "#/definitions/configurePresetsArchitectureAsStringV1" }, - { - "type": "object", - "description": "An optional object representing the platform for generators that support it. Available in version 10 and higher.", - "allOf": [ - { "$ref": "#/definitions/configurePresetsArchitectureAsObjectV1" }, - { "$ref": "#/definitions/commentAsProperty" } - ], - "unevaluatedProperties": false - } - ] - }, - "configurePresetsArchitectureV1": { - "anyOf": [ - { "$ref": "#/definitions/configurePresetsArchitectureAsStringV1" }, - { - "type": "object", - "description": "An optional object representing the platform for generators that support it. Available in version 1 and higher.", - "allOf": [ - { "$ref": "#/definitions/configurePresetsArchitectureAsObjectV1" } - ], - "unevaluatedProperties": false - } - ] - }, - "configurePresetsToolsetAsStringV1": { - "type": "string", - "description": "An optional string representing the toolset for generators that support it." - }, - "configurePresetsToolsetAsObjectV1": { - "properties": { - "value": { - "type": "string", - "description": "An optional string representing the value." - }, - "strategy": { - "type": "string", - "description": "An optional string telling CMake how to handle the field. Valid values are: \"set\" Set the respective value. This will result in an error for generators that do not support the respective field. \"external\" Do not set the value, even if the generator supports it. This is useful if, for example, a preset uses the Ninja generator, and an IDE knows how to set up the Visual C++ environment from the architecture and toolset fields. In that case, CMake will ignore the field, but the IDE can use them to set up the environment before invoking CMake.", - "enum": [ - "set", - "external" - ] - } - } - }, - "configurePresetsToolsetV10": { - "anyOf": [ - { "$ref": "#/definitions/configurePresetsToolsetAsStringV1" }, - { - "type": "object", - "description": "An optional object representing the toolset for generators that support it. Available in version 10 and higher.", - "allOf": [ - { "$ref": "#/definitions/configurePresetsToolsetAsObjectV1" }, - { "$ref": "#/definitions/commentAsProperty" } - ], - "unevaluatedProperties": false - } - ] - }, - "configurePresetsToolsetV1": { - "anyOf": [ - { "$ref": "#/definitions/configurePresetsToolsetAsStringV1" }, - { - "type": "object", - "description": "An optional object representing the toolset for generators that support it. Available in version 1 and higher.", - "allOf": [ - { "$ref": "#/definitions/configurePresetsToolsetAsObjectV1" } - ], - "unevaluatedProperties": false - } - ] - }, - "configurePresetsCacheVariablesAdditionalPropertiesAsNull": { - "type": "null", - "description": "Setting a variable to null causes it to not be set, even if a value was inherited from another preset." - }, - "configurePresetsCacheVariablesAdditionalPropertiesAsBoolean": { - "type": "boolean", - "description": "A boolean representing the value of the variable. Equivalent to \"TRUE\" or \"FALSE\"." - }, - "configurePresetsCacheVariablesAdditionalPropertiesAsString": { - "type": "string", - "description": "A string representing the value of the variable (which supports macro expansion)." - }, - "configurePresetsCacheVariablesAdditionalPropertiesAsObject": { - "properties": { - "type": { - "type": "string", - "description": "An optional string representing the type of the variable. It should be BOOL, FILEPATH, PATH, STRING, or INTERNAL.", - "enum": [ - "BOOL", "FILEPATH", "PATH", "STRING", "INTERNAL" - ] - }, - "value": { - "anyOf": [ - { "$ref": "#/definitions/configurePresetsCacheVariablesAdditionalPropertiesAsBoolean" }, - { "$ref": "#/definitions/configurePresetsCacheVariablesAdditionalPropertiesAsString" } - ] - } - }, - "required": [ - "value" - ] - }, - "configurePresetsCacheVariablesAdditionalPropertiesV10": { - "anyOf": [ - { "$ref": "#/definitions/configurePresetsCacheVariablesAdditionalPropertiesAsNull" }, - { "$ref": "#/definitions/configurePresetsCacheVariablesAdditionalPropertiesAsBoolean" }, - { "$ref": "#/definitions/configurePresetsCacheVariablesAdditionalPropertiesAsString" }, - { - "type": "object", - "description": "An optional object representing the cache variables for generators that support it. Available in version 10 and higher.", - "allOf": [ - { "$ref": "#/definitions/configurePresetsCacheVariablesAdditionalPropertiesAsObject" }, - { "$ref": "#/definitions/commentAsProperty" } - ], - "unevaluatedProperties": false - } - ] - }, - "configurePresetsCacheVariablesAdditionalPropertiesV1": { - "anyOf": [ - { "$ref": "#/definitions/configurePresetsCacheVariablesAdditionalPropertiesAsNull" }, - { "$ref": "#/definitions/configurePresetsCacheVariablesAdditionalPropertiesAsBoolean" }, - { "$ref": "#/definitions/configurePresetsCacheVariablesAdditionalPropertiesAsString" }, - { - "type": "object", - "description": "An optional object representing the cache variables for generators that support it. Available in version 1 and higher.", - "allOf": [ - { "$ref": "#/definitions/configurePresetsCacheVariablesAdditionalPropertiesAsObject" } - ], - "unevaluatedProperties": false - } - ] - }, - "configurePresetsTraceV10": { - "type": "object", - "description": "An optional object specifying trace options.", - "allOf": [ - { "$ref": "#/definitions/configurePresetsTraceObject" }, - { "$ref": "#/definitions/commentAsProperty" } - ], - "unevaluatedProperties": false - }, - "configurePresetsTraceV7": { - "type": "object", - "description": "An optional object specifying trace options.", - "allOf": [ - { "$ref": "#/definitions/configurePresetsTraceObject" } - ], - "unevaluatedProperties": false - }, - "configurePresetsTraceObject": { - "properties": { - "mode": { - "type": "string", - "description": "An optional string that specifies the trace mode.", - "enum": [ - "on", "off", "expand" - ] - }, - "format": { - "type": "string", - "description": "An optional string that specifies the trace output format.", - "enum": [ - "human", "json-v1" - ] - }, - "source": { - "anyOf": [ - { - "type": "string", - "description": "An optional string representing the path to one source file to be traced.", - "minLength": 1 - }, - { - "type": "array", - "description": "An optional array of strings representing the paths to source files to be traced.", - "items": { - "type": "string", - "description": "A string representing the path to one source file to be traced.", - "minLength": 1 - } - } - ] - }, - "redirect": { - "type": "string", - "description": "An optional string specifying a path to a trace output file." - } - } - }, - "configurePresetsDebugV10": { - "type": "object", - "description": "An optional object specifying debug options.", - "allOf": [ - { "$ref": "#/definitions/configurePresetsDebugObject" }, - { "$ref": "#/definitions/commentAsProperty" } - ], - "unevaluatedProperties": false - }, - "configurePresetsDebugV1": { - "type": "object", - "description": "An optional object specifying debug options.", - "allOf": [ - { "$ref": "#/definitions/configurePresetsDebugObject" } - ], - "unevaluatedProperties": false - }, - "configurePresetsErrorsV10": { - "type": "object", - "description": "An optional object specifying errors.", - "allOf": [ - { "$ref": "#/definitions/configurePresetsErrorsObject" }, - { "$ref": "#/definitions/commentAsProperty" } - ], - "unevaluatedProperties": false - }, - "configurePresetsErrorsV1": { - "type": "object", - "description": "An optional object specifying errors.", - "allOf": [ - { "$ref": "#/definitions/configurePresetsErrorsObject" } - ], - "unevaluatedProperties": false - }, - "configurePresetsWarningsV10": { - "type": "object", - "description": "An optional object specifying warnings.", - "allOf": [ - { "$ref": "#/definitions/configurePresetsWarningsObject" }, - { "$ref": "#/definitions/commentAsProperty" } - ], - "unevaluatedProperties": false - }, - "configurePresetsWarningsV1": { - "type": "object", - "description": "An optional object specifying warnings.", - "allOf": [ - { "$ref": "#/definitions/configurePresetsWarningsObject" } - ], - "unevaluatedProperties": false - }, - "configurePresetsDebugObject": { - "properties": { - "output": { - "type": "boolean", - "description": "An optional boolean. Setting this to true is equivalent to passing --debug-output on the command line." - }, - "tryCompile": { - "type": "boolean", - "description": "An optional boolean. Setting this to true is equivalent to passing --debug-trycompile on the command line." - }, - "find": { - "type": "boolean", - "description": "An optional boolean. Setting this to true is equivalent to passing --debug-find on the command line." - } - } - }, - "configurePresetsErrorsObject": { - "properties": { - "dev": { - "type": "boolean", - "description": "An optional boolean. Equivalent to passing -Werror=dev or -Wno-error=dev on the command line. This may not be set to true if warnings.dev is set to false." - }, - "deprecated": { - "type": "boolean", - "description": "An optional boolean. Equivalent to passing -Werror=deprecated or -Wno-error=deprecated on the command line. This may not be set to true if warnings.deprecated is set to false." - } - } - }, - "configurePresetsWarningsObject": { - "properties": { - "dev": { - "type": "boolean", - "description": "An optional boolean. Equivalent to passing -Wdev or -Wno-dev on the command line. This may not be set to false if errors.dev is set to true." - }, - "deprecated": { - "type": "boolean", - "description": "An optional boolean. Equivalent to passing -Wdeprecated or -Wno-deprecated on the command line. This may not be set to false if errors.deprecated is set to true." - }, - "uninitialized": { - "type": "boolean", - "description": "An optional boolean. Setting this to true is equivalent to passing --warn-uninitialized on the command line." - }, - "unusedCli": { - "type": "boolean", - "description": "An optional boolean. Setting this to false is equivalent to passing --no-warn-unused-cli on the command line." - }, - "systemVars": { - "type": "boolean", - "description": "An optional boolean. Setting this to true is equivalent to passing --check-system-vars on the command line." - } - } - }, - "configurePresetsItemsV10": { - "properties": { - "graphviz": { - "type": "string", - "description": "An optional string specifying the path to graphviz dot file. Available in version 10 and higher." - } - } - }, - "configurePresetsItemsV3": { - "properties": { - "toolchainFile": { - "type": "string", - "description": "An optional string representing the path to the toolchain file. This field supports macro expansion. If a relative path is specified, it is calculated relative to the build directory, and if not found, relative to the source directory." - }, - "installDir": { - "type": "string", - "description": "An optional string representing the path to the installation directory, which will be used as the CMAKE_INSTALL_PREFIX variable. This field supports macro expansion. If a relative path is specified, it is calculated relative to the source directory." - } - } - }, - "configurePresetsItemsV1": { - "allOf": [ - { "$ref": "#/definitions/commonPropertiesAll" }, - { "$ref": "#/definitions/configureBuildTestPackagePresetsEnvironmentProperty" }, - { - "properties": { - "hidden": { - "type": "boolean", - "description": "An optional boolean specifying whether or not a preset should be hidden. If a preset is hidden, it cannot be used in the --preset= argument, will not show up in the CMake GUI, and does not have to have a valid generator or binaryDir, even from inheritance. Hidden presets are intended to be used as a base for other presets to inherit via the inherits field." - }, - "inherits": { - "anyOf": [ - { - "type": "string", - "description": "An optional string representing the name of the preset to inherit from.", - "minLength": 1 - }, - { - "type": "array", - "description": "An optional array of strings representing the names of presets to inherit from. The preset will inherit all of the fields from the inherits presets by default (except name, hidden, inherits, description, and displayName), but can override them as desired. If multiple inherits presets provide conflicting values for the same field, the earlier preset in the inherits list will be preferred. Presets in CMakePresets.json must not inherit from presets in CMakeUserPresets.json.", - "items": { - "type": "string", - "description": "An optional string representing the name of the preset to inherit from.", - "minLength": 1 - } - } - ] - }, - "cmakeExecutable": { - "type": "string", - "description": "An optional string representing the path to the CMake executable to use for this preset. This is reserved for use by IDEs, and is not used by CMake itself. IDEs that use this field should expand any macros in it." - } - } - } - ], - "required": [ - "name" - ] - }, - "configurePresetsAdditionalPropertiesV10": { - "properties": { - "toolset": { "$ref": "#/definitions/configurePresetsToolsetV10" }, - "architecture": { "$ref": "#/definitions/configurePresetsArchitectureV10" }, - "cacheVariables": { - "type": "object", - "description": "An optional map of cache variables. The key is the variable name (which must not be an empty string). Cache variables are inherited through the inherits field, and the preset's variables will be the union of its own cacheVariables and the cacheVariables from all its parents. If multiple presets in this union define the same variable, the standard rules of inherits are applied.", - "properties": {}, - "propertyNames": { - "pattern": "^.+$" - }, - "additionalProperties": { "$ref": "#/definitions/configurePresetsCacheVariablesAdditionalPropertiesV10" } - }, - "binaryDir": { - "type": "string", - "description": "An optional string representing the path to the output binary directory. This field supports macro expansion. If a relative path is specified, it is calculated relative to the source directory. If binaryDir is not specified, the path is calculated using regular methods." - }, - "generator": { - "type": "string", - "description": "An optional string representing the generator to use for the preset. If generator is not specified, the normal generator discovery procedure is used. Note that for Visual Studio generators, unlike in the command line -G argument, you cannot include the platform name in the generator name. Use the architecture field instead." - }, - "condition": { "$ref": "#/definitions/topConditionV10" }, - "warnings": { "$ref": "#/definitions/configurePresetsWarningsV10" }, - "errors": { "$ref": "#/definitions/configurePresetsErrorsV10" }, - "debug": { "$ref": "#/definitions/configurePresetsDebugV10" }, - "trace": { "$ref": "#/definitions/configurePresetsTraceV10" } - } - }, - "configurePresetsAdditionalPropertiesV7": { - "allOf": [ - { "$ref": "#/definitions/configurePresetsAdditionalPropertiesV3" }, - { - "properties": { - "trace": { "$ref": "#/definitions/configurePresetsTraceV7" } - } - } - ] - }, - "configurePresetsAdditionalPropertiesV3": { - "allOf": [ - { "$ref": "#/definitions/configurePresetsAdditionalPropertiesV1" }, - { - "properties": { - "condition": { "$ref": "#/definitions/topConditionV3" }, - "binaryDir": { - "type": "string", - "description": "An optional string representing the path to the output binary directory. This field supports macro expansion. If a relative path is specified, it is calculated relative to the source directory. If binaryDir is not specified, the path is calculated using regular methods." - }, - "generator": { - "type": "string", - "description": "An optional string representing the generator to use for the preset. If generator is not specified, the normal generator discovery procedure is used. Note that for Visual Studio generators, unlike in the command line -G argument, you cannot include the platform name in the generator name. Use the architecture field instead." - } - } - } - ] - }, - "configurePresetsAdditionalPropertiesV1": { - "properties": { - "toolset": { "$ref": "#/definitions/configurePresetsToolsetV1" }, - "architecture": { "$ref": "#/definitions/configurePresetsArchitectureV1" }, - "cacheVariables": { - "type": "object", - "description": "An optional map of cache variables. The key is the variable name (which must not be an empty string). Cache variables are inherited through the inherits field, and the preset's variables will be the union of its own cacheVariables and the cacheVariables from all its parents. If multiple presets in this union define the same variable, the standard rules of inherits are applied.", - "properties": {}, - "propertyNames": { - "pattern": "^.+$" - }, - "additionalProperties": { "$ref": "#/definitions/configurePresetsCacheVariablesAdditionalPropertiesV1" } - }, - "binaryDir": { - "type": "string", - "description": "An optional string representing the path to the output binary directory. This field supports macro expansion. If a relative path is specified, it is calculated relative to the source directory. If binaryDir is not specified, it must be inherited from the inherits preset (unless this preset is hidden)." - }, - "generator": { - "type": "string", - "description": "An optional string representing the generator to use for the preset. If generator is not specified, it must be inherited from the inherits preset (unless this preset is hidden). Note that for Visual Studio generators, unlike in the command line -G argument, you cannot include the platform name in the generator name. Use the architecture field instead." - }, - "warnings": { "$ref": "#/definitions/configurePresetsWarningsV1" }, - "errors": { "$ref": "#/definitions/configurePresetsErrorsV1" }, - "debug": { "$ref": "#/definitions/configurePresetsDebugV1" } - } - }, - "configurePresetsV10": { - "type": "array", - "description": "An optional array of configure preset objects. Available in version 10 and higher.", - "items": { - "type": "object", - "description": "A configure preset object.", - "allOf": [ - { "$ref": "#/definitions/configurePresetsItemsV10" }, - { "$ref": "#/definitions/configurePresetsItemsV3" }, - { "$ref": "#/definitions/configurePresetsItemsV1" }, - { "$ref": "#/definitions/configurePresetsAdditionalPropertiesV10" }, - { "$ref": "#/definitions/commentAsProperty" } - ], - "unevaluatedProperties": false - } - }, - "configurePresetsV7": { - "type": "array", - "description": "An optional array of configure preset objects. Available in version 7 and higher.", - "items": { - "type": "object", - "description": "A configure preset object.", - "allOf": [ - { "$ref": "#/definitions/configurePresetsItemsV3" }, - { "$ref": "#/definitions/configurePresetsItemsV1" }, - { "$ref": "#/definitions/configurePresetsAdditionalPropertiesV7" } - ], - "unevaluatedProperties": false - } - }, - "configurePresetsV3": { - "type": "array", - "description": "An optional array of configure preset objects. Available in version 3 and higher.", - "items": { - "type": "object", - "description": "A configure preset object.", - "allOf": [ - { "$ref": "#/definitions/configurePresetsItemsV3" }, - { "$ref": "#/definitions/configurePresetsItemsV1" }, - { "$ref": "#/definitions/configurePresetsAdditionalPropertiesV3" } - ], - "unevaluatedProperties": false - } - }, - "configurePresetsV1": { - "type": "array", - "description": "An optional array of configure preset objects. Available in version 1 and higher.", - "items": { - "type": "object", - "description": "A configure preset object.", - "allOf": [ - { "$ref": "#/definitions/configurePresetsItemsV1" }, - { "$ref": "#/definitions/configurePresetsAdditionalPropertiesV1" } - ], - "unevaluatedProperties": false - } - }, - "buildPresetsItemsV4": { - "properties": { - "resolvePackageReferences": { - "type": "string", - "description": "An optional string specifying the package resolve behavior. Valid values are \"on\" (packages are resolved prior to the build), \"off\" (packages are not resolved prior to the build), and \"only\" (packages are resolved, but no build will be performed).", - "enum": [ - "on", "off", "only" - ] - } - } - }, - "buildPresetsItemsV2": { - "allOf": [ - { "$ref": "#/definitions/commonPropertiesAll" }, - { "$ref": "#/definitions/configureBuildTestPackagePresetsEnvironmentProperty" }, - { - "properties": { - "hidden": { - "type": "boolean", - "description": "An optional boolean specifying whether or not a preset should be hidden. If a preset is hidden, it cannot be used in the --preset argument and does not have to have a valid configurePreset, even from inheritance. Hidden presets are intended to be used as a base for other presets to inherit via the inherits field." - }, - "inherits": { - "anyOf": [ - { - "type": "string", - "description": "An optional string representing the name of the build preset to inherit from.", - "minLength": 1 - }, - { - "type": "array", - "description": "An optional array of strings representing the names of build presets to inherit from. The preset will inherit all of the fields from the inherits presets by default (except name, hidden, inherits, description, and displayName), but can override them as desired. If multiple inherits presets provide conflicting values for the same field, the earlier preset in the inherits list will be preferred. Presets in CMakePresets.json must not inherit from presets in CMakeUserPresets.json.", - "items": { - "type": "string", - "description": "An optional string representing the name of the preset to inherit from.", - "minLength": 1 - } - } - ] - }, - "configurePreset": { - "type": "string", - "description": "An optional string specifying the name of a configure preset to associate with this build preset. If configurePreset is not specified, it must be inherited from the inherits preset (unless this preset is hidden). The build tree directory is inferred from the configure preset.", - "minLength": 1 - }, - "inheritConfigureEnvironment": { - "type": "boolean", - "description": "An optional boolean that defaults to true. If true, the environment variables from the associated configure preset are inherited after all inherited build preset environments, but before environment variables explicitly specified in this build preset." - }, - "jobs": { - "type": "integer", - "description": "An optional non-negative integer. Equivalent to passing --parallel or -j on the command line.", - "minimum": 0 - }, - "targets": { - "anyOf": [ - { - "type": "string", - "description": "An optional string. Equivalent to passing --target or -t on the command line. Vendors may ignore the targets property or hide build presets that explicitly specify targets." - }, - { - "type": "array", - "description": "An optional array of strings. Equivalent to passing --target or -t on the command line. Vendors may ignore the targets property or hide build presets that explicitly specify targets.", - "items": { - "type": "string", - "description": "An optional string. Equivalent to passing --target or -t on the command line. Vendors may ignore the targets property or hide build presets that explicitly specify targets." - } - } - ] - }, - "configuration": { - "type": "string", - "description": "An optional string. Equivalent to passing --config on the command line." - }, - "cleanFirst": { - "type": "boolean", - "description": "An optional boolean. If true, equivalent to passing --clean-first on the command line." - }, - "verbose": { - "type": "boolean", - "description": "An optional boolean. If true, equivalent to passing --verbose on the command line." - }, - "nativeToolOptions": { - "type": "array", - "description": "An optional array of strings. Equivalent to passing options after -- on the command line.", - "items": { - "type": "string", - "description": "An optional string representing an option to pass after -- on the command line." - } - } - } - } - ], - "required": [ - "name" - ] - }, - "buildPresetsAdditionalPropertiesV10": { - "properties": { - "condition": { "$ref": "#/definitions/topConditionV10" } - } - }, - "buildPresetsAdditionalPropertiesV3": { - "properties": { - "condition": { "$ref": "#/definitions/topConditionV3" } - } - }, - "buildPresetsV10": { - "type": "array", - "description": "An optional array of build preset objects. Used to specify arguments to cmake --build. Available in version 10 and higher.", - "items": { - "type": "object", - "description": "A build preset object.", - "allOf": [ - { "$ref": "#/definitions/buildPresetsItemsV4" }, - { "$ref": "#/definitions/buildPresetsItemsV2" }, - { "$ref": "#/definitions/buildPresetsAdditionalPropertiesV10" }, - { "$ref": "#/definitions/commentAsProperty" } - ], - "unevaluatedProperties": false - } - }, - "buildPresetsV4": { - "type": "array", - "description": "An optional array of build preset objects. Used to specify arguments to cmake --build. Available in version 4 and higher.", - "items": { - "type": "object", - "description": "A build preset object.", - "allOf": [ - { "$ref": "#/definitions/buildPresetsItemsV4" }, - { "$ref": "#/definitions/buildPresetsItemsV2" }, - { "$ref": "#/definitions/buildPresetsAdditionalPropertiesV3" } - ], - "unevaluatedProperties": false - } - }, - "buildPresetsV3": { - "type": "array", - "description": "An optional array of build preset objects. Used to specify arguments to cmake --build. Available in version 3 and higher.", - "items": { - "type": "object", - "description": "A build preset object.", - "allOf": [ - { "$ref": "#/definitions/buildPresetsItemsV2" }, - { "$ref": "#/definitions/buildPresetsAdditionalPropertiesV3" } - ], - "unevaluatedProperties": false - } - }, - "buildPresetsV2": { - "type": "array", - "description": "An optional array of build preset objects. Used to specify arguments to cmake --build. Available in version 2 and higher.", - "items": { - "type": "object", - "description": "A build preset object.", - "allOf": [ - { "$ref": "#/definitions/buildPresetsItemsV2" } - ], - "unevaluatedProperties": false - } - }, - "testPresetsExecutionJobsV11": { - "oneOf": [ - { - "type": "integer", - "description": "An optional non-negative integer. Equivalent to passing --parallel or -j on the command line.", - "minimum": 0 - }, - { - "type": "string", - "description": "An optional string. Equivalent to passing --parallel or -j on the command line with the number of jobs omitted.", - "minLength": 0, - "maxLength": 0 - } - ] - }, - "testPresetsExecutionJobsV2": { - "type": "integer", - "description": "An optional non-negative integer. Equivalent to passing --parallel or -j on the command line.", - "minimum": 0 - }, - "testPresetsExecutionRepeatV10": { - "type": "object", - "description": "An optional object specifying how to repeat tests. Equivalent to passing --repeat on the command line.", - "allOf": [ - { "$ref": "#/definitions/testPresetsExecutionRepeatObject" }, - { "$ref": "#/definitions/commentAsProperty" } - ], - "unevaluatedProperties": false - }, - "testPresetsExecutionRepeatV2": { - "type": "object", - "description": "An optional object specifying how to repeat tests. Equivalent to passing --repeat on the command line.", - "allOf": [ - { "$ref": "#/definitions/testPresetsExecutionRepeatObject" } - ], - "unevaluatedProperties": false - }, - "testPresetsExecutionRepeatObject": { - "properties": { - "mode": { - "type": "string", - "description": "A required string. Must be one of the following values: \"until-fail\", \"until-pass\", or \"after-timeout\".", - "enum": [ - "until-fail", "until-pass", "after-timeout" - ] - }, - "count": { - "type": "integer", - "description": "A required integer." - } - }, - "required": [ - "mode", "count" - ] - }, - "testPresetsFilterIncludeIndexAsStringV2": { - "type": "string", - "description": "An optional string specifying a file with the command line syntax for --tests-information. Available in version 2 and higher." - }, - "testPresetsFilterIncludeIndexAsObjectV10": { - "type": "object", - "description": "An optional object specifying tests to include by test index. Available in version 10 and higher.", - "properties": { - "$comment": { "$ref": "#/definitions/$comment" } - } - }, - "testPresetsFilterIncludeIndexAsObjectV2": { - "type": "object", - "description": "An optional object specifying tests to include by test index. Available in version 2 and higher.", - "properties": { - "start": { - "type": "integer", - "description": "An optional integer specifying a test index to start testing at." - }, - "end": { - "type": "integer", - "description": "An optional integer specifying a test index to stop testing at." - }, - "stride": { - "type": "integer", - "description": "An optional integer specifying the increment." - }, - "specificTests": { - "type": "array", - "description": "An optional array of integers specifying specific test indices to run.", - "items": { - "type": "integer", - "description": "An integer specifying the test to run by index." - } - } - } - }, - "testPresetsFilterIncludeIndexV10": { - "anyOf": [ - { "$ref": "#/definitions/testPresetsFilterIncludeIndexAsStringV2" }, - { - "type": "object", - "description": "An optional object specifying test preset filters. Available in version 10 and higher.", - "allOf": [ - { "$ref": "#/definitions/testPresetsFilterIncludeIndexAsObjectV2" }, - { "$ref": "#/definitions/commentAsProperty" } - ], - "unevaluatedProperties": false - } - ] - }, - "testPresetsFilterIncludeIndexV2": { - "anyOf": [ - { "$ref": "#/definitions/testPresetsFilterIncludeIndexAsStringV2" }, - { - "type": "object", - "description": "An optional object specifying test preset filters. Available in version 2 and higher.", - "allOf": [ - { "$ref": "#/definitions/testPresetsFilterIncludeIndexAsObjectV2" } - ], - "unevaluatedProperties": false - } - ] - }, - "testPresetsFilterIncludeV10": { - "type": "object", - "description": "An optional object specifying which tests to include.", - "allOf": [ - { "$ref": "#/definitions/testPresetsFilterIncludeObject" }, - { "$ref": "#/definitions/commentAsProperty" }, - { - "properties": { - "index": { "$ref": "#/definitions/testPresetsFilterIncludeIndexV10" } - } - } - ] - }, - "testPresetsFilterIncludeV2": { - "type": "object", - "description": "An optional object specifying which tests to include.", - "allOf": [ - { "$ref": "#/definitions/testPresetsFilterIncludeObject" }, - { - "properties": { - "index": { "$ref": "#/definitions/testPresetsFilterIncludeIndexV2" } - } - } - ] - }, - "testPresetsFilterIncludeObject": { - "properties": { - "name": { - "type": "string", - "description": "An optional string specifying a regex for test names. Equivalent to passing --tests-regex on the command line." - }, - "label": { - "type": "string", - "description": "An optional string specifying a regex for test labels. Equivalent to passing --label-regex on the command line." - }, - "useUnion": { - "type": "boolean", - "description": "An optional boolean. Equivalent to passing --union on the command line." - } - } - }, - "testPresetsFilterExcludeV10": { - "type": "object", - "description": "An optional object specifying which tests to exclude.", - "allOf": [ - { "$ref": "#/definitions/testPresetsFilterExcludeObject" }, - { "$ref": "#/definitions/commentAsProperty" }, - { - "properties": { - "fixtures": { - "allOf": [ - { "$ref": "#/definitions/testPresetsFilterExcludeFixturesV2" }, - { "$ref": "#/definitions/commentAsProperty" } - ] - } - } - } - ] - }, - "testPresetsFilterExcludeV2": { - "type": "object", - "description": "An optional object specifying which tests to exclude.", - "allOf": [ - { "$ref": "#/definitions/testPresetsFilterExcludeObject" }, - { - "properties": { - "fixtures": { "$ref": "#/definitions/testPresetsFilterExcludeFixturesV2" } - } - } - ] - }, - "testPresetsFilterExcludeFixturesV2": { - "type": "object", - "description": "An optional object specifying which fixtures to exclude from adding tests.", - "properties": { - "any": { - "type": "string", - "description": "An optional string specifying a regex for text fixtures to exclude from adding any tests. Equivalent to --fixture-exclude-any on the command line." - }, - "setup": { - "type": "string", - "description": "An optional string specifying a regex for text fixtures to exclude from adding setup tests. Equivalent to --fixture-exclude-setup on the command line." - }, - "cleanup": { - "type": "string", - "description": "An optional string specifying a regex for text fixtures to exclude from adding cleanup tests. Equivalent to --fixture-exclude-cleanup on the command line." - } - } - }, - "testPresetsFilterExcludeObject": { - "properties": { - "name": { - "type": "string", - "description": "An optional string specifying a regex for test names. Equivalent to passing --exclude-regex on the command line." - }, - "label": { - "type": "string", - "description": "An optional string specifying a regex for test labels. Equivalent to passing --label-exclude on the command line." - } - } - }, - "testPresetsExecutionV12": { - "type": "object", - "description": "An optional object specifying options for test execution.", - "allOf": [ - { "$ref": "#/definitions/testPresetsExecutionObject" }, - { "$ref": "#/definitions/commentAsProperty" }, - { - "properties": { - "repeat": { "$ref": "#/definitions/testPresetsExecutionRepeatV10" }, - "jobs": { "$ref": "#/definitions/testPresetsExecutionJobsV11" }, - "testPassthroughArguments": { - "type": "array", - "description": "An optional array of strings. Each element is forwarded as an argument to every test executable. Equivalent to passing arguments after -- on the ctest command line.", - "items": { - "type": "string" - } - } - } - } - ], - "unevaluatedProperties": false - }, - "testPresetsExecutionV11": { - "type": "object", - "description": "An optional object specifying options for test execution.", - "allOf": [ - { "$ref": "#/definitions/testPresetsExecutionObject" }, - { "$ref": "#/definitions/commentAsProperty" }, - { - "properties": { - "repeat": { "$ref": "#/definitions/testPresetsExecutionRepeatV10" }, - "jobs": { "$ref": "#/definitions/testPresetsExecutionJobsV11" } - } - } - ], - "unevaluatedProperties": false - }, - "testPresetsExecutionV10": { - "type": "object", - "description": "An optional object specifying options for test execution.", - "allOf": [ - { "$ref": "#/definitions/testPresetsExecutionObject" }, - { "$ref": "#/definitions/commentAsProperty" }, - { - "properties": { - "repeat": { "$ref": "#/definitions/testPresetsExecutionRepeatV10" }, - "jobs": { "$ref": "#/definitions/testPresetsExecutionJobsV2" } - } - } - ], - "unevaluatedProperties": false - }, - "testPresetsExecutionV2": { - "type": "object", - "description": "An optional object specifying options for test execution.", - "allOf": [ - { "$ref": "#/definitions/testPresetsExecutionObject" }, - { - "properties": { - "repeat": { "$ref": "#/definitions/testPresetsExecutionRepeatV2" }, - "jobs": { "$ref": "#/definitions/testPresetsExecutionJobsV2" } - } - } - ], - "unevaluatedProperties": false - }, - "testPresetsExecutionObject": { - "properties": { - "stopOnFailure": { - "type": "boolean", - "description": "An optional boolean. If true, equivalent to passing --stop-on-failure on the command line." - }, - "enableFailover": { - "type": "boolean", - "description": "An optional boolean. If true, equivalent to passing -F on the command line." - }, - "resourceSpecFile": { - "type": "string", - "description": "An optional string. Equivalent to passing --resource-spec-file on the command line." - }, - "testLoad": { - "type": "integer", - "description": "An optional integer. Equivalent to passing --test-load on the command line." - }, - "showOnly": { - "type": "string", - "description": "An optional string. Equivalent to passing --show-only on the command line. Value must be \"human\" or \"json-v1\".", - "enum": [ - "human", "json-v1" - ] - }, - "interactiveDebugging": { - "type": "boolean", - "description": "An optional boolean. If true, equivalent to passing --interactive-debug-mode 1 on the command line. If false, equivalent to passing --interactive-debug-mode 0 on the command line." - }, - "scheduleRandom": { - "type": "boolean", - "description": "An optional boolean. If true, equivalent to passing --schedule-random on the command line." - }, - "timeout": { - "type": "integer", - "description": "An optional integer. Equivalent to passing --timeout on the command line." - }, - "noTestsAction": { - "type": "string", - "description": "An optional string specifying the behavior if no tests are found. Must be one of the following values: \"default\" (equivalent to not passing any value on the command line), \"error\" (equivalent to passing --no-tests=error on the command line), or \"ignore\" (equivalent to passing --no-tests-ignore on the command line).", - "enum": [ - "default", "error", "ignore" - ] - } - } - }, - "testPresetsOutputJUnitFile": { - "type": "string", - "description": "An optional string specifying a path to a JUnit file. Equivalent to passing --output-junit on the command line." - }, - "testPresetsTestOutputTruncation": { - "type": "string", - "description": "An optional string specifying the test output truncation mode. Equivalent to passing --test-output-truncation on the command line. Must be one of the following values: \"tail\", \"middle\", or \"head\".", - "enum": [ - "tail", "middle", "head" - ] - }, - "testPresetsOutputV10": { - "type": "object", - "description": "An optional object specifying output options.", - "allOf": [ - { "$ref": "#/definitions/testPresetsOutputObject" }, - { - "properties": { - "outputJUnitFile": { "$ref": "#/definitions/testPresetsOutputJUnitFile" }, - "testOutputTruncation": { "$ref": "#/definitions/testPresetsTestOutputTruncation" }, - "$comment": { "$ref": "#/definitions/$comment" } - } - } - ], - "unevaluatedProperties": false - }, - "testPresetsOutputV6": { - "type": "object", - "description": "An optional object specifying output options.", - "allOf": [ - { "$ref": "#/definitions/testPresetsOutputObject" }, - { - "properties": { - "outputJUnitFile": { "$ref": "#/definitions/testPresetsOutputJUnitFile" }, - "testOutputTruncation": { "$ref": "#/definitions/testPresetsTestOutputTruncation" } - } - } - ], - "unevaluatedProperties": false - }, - "testPresetsOutputV5": { - "type": "object", - "description": "An optional object specifying output options.", - "allOf": [ - { "$ref": "#/definitions/testPresetsOutputObject" }, - { - "properties": { - "testOutputTruncation": { "$ref": "#/definitions/testPresetsTestOutputTruncation" } - } - } - ], - "unevaluatedProperties": false - }, - "testPresetsOutputV2": { - "type": "object", - "description": "An optional object specifying output options.", - "allOf": [ - { "$ref": "#/definitions/testPresetsOutputObject" } - ], - "unevaluatedProperties": false - }, - "testPresetsOutputObject": { - "properties": { - "shortProgress": { - "type": "boolean", - "description": "An optional boolean. If true, equivalent to passing --progress on the command line." - }, - "verbosity": { - "type": "string", - "description": "An optional string specifying verbosity level. Valid values are \"default\" (equivalent to passing no verbosity flags on the command line), \"verbose\" (equivalent to passing --verbose on the command line), and \"extra\" (equivalent to passing --extra-verbose on the command line).", - "enum": [ - "default", "verbose", "extra" - ] - }, - "debug": { - "type": "boolean", - "description": "An optional boolean. If true, equivalent to passing --debug on the command line." - }, - "outputOnFailure": { - "type": "boolean", - "description": "An optional boolean. If true, equivalent to passing --output-on-failure on the command line." - }, - "quiet": { - "type": "boolean", - "description": "An optional boolean. If true, equivalent to passing --quiet on the command line." - }, - "outputLogFile": { - "type": "string", - "description": "An optional string specifying a path to a log file. Equivalent to passing --output-log on the command line." - }, - "labelSummary": { - "type": "boolean", - "description": "An optional boolean. If false, equivalent to passing --no-label-summary on the command line." - }, - "subprojectSummary": { - "type": "boolean", - "description": "An optional boolean. If false, equivalent to passing --no-subproject-summary on the command line." - }, - "maxPassedTestOutputSize": { - "type": "integer", - "description": "An optional integer specifying the maximum output for passed tests in bytes. Equivalent to passing --test-output-size-passed on the command line." - }, - "maxFailedTestOutputSize": { - "type": "integer", - "description": "An optional integer specifying the maximum output for failed tests in bytes. Equivalent to passing --test-output-size-failed on the command line." - }, - "maxTestNameWidth": { - "type": "integer", - "description": "An optional integer specifying the maximum width of a test name to output. Equivalent to passing --max-width on the command line." - } - } - }, - "testPresetsAdditionalPropertiesV12": { - "properties": { - "execution": { "$ref": "#/definitions/testPresetsExecutionV12" }, - "filter": { - "type": "object", - "description": "An optional object specifying how to filter the tests to run.", - "properties": { - "include": { "$ref": "#/definitions/testPresetsFilterIncludeV10" }, - "exclude": { "$ref": "#/definitions/testPresetsFilterExcludeV10" }, - "$comment": { "$ref": "#/definitions/$comment" } - } - }, - "output": { "$ref": "#/definitions/testPresetsOutputV6" }, - "condition": { "$ref": "#/definitions/topConditionV10" } - } - }, - "testPresetsAdditionalPropertiesV11": { - "properties": { - "execution": { "$ref": "#/definitions/testPresetsExecutionV11" }, - "filter": { - "type": "object", - "description": "An optional object specifying how to filter the tests to run.", - "properties": { - "include": { "$ref": "#/definitions/testPresetsFilterIncludeV10" }, - "exclude": { "$ref": "#/definitions/testPresetsFilterExcludeV10" }, - "$comment": { "$ref": "#/definitions/$comment" } - } - }, - "output": { "$ref": "#/definitions/testPresetsOutputV6" }, - "condition": { "$ref": "#/definitions/topConditionV10" } - } - }, - "testPresetsAdditionalPropertiesV10": { - "properties": { - "execution": { "$ref": "#/definitions/testPresetsExecutionV10" }, - "filter": { - "type": "object", - "description": "An optional object specifying how to filter the tests to run.", - "properties": { - "include": { "$ref": "#/definitions/testPresetsFilterIncludeV10" }, - "exclude": { "$ref": "#/definitions/testPresetsFilterExcludeV10" }, - "$comment": { "$ref": "#/definitions/$comment" } - } - }, - "output": { "$ref": "#/definitions/testPresetsOutputV6" }, - "condition": { "$ref": "#/definitions/topConditionV10" } - } - }, - "testPresetsAdditionalPropertiesV6": { - "properties": { - "execution": { "$ref": "#/definitions/testPresetsExecutionV2" }, - "filter": { - "type": "object", - "description": "An optional object specifying how to filter the tests to run.", - "properties": { - "include": { "$ref": "#/definitions/testPresetsFilterIncludeV2" }, - "exclude": { "$ref": "#/definitions/testPresetsFilterExcludeV2" } - } - }, - "output": { "$ref": "#/definitions/testPresetsOutputV6" }, - "condition": { "$ref": "#/definitions/topConditionV3" } - } - }, - "testPresetsAdditionalPropertiesV5": { - "properties": { - "execution": { "$ref": "#/definitions/testPresetsExecutionV2" }, - "filter": { - "type": "object", - "description": "An optional object specifying how to filter the tests to run.", - "properties": { - "include": { "$ref": "#/definitions/testPresetsFilterIncludeV2" }, - "exclude": { "$ref": "#/definitions/testPresetsFilterExcludeV2" } - } - }, - "output": { "$ref": "#/definitions/testPresetsOutputV5" }, - "condition": { "$ref": "#/definitions/topConditionV3" } - } - }, - "testPresetsAdditionalPropertiesV3": { - "allOf": [ - { "$ref": "#/definitions/testPresetsAdditionalPropertiesV2" }, - { - "properties": { - "condition": { "$ref": "#/definitions/topConditionV3" } - } - } - ] - }, - "testPresetsAdditionalPropertiesV2": { - "properties": { - "execution": { "$ref": "#/definitions/testPresetsExecutionV2" }, - "filter": { - "type": "object", - "description": "An optional object specifying how to filter the tests to run.", - "properties": { - "include": { "$ref": "#/definitions/testPresetsFilterIncludeV2" }, - "exclude": { "$ref": "#/definitions/testPresetsFilterExcludeV2" } - } - }, - "output": { "$ref": "#/definitions/testPresetsOutputV2" } - } - }, - "testPresetsItemsV2": { - "allOf": [ - { "$ref": "#/definitions/commonPropertiesAll" }, - { "$ref": "#/definitions/configureBuildTestPackagePresetsEnvironmentProperty" }, - { - "properties": { - "hidden": { - "type": "boolean", - "description": "An optional boolean specifying whether or not a preset should be hidden. If a preset is hidden, it cannot be used in the --preset argument and does not have to have a valid configurePreset, even from inheritance. Hidden presets are intended to be used as a base for other presets to inherit via the inherits field." - }, - "inherits": { - "anyOf": [ - { - "type": "string", - "description": "An optional string representing the name of the test preset to inherit from.", - "minLength": 1 - }, - { - "type": "array", - "description": "An optional array of strings representing the names of test presets to inherit from. The preset will inherit all of the fields from the inherits presets by default (except name, hidden, inherits, description, and displayName), but can override them as desired. If multiple inherits presets provide conflicting values for the same field, the earlier preset in the inherits list will be preferred. Presets in CMakePresets.json must not inherit from presets in CMakeUserPresets.json.", - "items": { - "type": "string", - "description": "An optional string representing the name of the preset to inherit from.", - "minLength": 1 - } - } - ] - }, - "configurePreset": { - "type": "string", - "description": "An optional string specifying the name of a configure preset to associate with this test preset. If configurePreset is not specified, it must be inherited from the inherits preset (unless this preset is hidden). The build tree directory is inferred from the configure preset.", - "minLength": 1 - }, - "inheritConfigureEnvironment": { - "type": "boolean", - "description": "An optional boolean that defaults to true. If true, the environment variables from the associated configure preset are inherited after all inherited test preset environments, but before environment variables explicitly specified in this test preset." - }, - "configuration": { - "type": "string", - "description": "An optional string. Equivalent to passing --build-config on the command line." - }, - "overwriteConfigurationFile": { - "type": "array", - "description": "An optional array of configuration options to overwrite options specified in the CTest configuration file. Equivalent to passing ``--overwrite`` for each value in the array.", - "items": { - "type": "string", - "description": "An option written as a key-value pair in the form \"key=value\"." - } - } - } - } - ], - "required": [ - "name" - ] - }, - "testPresetsV12": { - "type": "array", - "description": "An optional array of test preset objects. Used to specify arguments to ctest. Available in version 12 and higher.", - "items": { - "type": "object", - "description": "A test preset object", - "allOf": [ - { "$ref": "#/definitions/testPresetsItemsV2" }, - { "$ref": "#/definitions/testPresetsAdditionalPropertiesV12" }, - { "$ref": "#/definitions/commentAsProperty" } - ], - "unevaluatedProperties": false - } - }, - "testPresetsV11": { - "type": "array", - "description": "An optional array of test preset objects. Used to specify arguments to ctest. Available in version 11 and higher.", - "items": { - "type": "object", - "description": "A test preset object", - "allOf": [ - { "$ref": "#/definitions/testPresetsItemsV2" }, - { "$ref": "#/definitions/testPresetsAdditionalPropertiesV11" }, - { "$ref": "#/definitions/commentAsProperty" } - ], - "unevaluatedProperties": false - } - }, - "testPresetsV10": { - "type": "array", - "description": "An optional array of test preset objects. Used to specify arguments to ctest. Available in version 10 and higher.", - "items": { - "type": "object", - "description": "A test preset object", - "allOf": [ - { "$ref": "#/definitions/testPresetsItemsV2" }, - { "$ref": "#/definitions/testPresetsAdditionalPropertiesV10" }, - { "$ref": "#/definitions/commentAsProperty" } - ], - "unevaluatedProperties": false - } - }, - "testPresetsV6": { - "type": "array", - "description": "An optional array of test preset objects. Used to specify arguments to ctest. Available in version 6 and higher.", - "items": { - "type": "object", - "description": "A test preset object", - "allOf": [ - { "$ref": "#/definitions/testPresetsItemsV2" }, - { "$ref": "#/definitions/testPresetsAdditionalPropertiesV6" } - ], - "unevaluatedProperties": false - } - }, - "testPresetsV5": { - "type": "array", - "description": "An optional array of test preset objects. Used to specify arguments to ctest. Available in version 5 and higher.", - "items": { - "type": "object", - "description": "A test preset object", - "allOf": [ - { "$ref": "#/definitions/testPresetsItemsV2" }, - { "$ref": "#/definitions/testPresetsAdditionalPropertiesV5" } - ], - "unevaluatedProperties": false - } - }, - "testPresetsV3": { - "type": "array", - "description": "An optional array of test preset objects. Used to specify arguments to ctest. Available in version 3 and higher.", - "items": { - "type": "object", - "description": "A test preset object", - "allOf": [ - { "$ref": "#/definitions/testPresetsItemsV2" }, - { "$ref": "#/definitions/testPresetsAdditionalPropertiesV3" } - ], - "unevaluatedProperties": false - } - }, - "testPresetsV2": { - "type": "array", - "description": "An optional array of test preset objects. Used to specify arguments to ctest. Available in version 2 and higher.", - "items": { - "type": "object", - "description": "A test preset object", - "allOf": [ - { "$ref": "#/definitions/testPresetsItemsV2" }, - { "$ref": "#/definitions/testPresetsAdditionalPropertiesV2" } - ], - "unevaluatedProperties": false - } - }, - "packagePresetsOutputV10": { - "type": "object", - "description": "An optional object specifying output options.", - "allOf": [ - { "$ref": "#/definitions/packagePresetsOutputObject" }, - { "$ref": "#/definitions/commentAsProperty" } - ], - "unevaluatedProperties": false - }, - "packagePresetsOutputV6": { - "type": "object", - "description": "An optional object specifying output options.", - "allOf": [ - { "$ref": "#/definitions/packagePresetsOutputObject" } - ], - "unevaluatedProperties": false - }, - "packagePresetsOutputObject": { - "properties": { - "debug": { - "type": "boolean", - "description": "An optional boolean specifying whether or not to print debug information. A value of true is equivalent to passing --debug on the command line." - }, - "verbose": { - "type": "boolean", - "description": "An optional boolean specifying whether or not to print verbosely. A value of true is equivalent to passing --verbose on the command line." - } - } - }, - "packagePresetsAdditionalPropertiesV10": { - "properties": { - "output": { "$ref": "#/definitions/packagePresetsOutputV10" }, - "condition": { "$ref": "#/definitions/topConditionV10" }, - "$comment": { "$ref": "#/definitions/$comment" } - } - }, - "packagePresetsAdditionalPropertiesV6": { - "properties": { - "output": { "$ref": "#/definitions/packagePresetsOutputV6" }, - "condition": { "$ref": "#/definitions/topConditionV3" } - } - }, - "packagePresetsItemsV6": { - "allOf": [ - { "$ref": "#/definitions/commonPropertiesAll" }, - { "$ref": "#/definitions/configureBuildTestPackagePresetsEnvironmentProperty" }, - { - "properties": { - "hidden": { - "type": "boolean", - "description": "An optional boolean specifying whether or not a preset should be hidden. If a preset is hidden, it cannot be used in the --preset argument and does not have to have a valid configurePreset, even from inheritance. Hidden presets are intended to be used as a base for other presets to inherit via the inherits field." - }, - "inherits": { - "anyOf": [ - { - "type": "string", - "description": "An optional string representing the name of the package preset to inherit from.", - "minLength": 1 - }, - { - "type": "array", - "description": "An optional array of strings representing the names of package presets to inherit from. The preset will inherit all of the fields from the inherits presets by default (except name, hidden, inherits, description, and displayName), but can override them as desired. If multiple inherits presets provide conflicting values for the same field, the earlier preset in the inherits list will be preferred. Presets in CMakePresets.json must not inherit from presets in CMakeUserPresets.json.", - "items": { - "type": "string", - "description": "An optional string representing the name of the preset to inherit from.", - "minLength": 1 - } - } - ] - }, - "configurePreset": { - "type": "string", - "description": "An optional string specifying the name of a configure preset to associate with this package preset. If configurePreset is not specified, it must be inherited from the inherits preset (unless this preset is hidden). The build tree directory is inferred from the configure preset.", - "minLength": 1 - }, - "inheritConfigureEnvironment": { - "type": "boolean", - "description": "An optional boolean that defaults to true. If true, the environment variables from the associated configure preset are inherited after all inherited package preset environments, but before environment variables explicitly specified in this package preset." - }, - "generators": { - "type": "array", - "description": "An optional list of strings representing generators for CPack to use.", - "items": { - "type": "string", - "description": "An optional string representing the name of the CPack generator to use." - } - }, - "configurations": { - "type": "array", - "description": "An optional list of strings representing build configurations for CPack to package.", - "items": { - "type": "string", - "description": "An optional string representing the name of the configuration to use." - } - }, - "variables": { - "type": "object", - "description": "An optional map of variables to pass to CPack, equivalent to -D arguments. Each key is the name of a variable, and the value is the string to assign to that variable.", - "items": { - "type": "string", - "description": "An optional string representing the value of the variable." - } - }, - "configFile": { - "type": "string", - "description": "An optional string representing the config file for CPack to use." - }, - "packageName": { - "type": "string", - "description": "An optional string representing the package name." - }, - "packageVersion": { - "type": "string", - "description": "An optional string representing the package version." - }, - "packageDirectory": { - "type": "string", - "description": "An optional string representing the directory in which to place the package." - }, - "vendorName": { - "type": "string", - "description": "An optional string representing the vendor name." - } - } - } - ], - "required": [ - "name" - ] - }, - "packagePresetsV10": { - "type": "array", - "description": "An optional array of package preset objects. Used to specify arguments to cpack. Available in version 10 and higher.", - "items": { - "type": "object", - "description": "An optional package preset object.", - "allOf": [ - { "$ref": "#/definitions/packagePresetsItemsV6" }, - { "$ref": "#/definitions/packagePresetsAdditionalPropertiesV10" } - ], - "unevaluatedProperties": false - } - }, - "packagePresetsV6": { - "type": "array", - "description": "An optional array of package preset objects. Used to specify arguments to cpack. Available in version 6 and higher.", - "items": { - "type": "object", - "description": "An optional package preset object.", - "allOf": [ - { "$ref": "#/definitions/packagePresetsItemsV6" }, - { "$ref": "#/definitions/packagePresetsAdditionalPropertiesV6" } - ], - "unevaluatedProperties": false - } - }, - "workflowPresetsStepsV10": { - "type": "array", - "description": "A required array of objects describing the steps of the workflow. The first step must be a configure preset, and all subsequent steps must be non-configure presets whose configurePreset field matches the starting configure preset.", - "items": { - "type": "object", - "allOf": [ - { "$ref": "#/definitions/workflowPresetsStepsObject" }, - { "$ref": "#/definitions/commentAsProperty" } - ], - "unevaluatedProperties": false - } - }, - "workflowPresetsStepsV6": { - "type": "array", - "description": "A required array of objects describing the steps of the workflow. The first step must be a configure preset, and all subsequent steps must be non-configure presets whose configurePreset field matches the starting configure preset.", - "items": { - "type": "object", - "allOf": [ - { "$ref": "#/definitions/workflowPresetsStepsObject" } - ], - "unevaluatedProperties": false - } - }, - "workflowPresetsStepsObject": { - "properties": { - "type": { - "type": "string", - "description": "A required string. The first step must be configure. Subsequent steps must be either build, test, or package.", - "enum": ["configure", "build", "test", "package"] - }, - "name": { - "type": "string", - "description": "A required string representing the name of the configure, build, test, or package preset to run as this workflow step.", - "minLength": 1 - } - }, - "required": [ - "type", - "name" - ] - }, - "workflowPresetsAdditionalPropertiesV10": { - "properties": { - "steps": { "$ref": "#/definitions/workflowPresetsStepsV10" }, - "$comment": { "$ref": "#/definitions/$comment" } - } - }, - "workflowPresetsAdditionalPropertiesV6": { - "properties": { - "steps": { "$ref": "#/definitions/workflowPresetsStepsV6" } - } - }, - "workflowPresetsV10": { - "type": "array", - "description": "An optional array of workflow preset objects. Used to execute configure, build, test, and package presets in order. Available in version 10 and higher.", - "items": { - "type": "object", - "description": "An optional workflow preset object", - "allOf": [ - { "$ref": "#/definitions/commonPropertiesAll" }, - { "$ref": "#/definitions/workflowPresetsAdditionalPropertiesV10" } - ], - "required": [ - "name", - "steps" - ], - "unevaluatedProperties": false - } - }, - "workflowPresetsV6": { - "type": "array", - "description": "An optional array of workflow preset objects. Used to execute configure, build, test, and package presets in order. Available in version 6 and higher.", - "items": { - "type": "object", - "description": "An optional workflow preset object", - "allOf": [ - { "$ref": "#/definitions/commonPropertiesAll" }, - { "$ref": "#/definitions/workflowPresetsAdditionalPropertiesV6" } - ], - "required": [ - "name", - "steps" - ], - "unevaluatedProperties": false - } - }, - "conditionAsBooleanV3": { - "type": "boolean", - "description": "A boolean which provides a constant value for the condition's evaluation." - }, - "conditionAsObjectConstV3": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "A required string specifying the type of the condition.", - "const": "const" - }, - "value": { - "type": "boolean", - "description": "A required boolean which provides a constant value for the condition's evaluation." - } - }, - "required": [ - "type", - "value" - ] - }, - "conditionAsObjectEqualsV3": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "A required string specifying the type of the condition.", - "enum": [ "equals", "notEquals" ] - }, - "lhs": { - "type": "string", - "description": "First string to compare. This field supports macro expansion." - }, - "rhs": { - "type": "string", - "description": "Second string to compare. This field supports macro expansion." - } - }, - "required": [ - "type", - "lhs", - "rhs" - ] - }, - "conditionAsObjectInListV3": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "A required string specifying the type of the condition.", - "enum": [ "inList", "notInList" ] - }, - "string": { - "type": "string", - "description": "A required string to search for. This field supports macro expansion." - }, - "list": { - "type": "array", - "description": "A required list of strings to search. This field supports macro expansion, and uses short-circuit evaluation.", - "items": { - "type": "string" - } - } - }, - "required": [ - "type", - "string", - "list" - ] - }, - "conditionAsObjectMatchesV3": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "A required string specifying the type of the condition.", - "enum": [ "matches", "notMatches" ] - }, - "string": { - "type": "string", - "description": "A required string to search. This field supports macro expansion." - }, - "regex": { - "type": "string", - "description": "A required regular expression to search for. This field supports macro expansion." - } - }, - "required": [ - "type", - "string", - "regex" - ] - }, - "conditionAsObjectAggregationV3": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "A required string specifying the type of the condition.", - "enum": [ "anyOf", "allOf" ] - }, - "conditions": { - "type": "array", - "description": "A required array of condition objects. These conditions use short-circuit evaluation.", - "items": { - "properties": { - "condition": { "$ref": "#/definitions/conditionV3" } - } - } - } - }, - "required": [ - "type", - "conditions" - ] - }, - "conditionAsObjectNotV3": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "A required string specifying the type of the condition.", - "const": "not" - }, - "condition": { "$ref": "#/definitions/conditionV3" } - }, - "required": [ - "type", - "condition" - ] - }, - "conditionV10": { - "anyOf": [ - { "$ref": "#/definitions/conditionAsBooleanV3" }, - { - "type": "object", - "allOf": [ - { "$ref": "#/definitions/conditionAsObjectConstV3" }, - { "$ref": "#/definitions/commentAsProperty" } - ], - "unevaluatedProperties": false - }, - { - "type": "object", - "allOf": [ - { "$ref": "#/definitions/conditionAsObjectEqualsV3" }, - { "$ref": "#/definitions/commentAsProperty" } - ], - "unevaluatedProperties": false - }, - { - "type": "object", - "allOf": [ - { "$ref": "#/definitions/conditionAsObjectInListV3" }, - { "$ref": "#/definitions/commentAsProperty" } - ], - "unevaluatedProperties": false - }, - { - "type": "object", - "allOf": [ - { "$ref": "#/definitions/conditionAsObjectMatchesV3" }, - { "$ref": "#/definitions/commentAsProperty" } - ], - "unevaluatedProperties": false - }, - { - "type": "object", - "allOf": [ - { "$ref": "#/definitions/conditionAsObjectAggregationV3" }, - { "$ref": "#/definitions/commentAsProperty" }, - { - "properties": { - "conditions": { - "type": "array", - "items": { "$ref": "#/definitions/conditionV10" } - } - } - } - ], - "unevaluatedProperties": false - }, - { - "type": "object", - "allOf": [ - { "$ref": "#/definitions/conditionAsObjectNotV3" }, - { "$ref": "#/definitions/commentAsProperty" }, - { - "properties": { - "condition": { "$ref": "#/definitions/conditionV10" } - } - } - ], - "unevaluatedProperties": false - } - ] - }, - "conditionV3": { - "anyOf": [ - { "$ref": "#/definitions/conditionAsBooleanV3" }, - { - "type": "object", - "allOf": [ - { "$ref": "#/definitions/conditionAsObjectConstV3" } - ], - "unevaluatedProperties": false - }, - { - "type": "object", - "allOf": [ - { "$ref": "#/definitions/conditionAsObjectEqualsV3" } - ], - "unevaluatedProperties": false - }, - { - "type": "object", - "allOf": [ - { "$ref": "#/definitions/conditionAsObjectInListV3" } - ], - "unevaluatedProperties": false - }, - { - "type": "object", - "allOf": [ - { "$ref": "#/definitions/conditionAsObjectMatchesV3" } - ], - "unevaluatedProperties": false - }, - { - "type": "object", - "allOf": [ - { "$ref": "#/definitions/conditionAsObjectAggregationV3" } - ], - "unevaluatedProperties": false - }, - { - "type": "object", - "allOf": [ - { "$ref": "#/definitions/conditionAsObjectNotV3" } - ], - "unevaluatedProperties": false - } - ] - }, - "topConditionAsNullV3": { - "type": "null", - "description": "Null indicates that the condition always evaluates to true and is not inherited." - }, - "topConditionV10": { - "anyOf": [ - { "$ref": "#/definitions/conditionV10" }, - { "$ref": "#/definitions/topConditionAsNullV3" } - ] - }, - "topConditionV3": { - "anyOf": [ - { "$ref": "#/definitions/conditionV3" }, - { "$ref": "#/definitions/topConditionAsNullV3" } - ] - }, - "include": { + "include@v4..": { "type": "array", "description": "An optional array of strings representing files to include. If the filenames are not absolute, they are considered relative to the current file.", "items": { "type": "string" } + }, + "vendor@v1..": { + "type": "object", + "description": "An optional map containing vendor-specific information. CMake does not interpret the contents of this field except to verify that it is a map if it does exist. However, the keys should be a vendor-specific domain name followed by a /-separated path. For example, the Example IDE 1.0 could use example.com/ExampleIDE/1.0. The value of each field can be anything desired by the vendor, though will typically be a map.", + "properties": {} + }, + "configurePresets@v1..v2": { + "type": "array", + "description": "An optional array of configure preset objects.", + "items": { + "type": "object", + "description": "A configure preset object.", + "unevaluatedProperties": false, + "properties": { + "name": { + "$ref": "#/definitions/configurePresets.name@v1.." + }, + "hidden": { + "$ref": "#/definitions/configurePresets.hidden@v1.." + }, + "inherits": { + "$ref": "#/definitions/configurePresets.inherits@v1.." + }, + "vendor": { + "$ref": "#/definitions/configurePresets.vendor@v1.." + }, + "displayName": { + "$ref": "#/definitions/configurePresets.displayName@v1.." + }, + "description": { + "$ref": "#/definitions/configurePresets.description@v1.." + }, + "generator": { + "$ref": "#/definitions/configurePresets.generator@v1..v2" + }, + "architecture": { + "$ref": "#/definitions/configurePresets.architecture@v1..v9" + }, + "toolset": { + "$ref": "#/definitions/configurePresets.toolset@v1..v9" + }, + "binaryDir": { + "$ref": "#/definitions/configurePresets.binaryDir@v1..v2" + }, + "cmakeExecutable": { + "$ref": "#/definitions/configurePresets.cmakeExecutable@v1.." + }, + "cacheVariables": { + "$ref": "#/definitions/configurePresets.cacheVariables@v1..v9" + }, + "environment": { + "$ref": "#/definitions/configurePresets.environment@v1.." + }, + "warnings": { + "$ref": "#/definitions/configurePresets.warnings@v1..v9" + }, + "errors": { + "$ref": "#/definitions/configurePresets.errors@v1..v9" + }, + "debug": { + "$ref": "#/definitions/configurePresets.debug@v1..v9" + } + }, + "required": [ + "name" + ] + } + }, + "configurePresets@v3..v6": { + "type": "array", + "description": "An optional array of configure preset objects.", + "items": { + "type": "object", + "description": "A configure preset object.", + "unevaluatedProperties": false, + "properties": { + "name": { + "$ref": "#/definitions/configurePresets.name@v1.." + }, + "hidden": { + "$ref": "#/definitions/configurePresets.hidden@v1.." + }, + "inherits": { + "$ref": "#/definitions/configurePresets.inherits@v1.." + }, + "condition": { + "$ref": "#/definitions/configurePresets.condition@v3..v9" + }, + "vendor": { + "$ref": "#/definitions/configurePresets.vendor@v1.." + }, + "displayName": { + "$ref": "#/definitions/configurePresets.displayName@v1.." + }, + "description": { + "$ref": "#/definitions/configurePresets.description@v1.." + }, + "generator": { + "$ref": "#/definitions/configurePresets.generator@v3.." + }, + "architecture": { + "$ref": "#/definitions/configurePresets.architecture@v1..v9" + }, + "toolset": { + "$ref": "#/definitions/configurePresets.toolset@v1..v9" + }, + "toolchainFile": { + "$ref": "#/definitions/configurePresets.toolchainFile@v3.." + }, + "binaryDir": { + "$ref": "#/definitions/configurePresets.binaryDir@v3.." + }, + "installDir": { + "$ref": "#/definitions/configurePresets.installDir@v3.." + }, + "cmakeExecutable": { + "$ref": "#/definitions/configurePresets.cmakeExecutable@v1.." + }, + "cacheVariables": { + "$ref": "#/definitions/configurePresets.cacheVariables@v1..v9" + }, + "environment": { + "$ref": "#/definitions/configurePresets.environment@v1.." + }, + "warnings": { + "$ref": "#/definitions/configurePresets.warnings@v1..v9" + }, + "errors": { + "$ref": "#/definitions/configurePresets.errors@v1..v9" + }, + "debug": { + "$ref": "#/definitions/configurePresets.debug@v1..v9" + } + }, + "required": [ + "name" + ] + } + }, + "configurePresets@v7..v9": { + "type": "array", + "description": "An optional array of configure preset objects.", + "items": { + "type": "object", + "description": "A configure preset object.", + "unevaluatedProperties": false, + "properties": { + "name": { + "$ref": "#/definitions/configurePresets.name@v1.." + }, + "hidden": { + "$ref": "#/definitions/configurePresets.hidden@v1.." + }, + "inherits": { + "$ref": "#/definitions/configurePresets.inherits@v1.." + }, + "condition": { + "$ref": "#/definitions/configurePresets.condition@v3..v9" + }, + "vendor": { + "$ref": "#/definitions/configurePresets.vendor@v1.." + }, + "displayName": { + "$ref": "#/definitions/configurePresets.displayName@v1.." + }, + "description": { + "$ref": "#/definitions/configurePresets.description@v1.." + }, + "generator": { + "$ref": "#/definitions/configurePresets.generator@v3.." + }, + "architecture": { + "$ref": "#/definitions/configurePresets.architecture@v1..v9" + }, + "toolset": { + "$ref": "#/definitions/configurePresets.toolset@v1..v9" + }, + "toolchainFile": { + "$ref": "#/definitions/configurePresets.toolchainFile@v3.." + }, + "binaryDir": { + "$ref": "#/definitions/configurePresets.binaryDir@v3.." + }, + "installDir": { + "$ref": "#/definitions/configurePresets.installDir@v3.." + }, + "cmakeExecutable": { + "$ref": "#/definitions/configurePresets.cmakeExecutable@v1.." + }, + "cacheVariables": { + "$ref": "#/definitions/configurePresets.cacheVariables@v1..v9" + }, + "environment": { + "$ref": "#/definitions/configurePresets.environment@v1.." + }, + "warnings": { + "$ref": "#/definitions/configurePresets.warnings@v1..v9" + }, + "errors": { + "$ref": "#/definitions/configurePresets.errors@v1..v9" + }, + "debug": { + "$ref": "#/definitions/configurePresets.debug@v1..v9" + }, + "trace": { + "$ref": "#/definitions/configurePresets.trace@v7..v9" + } + }, + "required": [ + "name" + ] + } + }, + "configurePresets@v10..": { + "type": "array", + "description": "An optional array of configure preset objects.", + "items": { + "type": "object", + "description": "A configure preset object.", + "unevaluatedProperties": false, + "properties": { + "name": { + "$ref": "#/definitions/configurePresets.name@v1.." + }, + "hidden": { + "$ref": "#/definitions/configurePresets.hidden@v1.." + }, + "inherits": { + "$ref": "#/definitions/configurePresets.inherits@v1.." + }, + "condition": { + "$ref": "#/definitions/configurePresets.condition@v10.." + }, + "vendor": { + "$ref": "#/definitions/configurePresets.vendor@v1.." + }, + "displayName": { + "$ref": "#/definitions/configurePresets.displayName@v1.." + }, + "description": { + "$ref": "#/definitions/configurePresets.description@v1.." + }, + "generator": { + "$ref": "#/definitions/configurePresets.generator@v3.." + }, + "architecture": { + "$ref": "#/definitions/configurePresets.architecture@v10.." + }, + "toolset": { + "$ref": "#/definitions/configurePresets.toolset@v10.." + }, + "toolchainFile": { + "$ref": "#/definitions/configurePresets.toolchainFile@v3.." + }, + "graphviz": { + "$ref": "#/definitions/configurePresets.graphviz@v10.." + }, + "binaryDir": { + "$ref": "#/definitions/configurePresets.binaryDir@v3.." + }, + "installDir": { + "$ref": "#/definitions/configurePresets.installDir@v3.." + }, + "cmakeExecutable": { + "$ref": "#/definitions/configurePresets.cmakeExecutable@v1.." + }, + "cacheVariables": { + "$ref": "#/definitions/configurePresets.cacheVariables@v10.." + }, + "environment": { + "$ref": "#/definitions/configurePresets.environment@v1.." + }, + "warnings": { + "$ref": "#/definitions/configurePresets.warnings@v10.." + }, + "errors": { + "$ref": "#/definitions/configurePresets.errors@v10.." + }, + "debug": { + "$ref": "#/definitions/configurePresets.debug@v10.." + }, + "trace": { + "$ref": "#/definitions/configurePresets.trace@v10.." + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + }, + "required": [ + "name" + ] + } + }, + "configurePresets.name@v1..": { + "type": "string", + "minLength": 1, + "description": "A required string representing the machine-friendly name of the preset. This identifier is used in the cmake --preset option. There must not be two configure presets in the union of CMakePresets.json and CMakeUserPresets.json in the same directory with the same name. However, a configure preset may have the same name as a build, test, package, or workflow preset." + }, + "configurePresets.hidden@v1..": { + "type": "boolean", + "description": "An optional boolean specifying whether or not a preset should be hidden. If a preset is hidden, it cannot be used in the --preset= argument, will not show up in the CMake GUI, and does not have to have a valid generator or binaryDir, even from inheritance. Hidden presets are intended to be used as a base for other presets to inherit via the inherits field." + }, + "configurePresets.inherits@v1..": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "description": "An optional string representing the name of the preset from which to inherit." + }, + { + "type": "array", + "description": "An optional array of strings representing the names of presets from which to inherit. The preset will inherit all of the fields from the inherits presets by default (except name, hidden, inherits, description, and displayName), but can override them as desired. If multiple inherits presets provide conflicting values for the same field, the earlier preset in the inherits list will be preferred. Presets in CMakePresets.json must not inherit from presets in CMakeUserPresets.json.", + "items": { + "type": "string", + "minLength": 1, + "description": "An optional string representing the name of the preset from which to inherit." + } + } + ] + }, + "configurePresets.condition@v3..v9": { + "anyOf": [ + { + "$ref": "#/definitions/condition@v3..v9" + }, + { + "type": "null", + "description": "Null indicates that the condition always evaluates to true and is not inherited." + } + ] + }, + "configurePresets.condition@v10..": { + "anyOf": [ + { + "$ref": "#/definitions/condition@v10.." + }, + { + "type": "null", + "description": "Null indicates that the condition always evaluates to true and is not inherited." + } + ] + }, + "configurePresets.vendor@v1..": { + "type": "object", + "minLength": 1, + "description": "An optional map containing vendor-specific information. CMake does not interpret the contents of this field except to verify that it is a map if it does exist. However, it should follow the same conventions as the root-level vendor field.", + "properties": {} + }, + "configurePresets.displayName@v1..": { + "type": "string", + "description": "An optional string with a human-friendly name of the preset." + }, + "configurePresets.description@v1..": { + "type": "string", + "description": "An optional string with a human-friendly description of the preset." + }, + "configurePresets.generator@v1..v2": { + "type": "string", + "description": "An optional string representing the generator to use for the preset. If generator is not specified, it must be inherited from the inherits preset (unless this preset is hidden). Note that for Visual Studio generators, unlike in the command line -G argument, you cannot include the platform name in the generator name. Use the architecture field instead." + }, + "configurePresets.generator@v3..": { + "type": "string", + "description": "An optional string representing the generator to use for the preset. If generator is not specified, the normal generator discovery procedure is used. Note that for Visual Studio generators, unlike in the command line -G argument, you cannot include the platform name in the generator name. Use the architecture field instead." + }, + "configurePresets.architecture@v1..v9": { + "anyOf": [ + { + "type": "string", + "description": "An optional string representing the platform for generators that support it." + }, + { + "type": "object", + "description": "An optional string representing the platform for generators that support it.", + "unevaluatedProperties": false, + "properties": { + "value": { + "$ref": "#/definitions/configurePresets.architecture.value@v1.." + }, + "strategy": { + "$ref": "#/definitions/configurePresets.architecture.strategy@v1.." + } + } + } + ] + }, + "configurePresets.architecture@v10..": { + "anyOf": [ + { + "type": "string", + "description": "An optional string representing the platform for generators that support it." + }, + { + "type": "object", + "description": "An optional string representing the platform for generators that support it.", + "unevaluatedProperties": false, + "properties": { + "value": { + "$ref": "#/definitions/configurePresets.architecture.value@v1.." + }, + "strategy": { + "$ref": "#/definitions/configurePresets.architecture.strategy@v1.." + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + } + } + ] + }, + "configurePresets.architecture.value@v1..": { + "type": "string", + "description": "An optional string representing the value." + }, + "configurePresets.architecture.strategy@v1..": { + "type": "string", + "enum": [ + "set", + "external" + ], + "description": "An optional string telling CMake how to handle the field. Valid values are: \"set\" Set the respective value. This will result in an error for generators that do not support the respective field. \"external\" Do not set the value, even if the generator supports it. This is useful if, for example, a preset uses the Ninja generator, and an IDE knows how to set up the Visual C++ environment from the architecture and toolset fields. In that case, CMake will ignore the field, but the IDE can use them to set up the environment before invoking CMake." + }, + "configurePresets.toolset@v1..v9": { + "anyOf": [ + { + "type": "string", + "description": "An optional string representing the toolset for generators that support it." + }, + { + "type": "object", + "description": "An optional string representing the toolset for generators that support it.", + "unevaluatedProperties": false, + "properties": { + "value": { + "$ref": "#/definitions/configurePresets.toolset.value@v1.." + }, + "strategy": { + "$ref": "#/definitions/configurePresets.toolset.strategy@v1.." + } + } + } + ] + }, + "configurePresets.toolset@v10..": { + "anyOf": [ + { + "type": "string", + "description": "An optional string representing the toolset for generators that support it." + }, + { + "type": "object", + "description": "An optional string representing the toolset for generators that support it.", + "unevaluatedProperties": false, + "properties": { + "value": { + "$ref": "#/definitions/configurePresets.toolset.value@v1.." + }, + "strategy": { + "$ref": "#/definitions/configurePresets.toolset.strategy@v1.." + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + } + } + ] + }, + "configurePresets.toolset.value@v1..": { + "type": "string", + "description": "An optional string representing the value." + }, + "configurePresets.toolset.strategy@v1..": { + "type": "string", + "enum": [ + "set", + "external" + ], + "description": "An optional string telling CMake how to handle the field. Valid values are: \"set\" Set the respective value. This will result in an error for generators that do not support the respective field. \"external\" Do not set the value, even if the generator supports it. This is useful if, for example, a preset uses the Ninja generator, and an IDE knows how to set up the Visual C++ environment from the architecture and toolset fields. In that case, CMake will ignore the field, but the IDE can use them to set up the environment before invoking CMake." + }, + "configurePresets.toolchainFile@v3..": { + "type": "string", + "description": "An optional string representing the path to the toolchain file. This field supports macro expansion. If a relative path is specified, it is calculated relative to the build directory, and if not found, relative to the source directory." + }, + "configurePresets.graphviz@v10..": { + "type": "string", + "description": "An optional string specifying the path to the graphviz dot file." + }, + "configurePresets.binaryDir@v1..v2": { + "type": "string", + "description": "An optional string representing the path to the output binary directory. This field supports macro expansion. If a relative path is specified, it is calculated relative to the source directory. If binaryDir is not specified, it must be inherited from the inherits preset (unless this preset is hidden)." + }, + "configurePresets.binaryDir@v3..": { + "type": "string", + "description": "An optional string representing the path to the output binary directory. This field supports macro expansion. If a relative path is specified, it is calculated relative to the source directory. If binaryDir is not specified, the path is calculated using regular methods." + }, + "configurePresets.installDir@v3..": { + "type": "string", + "description": "An optional string representing the path to the installation directory, which will be used as the CMAKE_INSTALL_PREFIX variable. This field supports macro expansion. If a relative path is specified, it is calculated relative to the source directory." + }, + "configurePresets.cmakeExecutable@v1..": { + "type": "string", + "description": "An optional string representing the path to the CMake executable to use for this preset. This is reserved for use by IDEs, and is not used by CMake itself. IDEs that use this field should expand any macros in it." + }, + "configurePresets.cacheVariables@v1..v9": { + "type": "object", + "description": "An optional map of cache variables. The key is the variable name (which must not be an empty string). Cache variables are inherited through the inherits field, and the preset's variables will be the union of its own cacheVariables and the cacheVariables from all its parents. If multiple presets in this union define the same variable, the standard rules of inherits are applied.", + "propertyNames": { + "pattern": "^.+$" + }, + "properties": {}, + "additionalProperties": { + "anyOf": [ + { + "type": "null", + "description": "Setting a variable to null causes it to not be set, even if a value was inherited from another preset." + }, + { + "type": "boolean", + "description": "A boolean representing the value of the variable. Equivalent to \"TRUE\" or \"FALSE\"" + }, + { + "type": "string", + "description": "A string representing the value of the variable (which supports macro expansion)." + }, + { + "type": "object", + "description": "An optional object representing the cache variables for generators that support it.", + "unevaluatedProperties": false, + "properties": { + "type": { + "$ref": "#/definitions/configurePresets.cacheVariables.type@v1.." + }, + "value": { + "$ref": "#/definitions/configurePresets.cacheVariables.value@v1.." + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "configurePresets.cacheVariables@v10..": { + "type": "object", + "description": "An optional map of cache variables. The key is the variable name (which must not be an empty string). Cache variables are inherited through the inherits field, and the preset's variables will be the union of its own cacheVariables and the cacheVariables from all its parents. If multiple presets in this union define the same variable, the standard rules of inherits are applied.", + "propertyNames": { + "pattern": "^.+$" + }, + "properties": {}, + "additionalProperties": { + "anyOf": [ + { + "type": "null", + "description": "Setting a variable to null causes it to not be set, even if a value was inherited from another preset." + }, + { + "type": "boolean", + "description": "A boolean representing the value of the variable. Equivalent to \"TRUE\" or \"FALSE\"" + }, + { + "type": "string", + "description": "A string representing the value of the variable (which supports macro expansion)." + }, + { + "type": "object", + "description": "An optional object representing the cache variables for generators that support it.", + "unevaluatedProperties": false, + "properties": { + "type": { + "$ref": "#/definitions/configurePresets.cacheVariables.type@v1.." + }, + "value": { + "$ref": "#/definitions/configurePresets.cacheVariables.value@v1.." + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "configurePresets.cacheVariables.type@v1..": { + "type": "string", + "enum": [ + "BOOL", + "FILEPATH", + "PATH", + "STRING", + "INTERNAL" + ], + "description": "An optional string representing the type of the variable. It should be BOOL, FILEPATH, PATH, STRING, or INTERNAL." + }, + "configurePresets.cacheVariables.value@v1..": { + "anyOf": [ + { + "type": "boolean", + "description": "A boolean representing the value of the variable. Equivalent to \"TRUE\" or \"FALSE\"." + }, + { + "type": "string", + "description": "A string representing the value of the variable (which supports macro expansion)." + } + ] + }, + "configurePresets.environment@v1..": { + "type": "object", + "description": "An optional map of environment variables. The key is the variable name (which must not be an empty string). Each variable is set regardless of whether or not a value was given to it by the process's environment. This field supports macro expansion, and environment variables in this map may reference each other, and may be listed in any order, as long as such references do not cause a cycle (for example,if ENV_1 is $env{ENV_2}, ENV_2 may not be $env{ENV_1}.) Environment variables are inherited through the inherits field, and the preset's environment will be the union of its own environment and the environment from all its parents. If multiple presets in this union define the same variable, the standard rules of inherits are applied. Setting a variable to null causes it to not be set, even if a value was inherited from another preset.", + "propertyNames": { + "pattern": "^.+$" + }, + "properties": {}, + "additionalProperties": { + "anyOf": [ + { + "type": "null", + "description": "Setting a variable to null causes it to not be set, even if a value was inherited from another preset." + }, + { + "type": "string", + "description": "A string representing the value of the variable." + } + ] + } + }, + "configurePresets.warnings@v1..v9": { + "type": "object", + "description": "An optional object specifying the warnings to enable.", + "unevaluatedProperties": false, + "properties": { + "deprecated": { + "$ref": "#/definitions/configurePresets.warnings.deprecated@v1.." + }, + "dev": { + "$ref": "#/definitions/configurePresets.warnings.dev@v1.." + }, + "uninitialized": { + "$ref": "#/definitions/configurePresets.warnings.uninitialized@v1.." + }, + "unusedCli": { + "$ref": "#/definitions/configurePresets.warnings.unusedCli@v1.." + }, + "systemVars": { + "$ref": "#/definitions/configurePresets.warnings.systemVars@v1.." + } + } + }, + "configurePresets.warnings@v10..": { + "type": "object", + "description": "An optional object specifying the warnings to enable.", + "unevaluatedProperties": false, + "properties": { + "deprecated": { + "$ref": "#/definitions/configurePresets.warnings.deprecated@v1.." + }, + "dev": { + "$ref": "#/definitions/configurePresets.warnings.dev@v1.." + }, + "uninitialized": { + "$ref": "#/definitions/configurePresets.warnings.uninitialized@v1.." + }, + "unusedCli": { + "$ref": "#/definitions/configurePresets.warnings.unusedCli@v1.." + }, + "systemVars": { + "$ref": "#/definitions/configurePresets.warnings.systemVars@v1.." + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + } + }, + "configurePresets.warnings.deprecated@v1..": { + "type": "boolean", + "description": "An optional boolean. Equivalent to passing -Wdeprecated or -Wno-deprecated on the command line. This may not be set to false if errors.deprecated is set to true." + }, + "configurePresets.warnings.dev@v1..": { + "type": "boolean", + "description": "An optional boolean. Equivalent to passing -Wdev or -Wno-dev on the command line. This may not be set to false if errors.dev is set to true." + }, + "configurePresets.warnings.uninitialized@v1..": { + "type": "boolean", + "description": "An optional boolean. Setting this to true is equivalent to passing --warn-uninitialized on the command line." + }, + "configurePresets.warnings.unusedCli@v1..": { + "type": "boolean", + "description": "An optional boolean. Setting this to false is equivalent to passing --no-warn-unused-cli on the command line." + }, + "configurePresets.warnings.systemVars@v1..": { + "type": "boolean", + "description": "An optional boolean. Setting this to true is equivalent to passing --check-system-vars on the command line." + }, + "configurePresets.errors@v1..v9": { + "type": "object", + "description": "An optional object specifying the errors to enable.", + "unevaluatedProperties": false, + "properties": { + "deprecated": { + "$ref": "#/definitions/configurePresets.errors.deprecated@v1.." + }, + "dev": { + "$ref": "#/definitions/configurePresets.errors.dev@v1.." + } + } + }, + "configurePresets.errors@v10..": { + "type": "object", + "description": "An optional object specifying the errors to enable.", + "unevaluatedProperties": false, + "properties": { + "deprecated": { + "$ref": "#/definitions/configurePresets.errors.deprecated@v1.." + }, + "dev": { + "$ref": "#/definitions/configurePresets.errors.dev@v1.." + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + } + }, + "configurePresets.errors.deprecated@v1..": { + "type": "boolean", + "description": "An optional boolean. Equivalent to passing -Werror=deprecated or -Wno-error=deprecated on the command line. This may not be set to true if warnings.deprecated is set to false." + }, + "configurePresets.errors.dev@v1..": { + "type": "boolean", + "description": "An optional boolean. Equivalent to passing -Werror=dev or -Wno-error=dev on the command line. This may not be set to true if warnings.dev is set to false." + }, + "configurePresets.debug@v1..v9": { + "type": "object", + "description": "An optional object specifying debug options.", + "unevaluatedProperties": false, + "properties": { + "output": { + "$ref": "#/definitions/configurePresets.debug.output@v1.." + }, + "tryCompile": { + "$ref": "#/definitions/configurePresets.debug.tryCompile@v1.." + }, + "find": { + "$ref": "#/definitions/configurePresets.debug.find@v1.." + } + } + }, + "configurePresets.debug@v10..": { + "type": "object", + "description": "An optional object specifying debug options.", + "unevaluatedProperties": false, + "properties": { + "output": { + "$ref": "#/definitions/configurePresets.debug.output@v1.." + }, + "tryCompile": { + "$ref": "#/definitions/configurePresets.debug.tryCompile@v1.." + }, + "find": { + "$ref": "#/definitions/configurePresets.debug.find@v1.." + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + } + }, + "configurePresets.debug.output@v1..": { + "type": "boolean", + "description": "An optional boolean. Setting this to true is equivalent to passing --debug-output on the command line." + }, + "configurePresets.debug.tryCompile@v1..": { + "type": "boolean", + "description": "An optional boolean. Setting this to true is equivalent to passing --debug-trycompile on the command line." + }, + "configurePresets.debug.find@v1..": { + "type": "boolean", + "description": "An optional boolean. Setting this to true is equivalent to passing --debug-find on the command line." + }, + "configurePresets.trace@v7..v9": { + "type": "object", + "description": "An optional object specifying trace options.", + "unevaluatedProperties": false, + "properties": { + "mode": { + "$ref": "#/definitions/configurePresets.trace.mode@v7.." + }, + "format": { + "$ref": "#/definitions/configurePresets.trace.format@v7.." + }, + "source": { + "$ref": "#/definitions/configurePresets.trace.source@v7.." + }, + "redirect": { + "$ref": "#/definitions/configurePresets.trace.redirect@v7.." + } + } + }, + "configurePresets.trace@v10..": { + "type": "object", + "description": "An optional object specifying trace options.", + "unevaluatedProperties": false, + "properties": { + "mode": { + "$ref": "#/definitions/configurePresets.trace.mode@v7.." + }, + "format": { + "$ref": "#/definitions/configurePresets.trace.format@v7.." + }, + "source": { + "$ref": "#/definitions/configurePresets.trace.source@v7.." + }, + "redirect": { + "$ref": "#/definitions/configurePresets.trace.redirect@v7.." + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + } + }, + "configurePresets.trace.mode@v7..": { + "type": "string", + "enum": [ + "on", + "off", + "expand" + ], + "description": "An optional string that specifies the trace mode." + }, + "configurePresets.trace.format@v7..": { + "type": "string", + "enum": [ + "human", + "json-v1" + ], + "description": "An optional string that specifies the trace output format." + }, + "configurePresets.trace.source@v7..": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "description": "An optional string representing the path to one source file to be traced." + }, + { + "type": "array", + "description": "An optional array of strings representing the paths to source files to be traced.", + "items": { + "type": "string", + "minLength": 1, + "description": "A string representing the path to one source file to be traced." + } + } + ] + }, + "configurePresets.trace.redirect@v7..": { + "type": "string", + "description": "An optional string specifying a path to a trace output file." + }, + "buildPresets@v2": { + "type": "array", + "description": "An optional array of build preset objects.", + "items": { + "type": "object", + "description": "A build preset object.", + "unevaluatedProperties": false, + "properties": { + "name": { + "$ref": "#/definitions/buildPresets.name@v2.." + }, + "hidden": { + "$ref": "#/definitions/buildPresets.hidden@v2.." + }, + "inherits": { + "$ref": "#/definitions/buildPresets.inherits@v2.." + }, + "vendor": { + "$ref": "#/definitions/buildPresets.vendor@v2.." + }, + "displayName": { + "$ref": "#/definitions/buildPresets.displayName@v2.." + }, + "description": { + "$ref": "#/definitions/buildPresets.description@v2.." + }, + "environment": { + "$ref": "#/definitions/buildPresets.environment@v2.." + }, + "configurePreset": { + "$ref": "#/definitions/buildPresets.configurePreset@v2.." + }, + "inheritConfigureEnvironment": { + "$ref": "#/definitions/buildPresets.inheritConfigureEnvironment@v2.." + }, + "jobs": { + "$ref": "#/definitions/buildPresets.jobs@v2.." + }, + "targets": { + "$ref": "#/definitions/buildPresets.targets@v2.." + }, + "configuration": { + "$ref": "#/definitions/buildPresets.configuration@v2.." + }, + "cleanFirst": { + "$ref": "#/definitions/buildPresets.cleanFirst@v2.." + }, + "verbose": { + "$ref": "#/definitions/buildPresets.verbose@v2.." + }, + "nativeToolOptions": { + "$ref": "#/definitions/buildPresets.nativeToolOptions@v2.." + } + }, + "required": [ + "name" + ] + } + }, + "buildPresets@v3": { + "type": "array", + "description": "An optional array of build preset objects.", + "items": { + "type": "object", + "description": "A build preset object.", + "unevaluatedProperties": false, + "properties": { + "name": { + "$ref": "#/definitions/buildPresets.name@v2.." + }, + "hidden": { + "$ref": "#/definitions/buildPresets.hidden@v2.." + }, + "inherits": { + "$ref": "#/definitions/buildPresets.inherits@v2.." + }, + "condition": { + "$ref": "#/definitions/buildPresets.condition@v3..v9" + }, + "vendor": { + "$ref": "#/definitions/buildPresets.vendor@v2.." + }, + "displayName": { + "$ref": "#/definitions/buildPresets.displayName@v2.." + }, + "description": { + "$ref": "#/definitions/buildPresets.description@v2.." + }, + "environment": { + "$ref": "#/definitions/buildPresets.environment@v2.." + }, + "configurePreset": { + "$ref": "#/definitions/buildPresets.configurePreset@v2.." + }, + "inheritConfigureEnvironment": { + "$ref": "#/definitions/buildPresets.inheritConfigureEnvironment@v2.." + }, + "jobs": { + "$ref": "#/definitions/buildPresets.jobs@v2.." + }, + "targets": { + "$ref": "#/definitions/buildPresets.targets@v2.." + }, + "configuration": { + "$ref": "#/definitions/buildPresets.configuration@v2.." + }, + "cleanFirst": { + "$ref": "#/definitions/buildPresets.cleanFirst@v2.." + }, + "verbose": { + "$ref": "#/definitions/buildPresets.verbose@v2.." + }, + "nativeToolOptions": { + "$ref": "#/definitions/buildPresets.nativeToolOptions@v2.." + } + }, + "required": [ + "name" + ] + } + }, + "buildPresets@v4..v9": { + "type": "array", + "description": "An optional array of build preset objects.", + "items": { + "type": "object", + "description": "A build preset object.", + "unevaluatedProperties": false, + "properties": { + "name": { + "$ref": "#/definitions/buildPresets.name@v2.." + }, + "hidden": { + "$ref": "#/definitions/buildPresets.hidden@v2.." + }, + "inherits": { + "$ref": "#/definitions/buildPresets.inherits@v2.." + }, + "condition": { + "$ref": "#/definitions/buildPresets.condition@v3..v9" + }, + "vendor": { + "$ref": "#/definitions/buildPresets.vendor@v2.." + }, + "displayName": { + "$ref": "#/definitions/buildPresets.displayName@v2.." + }, + "description": { + "$ref": "#/definitions/buildPresets.description@v2.." + }, + "environment": { + "$ref": "#/definitions/buildPresets.environment@v2.." + }, + "configurePreset": { + "$ref": "#/definitions/buildPresets.configurePreset@v2.." + }, + "inheritConfigureEnvironment": { + "$ref": "#/definitions/buildPresets.inheritConfigureEnvironment@v2.." + }, + "jobs": { + "$ref": "#/definitions/buildPresets.jobs@v2.." + }, + "targets": { + "$ref": "#/definitions/buildPresets.targets@v2.." + }, + "configuration": { + "$ref": "#/definitions/buildPresets.configuration@v2.." + }, + "cleanFirst": { + "$ref": "#/definitions/buildPresets.cleanFirst@v2.." + }, + "resolvePackageReferences": { + "$ref": "#/definitions/buildPresets.resolvePackageReferences@v4.." + }, + "verbose": { + "$ref": "#/definitions/buildPresets.verbose@v2.." + }, + "nativeToolOptions": { + "$ref": "#/definitions/buildPresets.nativeToolOptions@v2.." + } + }, + "required": [ + "name" + ] + } + }, + "buildPresets@v10..": { + "type": "array", + "description": "An optional array of build preset objects.", + "items": { + "type": "object", + "description": "A build preset object.", + "unevaluatedProperties": false, + "properties": { + "name": { + "$ref": "#/definitions/buildPresets.name@v2.." + }, + "hidden": { + "$ref": "#/definitions/buildPresets.hidden@v2.." + }, + "inherits": { + "$ref": "#/definitions/buildPresets.inherits@v2.." + }, + "condition": { + "$ref": "#/definitions/buildPresets.condition@v10.." + }, + "vendor": { + "$ref": "#/definitions/buildPresets.vendor@v2.." + }, + "displayName": { + "$ref": "#/definitions/buildPresets.displayName@v2.." + }, + "description": { + "$ref": "#/definitions/buildPresets.description@v2.." + }, + "environment": { + "$ref": "#/definitions/buildPresets.environment@v2.." + }, + "configurePreset": { + "$ref": "#/definitions/buildPresets.configurePreset@v2.." + }, + "inheritConfigureEnvironment": { + "$ref": "#/definitions/buildPresets.inheritConfigureEnvironment@v2.." + }, + "jobs": { + "$ref": "#/definitions/buildPresets.jobs@v2.." + }, + "targets": { + "$ref": "#/definitions/buildPresets.targets@v2.." + }, + "configuration": { + "$ref": "#/definitions/buildPresets.configuration@v2.." + }, + "cleanFirst": { + "$ref": "#/definitions/buildPresets.cleanFirst@v2.." + }, + "resolvePackageReferences": { + "$ref": "#/definitions/buildPresets.resolvePackageReferences@v4.." + }, + "verbose": { + "$ref": "#/definitions/buildPresets.verbose@v2.." + }, + "nativeToolOptions": { + "$ref": "#/definitions/buildPresets.nativeToolOptions@v2.." + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + }, + "required": [ + "name" + ] + } + }, + "buildPresets.name@v2..": { + "type": "string", + "minLength": 1, + "description": "A required string representing the machine-friendly name of the preset. This identifier is used in the cmake --build --preset option. There must not be two build presets in the union of CMakePresets.json and CMakeUserPresets.json in the same directory with the same name. However, a build preset may have the same name as a configure, test, package, or workflow preset." + }, + "buildPresets.hidden@v2..": { + "type": "boolean", + "description": "An optional boolean specifying whether or not a preset should be hidden. If a preset is hidden, it cannot be used in the --preset argument and does not have to have a valid configurePreset, even from inheritance. hidden presets are intended to be used as a base for other presets to inherit via the inherits field." + }, + "buildPresets.inherits@v2..": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "description": "An optional string representing the name of the preset from which to inherit." + }, + { + "type": "array", + "description": "An optional array of strings representing the names of presets from which to inherit. The preset will inherit all of the fields from the inherits presets by default (except name, hidden, inherits, description, and displayName), but can override them as desired. If multiple inherits presets provide conflicting values for the same field, the earlier preset in the inherits list will be preferred. Presets in CMakePresets.json must not inherit from presets in CMakeUserPresets.json.", + "items": { + "type": "string", + "minLength": 1, + "description": "An optional string representing the name of the preset from which to inherit." + } + } + ] + }, + "buildPresets.condition@v3..v9": { + "anyOf": [ + { + "$ref": "#/definitions/condition@v3..v9" + }, + { + "type": "null", + "description": "Null indicates that the condition always evaluates to true and is not inherited." + } + ] + }, + "buildPresets.condition@v10..": { + "anyOf": [ + { + "$ref": "#/definitions/condition@v10.." + }, + { + "type": "null", + "description": "Null indicates that the condition always evaluates to true and is not inherited." + } + ] + }, + "buildPresets.vendor@v2..": { + "type": "object", + "minLength": 1, + "description": "An optional map containing vendor-specific information. CMake does not interpret the contents of this field except to verify that it is a map if it does exist. However, it should follow the same conventions as the root-level vendor field.", + "properties": {} + }, + "buildPresets.displayName@v2..": { + "type": "string", + "description": "An optional string with a human-friendly name of the preset." + }, + "buildPresets.description@v2..": { + "type": "string", + "description": "An optional string with a human-friendly description of the preset." + }, + "buildPresets.environment@v2..": { + "type": "object", + "description": "An optional map of environment variables. The key is the variable name (which must not be an empty string). Each variable is set regardless of whether or not a value was given to it by the process's environment. This field supports macro expansion, and environment variables in this map may reference each other, and may be listed in any order, as long as such references do not cause a cycle (for example,if ENV_1 is $env{ENV_2}, ENV_2 may not be $env{ENV_1}.) Environment variables are inherited through the inherits field, and the preset's environment will be the union of its own environment and the environment from all its parents. If multiple presets in this union define the same variable, the standard rules of inherits are applied. Setting a variable to null causes it to not be set, even if a value was inherited from another preset.", + "properties": {}, + "additionalProperties": { + "anyOf": [ + { + "type": "null", + "description": "Setting a variable to null causes it to not be set, even if a value was inherited from another preset." + }, + { + "type": "string", + "description": "A string representing the value of the variable." + } + ] + } + }, + "buildPresets.configurePreset@v2..": { + "type": "string", + "minLength": 1, + "description": "An optional string specifying the name of a configure preset to associate with this build preset. If configurePreset is not specified, it must be inherited from the inherits preset (unless this preset is hidden). The build tree directory is inferred from the configure preset." + }, + "buildPresets.inheritConfigureEnvironment@v2..": { + "type": "boolean", + "description": "An optional boolean that defaults to true. If true, the environment variables from the associated configure preset are inherited after all inherited build preset environments, but before environment variables explicitly specified in this build preset." + }, + "buildPresets.jobs@v2..": { + "type": "integer", + "description": "An optional non-negative integer. Equivalent to passing --parallel or -j on the command line.", + "minimum": 0 + }, + "buildPresets.targets@v2..": { + "anyOf": [ + { + "type": "string", + "description": "An optional string. Equivalent to passing --target or -t on the command line. Vendors may ignore the targets property or hide build presets that explicitly specify targets." + }, + { + "type": "array", + "description": "An optional array of strings. Equivalent to passing --target or -t on the command line. Vendors may ignore the targets property or hide build presets that explicitly specify targets.", + "items": { + "type": "string" + } + } + ] + }, + "buildPresets.configuration@v2..": { + "type": "string", + "description": "An optional string. Equivalent to passing --config on the command line." + }, + "buildPresets.cleanFirst@v2..": { + "type": "boolean", + "description": "An optional boolean. If true, equivalent to passing --clean-first on the command line." + }, + "buildPresets.resolvePackageReferences@v4..": { + "type": "string", + "enum": [ + "on", + "off", + "only" + ], + "description": "An optional string specifying the package resolve behavior. Valid values are \"on\" (packages are resolved prior to the build), \"off\" (packages are not resolved prior to the build), and \"only\" (packages are resolved, but no build will be performed)." + }, + "buildPresets.verbose@v2..": { + "type": "boolean", + "description": "An optional boolean. If true, equivalent to passing --verbose on the command line." + }, + "buildPresets.nativeToolOptions@v2..": { + "type": "array", + "description": "An optional array of strings. Equivalent to passing options after -- on the command line.", + "items": { + "type": "string" + } + }, + "testPresets@v2": { + "type": "array", + "description": "An optional array of test preset objects. Used to specify arguments to ctest.", + "items": { + "type": "object", + "description": "A test preset object.", + "unevaluatedProperties": false, + "properties": { + "name": { + "$ref": "#/definitions/testPresets.name@v2.." + }, + "hidden": { + "$ref": "#/definitions/testPresets.hidden@v2.." + }, + "inherits": { + "$ref": "#/definitions/testPresets.inherits@v2.." + }, + "vendor": { + "$ref": "#/definitions/testPresets.vendor@v2.." + }, + "displayName": { + "$ref": "#/definitions/testPresets.displayName@v2.." + }, + "description": { + "$ref": "#/definitions/testPresets.description@v2.." + }, + "environment": { + "$ref": "#/definitions/testPresets.environment@v2.." + }, + "configurePreset": { + "$ref": "#/definitions/testPresets.configurePreset@v2.." + }, + "inheritConfigureEnvironment": { + "$ref": "#/definitions/testPresets.inheritConfigureEnvironment@v2.." + }, + "configuration": { + "$ref": "#/definitions/testPresets.configuration@v2.." + }, + "overwriteConfigurationFile": { + "$ref": "#/definitions/testPresets.overwriteConfigurationFile@v2.." + }, + "output": { + "$ref": "#/definitions/testPresets.output@v2..v4" + }, + "filter": { + "$ref": "#/definitions/testPresets.filter@v2..v9" + }, + "execution": { + "$ref": "#/definitions/testPresets.execution@v2..v9" + } + }, + "required": [ + "name" + ] + } + }, + "testPresets@v3..v4": { + "type": "array", + "description": "An optional array of test preset objects. Used to specify arguments to ctest.", + "items": { + "type": "object", + "description": "A test preset object.", + "unevaluatedProperties": false, + "properties": { + "name": { + "$ref": "#/definitions/testPresets.name@v2.." + }, + "hidden": { + "$ref": "#/definitions/testPresets.hidden@v2.." + }, + "inherits": { + "$ref": "#/definitions/testPresets.inherits@v2.." + }, + "condition": { + "$ref": "#/definitions/testPresets.condition@v3..v9" + }, + "vendor": { + "$ref": "#/definitions/testPresets.vendor@v2.." + }, + "displayName": { + "$ref": "#/definitions/testPresets.displayName@v2.." + }, + "description": { + "$ref": "#/definitions/testPresets.description@v2.." + }, + "environment": { + "$ref": "#/definitions/testPresets.environment@v2.." + }, + "configurePreset": { + "$ref": "#/definitions/testPresets.configurePreset@v2.." + }, + "inheritConfigureEnvironment": { + "$ref": "#/definitions/testPresets.inheritConfigureEnvironment@v2.." + }, + "configuration": { + "$ref": "#/definitions/testPresets.configuration@v2.." + }, + "overwriteConfigurationFile": { + "$ref": "#/definitions/testPresets.overwriteConfigurationFile@v2.." + }, + "output": { + "$ref": "#/definitions/testPresets.output@v2..v4" + }, + "filter": { + "$ref": "#/definitions/testPresets.filter@v2..v9" + }, + "execution": { + "$ref": "#/definitions/testPresets.execution@v2..v9" + } + }, + "required": [ + "name" + ] + } + }, + "testPresets@v5": { + "type": "array", + "description": "An optional array of test preset objects. Used to specify arguments to ctest.", + "items": { + "type": "object", + "description": "A test preset object.", + "unevaluatedProperties": false, + "properties": { + "name": { + "$ref": "#/definitions/testPresets.name@v2.." + }, + "hidden": { + "$ref": "#/definitions/testPresets.hidden@v2.." + }, + "inherits": { + "$ref": "#/definitions/testPresets.inherits@v2.." + }, + "condition": { + "$ref": "#/definitions/testPresets.condition@v3..v9" + }, + "vendor": { + "$ref": "#/definitions/testPresets.vendor@v2.." + }, + "displayName": { + "$ref": "#/definitions/testPresets.displayName@v2.." + }, + "description": { + "$ref": "#/definitions/testPresets.description@v2.." + }, + "environment": { + "$ref": "#/definitions/testPresets.environment@v2.." + }, + "configurePreset": { + "$ref": "#/definitions/testPresets.configurePreset@v2.." + }, + "inheritConfigureEnvironment": { + "$ref": "#/definitions/testPresets.inheritConfigureEnvironment@v2.." + }, + "configuration": { + "$ref": "#/definitions/testPresets.configuration@v2.." + }, + "overwriteConfigurationFile": { + "$ref": "#/definitions/testPresets.overwriteConfigurationFile@v2.." + }, + "output": { + "$ref": "#/definitions/testPresets.output@v5" + }, + "filter": { + "$ref": "#/definitions/testPresets.filter@v2..v9" + }, + "execution": { + "$ref": "#/definitions/testPresets.execution@v2..v9" + } + }, + "required": [ + "name" + ] + } + }, + "testPresets@v6..v9": { + "type": "array", + "description": "An optional array of test preset objects. Used to specify arguments to ctest.", + "items": { + "type": "object", + "description": "A test preset object.", + "unevaluatedProperties": false, + "properties": { + "name": { + "$ref": "#/definitions/testPresets.name@v2.." + }, + "hidden": { + "$ref": "#/definitions/testPresets.hidden@v2.." + }, + "inherits": { + "$ref": "#/definitions/testPresets.inherits@v2.." + }, + "condition": { + "$ref": "#/definitions/testPresets.condition@v3..v9" + }, + "vendor": { + "$ref": "#/definitions/testPresets.vendor@v2.." + }, + "displayName": { + "$ref": "#/definitions/testPresets.displayName@v2.." + }, + "description": { + "$ref": "#/definitions/testPresets.description@v2.." + }, + "environment": { + "$ref": "#/definitions/testPresets.environment@v2.." + }, + "configurePreset": { + "$ref": "#/definitions/testPresets.configurePreset@v2.." + }, + "inheritConfigureEnvironment": { + "$ref": "#/definitions/testPresets.inheritConfigureEnvironment@v2.." + }, + "configuration": { + "$ref": "#/definitions/testPresets.configuration@v2.." + }, + "overwriteConfigurationFile": { + "$ref": "#/definitions/testPresets.overwriteConfigurationFile@v2.." + }, + "output": { + "$ref": "#/definitions/testPresets.output@v6..v9" + }, + "filter": { + "$ref": "#/definitions/testPresets.filter@v2..v9" + }, + "execution": { + "$ref": "#/definitions/testPresets.execution@v2..v9" + } + }, + "required": [ + "name" + ] + } + }, + "testPresets@v10": { + "type": "array", + "description": "An optional array of test preset objects. Used to specify arguments to ctest.", + "items": { + "type": "object", + "description": "A test preset object.", + "unevaluatedProperties": false, + "properties": { + "name": { + "$ref": "#/definitions/testPresets.name@v2.." + }, + "hidden": { + "$ref": "#/definitions/testPresets.hidden@v2.." + }, + "inherits": { + "$ref": "#/definitions/testPresets.inherits@v2.." + }, + "condition": { + "$ref": "#/definitions/testPresets.condition@v10.." + }, + "vendor": { + "$ref": "#/definitions/testPresets.vendor@v2.." + }, + "displayName": { + "$ref": "#/definitions/testPresets.displayName@v2.." + }, + "description": { + "$ref": "#/definitions/testPresets.description@v2.." + }, + "environment": { + "$ref": "#/definitions/testPresets.environment@v2.." + }, + "configurePreset": { + "$ref": "#/definitions/testPresets.configurePreset@v2.." + }, + "inheritConfigureEnvironment": { + "$ref": "#/definitions/testPresets.inheritConfigureEnvironment@v2.." + }, + "configuration": { + "$ref": "#/definitions/testPresets.configuration@v2.." + }, + "overwriteConfigurationFile": { + "$ref": "#/definitions/testPresets.overwriteConfigurationFile@v2.." + }, + "output": { + "$ref": "#/definitions/testPresets.output@v10.." + }, + "filter": { + "$ref": "#/definitions/testPresets.filter@v10.." + }, + "execution": { + "$ref": "#/definitions/testPresets.execution@v10" + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + }, + "required": [ + "name" + ] + } + }, + "testPresets@v11": { + "type": "array", + "description": "An optional array of test preset objects. Used to specify arguments to ctest.", + "items": { + "type": "object", + "description": "A test preset object.", + "unevaluatedProperties": false, + "properties": { + "name": { + "$ref": "#/definitions/testPresets.name@v2.." + }, + "hidden": { + "$ref": "#/definitions/testPresets.hidden@v2.." + }, + "inherits": { + "$ref": "#/definitions/testPresets.inherits@v2.." + }, + "condition": { + "$ref": "#/definitions/testPresets.condition@v10.." + }, + "vendor": { + "$ref": "#/definitions/testPresets.vendor@v2.." + }, + "displayName": { + "$ref": "#/definitions/testPresets.displayName@v2.." + }, + "description": { + "$ref": "#/definitions/testPresets.description@v2.." + }, + "environment": { + "$ref": "#/definitions/testPresets.environment@v2.." + }, + "configurePreset": { + "$ref": "#/definitions/testPresets.configurePreset@v2.." + }, + "inheritConfigureEnvironment": { + "$ref": "#/definitions/testPresets.inheritConfigureEnvironment@v2.." + }, + "configuration": { + "$ref": "#/definitions/testPresets.configuration@v2.." + }, + "overwriteConfigurationFile": { + "$ref": "#/definitions/testPresets.overwriteConfigurationFile@v2.." + }, + "output": { + "$ref": "#/definitions/testPresets.output@v10.." + }, + "filter": { + "$ref": "#/definitions/testPresets.filter@v10.." + }, + "execution": { + "$ref": "#/definitions/testPresets.execution@v11" + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + }, + "required": [ + "name" + ] + } + }, + "testPresets@v12": { + "type": "array", + "description": "An optional array of test preset objects. Used to specify arguments to ctest.", + "items": { + "type": "object", + "description": "A test preset object.", + "unevaluatedProperties": false, + "properties": { + "name": { + "$ref": "#/definitions/testPresets.name@v2.." + }, + "hidden": { + "$ref": "#/definitions/testPresets.hidden@v2.." + }, + "inherits": { + "$ref": "#/definitions/testPresets.inherits@v2.." + }, + "condition": { + "$ref": "#/definitions/testPresets.condition@v10.." + }, + "vendor": { + "$ref": "#/definitions/testPresets.vendor@v2.." + }, + "displayName": { + "$ref": "#/definitions/testPresets.displayName@v2.." + }, + "description": { + "$ref": "#/definitions/testPresets.description@v2.." + }, + "environment": { + "$ref": "#/definitions/testPresets.environment@v2.." + }, + "configurePreset": { + "$ref": "#/definitions/testPresets.configurePreset@v2.." + }, + "inheritConfigureEnvironment": { + "$ref": "#/definitions/testPresets.inheritConfigureEnvironment@v2.." + }, + "configuration": { + "$ref": "#/definitions/testPresets.configuration@v2.." + }, + "overwriteConfigurationFile": { + "$ref": "#/definitions/testPresets.overwriteConfigurationFile@v2.." + }, + "output": { + "$ref": "#/definitions/testPresets.output@v10.." + }, + "filter": { + "$ref": "#/definitions/testPresets.filter@v10.." + }, + "execution": { + "$ref": "#/definitions/testPresets.execution@v12" + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + }, + "required": [ + "name" + ] + } + }, + "testPresets.name@v2..": { + "type": "string", + "minLength": 1, + "description": "A required string representing the machine-friendly name of the preset. This identifier is used in the ctest --preset option. There must not be two test presets in the union of CMakePresets.json and CMakeUserPresets.json in the same directory with the same name. However, a test preset may have the same name as a configure, build, package, or workflow preset." + }, + "testPresets.hidden@v2..": { + "type": "boolean", + "description": "An optional boolean specifying whether or not a preset should be hidden. If a preset is hidden, it cannot be used in the --preset argument and does not have to have a valid configurePreset, even from inheritance. hidden presets are intended to be used as a base for other presets to inherit via the inherits field." + }, + "testPresets.inherits@v2..": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "description": "An optional string representing the name of the preset from which to inherit." + }, + { + "type": "array", + "description": "An optional array of strings representing the names of presets from which to inherit. The preset will inherit all of the fields from the inherits presets by default (except name, hidden, inherits, description, and displayName), but can override them as desired. If multiple inherits presets provide conflicting values for the same field, the earlier preset in the inherits list will be preferred. Presets in CMakePresets.json must not inherit from presets in CMakeUserPresets.json.", + "items": { + "type": "string", + "minLength": 1, + "description": "An optional string representing the name of the preset from which to inherit." + } + } + ] + }, + "testPresets.condition@v3..v9": { + "anyOf": [ + { + "$ref": "#/definitions/condition@v3..v9" + }, + { + "type": "null", + "description": "Null indicates that the condition always evaluates to true and is not inherited." + } + ] + }, + "testPresets.condition@v10..": { + "anyOf": [ + { + "$ref": "#/definitions/condition@v10.." + }, + { + "type": "null", + "description": "Null indicates that the condition always evaluates to true and is not inherited." + } + ] + }, + "testPresets.vendor@v2..": { + "type": "object", + "minLength": 1, + "description": "An optional map containing vendor-specific information. CMake does not interpret the contents of this field except to verify that it is a map if it does exist. However, it should follow the same conventions as the root-level vendor field.", + "properties": {} + }, + "testPresets.displayName@v2..": { + "type": "string", + "description": "An optional string with a human-friendly name of the preset." + }, + "testPresets.description@v2..": { + "type": "string", + "description": "An optional string with a human-friendly description of the preset." + }, + "testPresets.environment@v2..": { + "type": "object", + "description": "An optional map of environment variables. The key is the variable name (which must not be an empty string). Each variable is set regardless of whether or not a value was given to it by the process's environment. This field supports macro expansion, and environment variables in this map may reference each other, and may be listed in any order, as long as such references do not cause a cycle (for example,if ENV_1 is $env{ENV_2}, ENV_2 may not be $env{ENV_1}.) Environment variables are inherited through the inherits field, and the preset's environment will be the union of its own environment and the environment from all its parents. If multiple presets in this union define the same variable, the standard rules of inherits are applied. Setting a variable to null causes it to not be set, even if a value was inherited from another preset.", + "propertyNames": { + "pattern": "^.+$" + }, + "properties": {}, + "additionalProperties": { + "anyOf": [ + { + "type": "null", + "description": "Setting a variable to null causes it to not be set, even if a value was inherited from another preset." + }, + { + "type": "string", + "description": "A string representing the value of the variable." + } + ] + } + }, + "testPresets.configurePreset@v2..": { + "type": "string", + "minLength": 1, + "description": "An optional string specifying the name of a configure preset to associate with this test preset. If configurePreset is not specified, it must be inherited from the inherits preset (unless this preset is hidden). The build directory is inferred from the configure preset." + }, + "testPresets.inheritConfigureEnvironment@v2..": { + "type": "boolean", + "description": "An optional boolean that defaults to true. If true, the environment variables from the associated configure preset are inherited after all inherited test preset environments, but before environment variables explicitly specified in this test preset." + }, + "testPresets.configuration@v2..": { + "type": "string", + "description": "An optional string. Equivalent to passing --build-config on the command line." + }, + "testPresets.overwriteConfigurationFile@v2..": { + "type": "array", + "description": "An optional array of configuration options to overwrite options specified in the CTest configuration file. Equivalent to passing ``--overwrite`` for each value in the array.", + "items": { + "type": "string", + "description": "An option written as a key-value pair in the form \"key=value\"." + } + }, + "testPresets.output@v2..v4": { + "type": "object", + "description": "An optional object specifying output options.", + "unevaluatedProperties": false, + "properties": { + "shortProgress": { + "$ref": "#/definitions/testPresets.output.shortProgress@v2.." + }, + "verbosity": { + "$ref": "#/definitions/testPresets.output.verbosity@v2.." + }, + "debug": { + "$ref": "#/definitions/testPresets.output.debug@v2.." + }, + "outputOnFailure": { + "$ref": "#/definitions/testPresets.output.outputOnFailure@v2.." + }, + "quiet": { + "$ref": "#/definitions/testPresets.output.quiet@v2.." + }, + "outputLogFile": { + "$ref": "#/definitions/testPresets.output.outputLogFile@v2.." + }, + "labelSummary": { + "$ref": "#/definitions/testPresets.output.labelSummary@v2.." + }, + "subprojectSummary": { + "$ref": "#/definitions/testPresets.output.subprojectSummary@v2.." + }, + "maxPassedTestOutputSize": { + "$ref": "#/definitions/testPresets.output.maxPassedTestOutputSize@v2.." + }, + "maxFailedTestOutputSize": { + "$ref": "#/definitions/testPresets.output.maxFailedTestOutputSize@v2.." + }, + "maxTestNameWidth": { + "$ref": "#/definitions/testPresets.output.maxTestNameWidth@v2.." + } + } + }, + "testPresets.output@v5": { + "type": "object", + "description": "An optional object specifying output options.", + "unevaluatedProperties": false, + "properties": { + "shortProgress": { + "$ref": "#/definitions/testPresets.output.shortProgress@v2.." + }, + "verbosity": { + "$ref": "#/definitions/testPresets.output.verbosity@v2.." + }, + "debug": { + "$ref": "#/definitions/testPresets.output.debug@v2.." + }, + "outputOnFailure": { + "$ref": "#/definitions/testPresets.output.outputOnFailure@v2.." + }, + "quiet": { + "$ref": "#/definitions/testPresets.output.quiet@v2.." + }, + "outputLogFile": { + "$ref": "#/definitions/testPresets.output.outputLogFile@v2.." + }, + "labelSummary": { + "$ref": "#/definitions/testPresets.output.labelSummary@v2.." + }, + "subprojectSummary": { + "$ref": "#/definitions/testPresets.output.subprojectSummary@v2.." + }, + "maxPassedTestOutputSize": { + "$ref": "#/definitions/testPresets.output.maxPassedTestOutputSize@v2.." + }, + "maxFailedTestOutputSize": { + "$ref": "#/definitions/testPresets.output.maxFailedTestOutputSize@v2.." + }, + "testOutputTruncation": { + "$ref": "#/definitions/testPresets.output.testOutputTruncation@v5.." + }, + "maxTestNameWidth": { + "$ref": "#/definitions/testPresets.output.maxTestNameWidth@v2.." + } + } + }, + "testPresets.output@v6..v9": { + "type": "object", + "description": "An optional object specifying output options.", + "unevaluatedProperties": false, + "properties": { + "shortProgress": { + "$ref": "#/definitions/testPresets.output.shortProgress@v2.." + }, + "verbosity": { + "$ref": "#/definitions/testPresets.output.verbosity@v2.." + }, + "debug": { + "$ref": "#/definitions/testPresets.output.debug@v2.." + }, + "outputOnFailure": { + "$ref": "#/definitions/testPresets.output.outputOnFailure@v2.." + }, + "quiet": { + "$ref": "#/definitions/testPresets.output.quiet@v2.." + }, + "outputLogFile": { + "$ref": "#/definitions/testPresets.output.outputLogFile@v2.." + }, + "outputJUnitFile": { + "$ref": "#/definitions/testPresets.output.outputJUnitFile@v6.." + }, + "labelSummary": { + "$ref": "#/definitions/testPresets.output.labelSummary@v2.." + }, + "subprojectSummary": { + "$ref": "#/definitions/testPresets.output.subprojectSummary@v2.." + }, + "maxPassedTestOutputSize": { + "$ref": "#/definitions/testPresets.output.maxPassedTestOutputSize@v2.." + }, + "maxFailedTestOutputSize": { + "$ref": "#/definitions/testPresets.output.maxFailedTestOutputSize@v2.." + }, + "testOutputTruncation": { + "$ref": "#/definitions/testPresets.output.testOutputTruncation@v5.." + }, + "maxTestNameWidth": { + "$ref": "#/definitions/testPresets.output.maxTestNameWidth@v2.." + } + } + }, + "testPresets.output@v10..": { + "type": "object", + "description": "An optional object specifying output options.", + "unevaluatedProperties": false, + "properties": { + "shortProgress": { + "$ref": "#/definitions/testPresets.output.shortProgress@v2.." + }, + "verbosity": { + "$ref": "#/definitions/testPresets.output.verbosity@v2.." + }, + "debug": { + "$ref": "#/definitions/testPresets.output.debug@v2.." + }, + "outputOnFailure": { + "$ref": "#/definitions/testPresets.output.outputOnFailure@v2.." + }, + "quiet": { + "$ref": "#/definitions/testPresets.output.quiet@v2.." + }, + "outputLogFile": { + "$ref": "#/definitions/testPresets.output.outputLogFile@v2.." + }, + "outputJUnitFile": { + "$ref": "#/definitions/testPresets.output.outputJUnitFile@v6.." + }, + "labelSummary": { + "$ref": "#/definitions/testPresets.output.labelSummary@v2.." + }, + "subprojectSummary": { + "$ref": "#/definitions/testPresets.output.subprojectSummary@v2.." + }, + "maxPassedTestOutputSize": { + "$ref": "#/definitions/testPresets.output.maxPassedTestOutputSize@v2.." + }, + "maxFailedTestOutputSize": { + "$ref": "#/definitions/testPresets.output.maxFailedTestOutputSize@v2.." + }, + "testOutputTruncation": { + "$ref": "#/definitions/testPresets.output.testOutputTruncation@v5.." + }, + "maxTestNameWidth": { + "$ref": "#/definitions/testPresets.output.maxTestNameWidth@v2.." + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + } + }, + "testPresets.output.shortProgress@v2..": { + "type": "boolean", + "description": "An optional boolean. If true, equivalent to passing --progress on the command line." + }, + "testPresets.output.verbosity@v2..": { + "type": "string", + "enum": [ + "default", + "verbose", + "extra" + ], + "description": "An optional string specifying verbosity level. Valid values are \"default\" (equivalent to passing no verbosity flags on the command line), \"verbose\" (equivalent to passing --verbose on the command line), and \"extra\" (equivalent to passing --extra-verbose on the command line)." + }, + "testPresets.output.debug@v2..": { + "type": "boolean", + "description": "An optional boolean. If true, equivalent to passing --debug on the command line." + }, + "testPresets.output.outputOnFailure@v2..": { + "type": "boolean", + "description": "An optional boolean. If true, equivalent to passing --output-on-failure on the command line." + }, + "testPresets.output.quiet@v2..": { + "type": "boolean", + "description": "An optional boolean. If true, equivalent to passing --quiet on the command line." + }, + "testPresets.output.outputLogFile@v2..": { + "type": "string", + "description": "An optional string specifying a path to a log file. Equivalent to passing --output-log on the command line." + }, + "testPresets.output.outputJUnitFile@v6..": { + "type": "string", + "description": "An optional string specifying a path to a JUnit file. Equivalent to passing --output-junit on the command line." + }, + "testPresets.output.labelSummary@v2..": { + "type": "boolean", + "description": "An optional boolean. If false, equivalent to passing --no-label-summary on the command line." + }, + "testPresets.output.subprojectSummary@v2..": { + "type": "boolean", + "description": "An optional boolean. If false, equivalent to passing --no-subproject-summary on the command line." + }, + "testPresets.output.maxPassedTestOutputSize@v2..": { + "type": "integer", + "description": "An optional integer specifying the maximum output for passed tests in bytes. Equivalent to passing --test-output-size-passed on the command line." + }, + "testPresets.output.maxFailedTestOutputSize@v2..": { + "type": "integer", + "description": "An optional integer specifying the maximum output for failed tests in bytes. Equivalent to passing --test-output-size-failed on the command line." + }, + "testPresets.output.testOutputTruncation@v5..": { + "type": "string", + "enum": [ + "tail", + "middle", + "head" + ], + "description": "An optional string specifying the test output truncation mode. Equivalent to passing --test-output-truncation on the command line. Must be one of the following values: \"tail\", \"middle\", or \"head\"." + }, + "testPresets.output.maxTestNameWidth@v2..": { + "type": "integer", + "description": "An optional integer specifying the maximum width of a test name to output. Equivalent to passing --max-width on the command line." + }, + "testPresets.filter@v2..v9": { + "type": "object", + "description": "An optional object specifying how to filter the tests to run.", + "properties": { + "include": { + "$ref": "#/definitions/testPresets.filter.include@v2..v9" + }, + "exclude": { + "$ref": "#/definitions/testPresets.filter.exclude@v2..v9" + } + } + }, + "testPresets.filter@v10..": { + "type": "object", + "description": "An optional object specifying how to filter the tests to run.", + "properties": { + "include": { + "$ref": "#/definitions/testPresets.filter.include@v10.." + }, + "exclude": { + "$ref": "#/definitions/testPresets.filter.exclude@v10.." + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + } + }, + "testPresets.filter.include@v2..v9": { + "type": "object", + "description": "An optional object specifying which tests to include.", + "properties": { + "name": { + "$ref": "#/definitions/testPresets.filter.include.name@v2.." + }, + "label": { + "$ref": "#/definitions/testPresets.filter.include.label@v2.." + }, + "useUnion": { + "$ref": "#/definitions/testPresets.filter.include.useUnion@v2.." + }, + "index": { + "$ref": "#/definitions/testPresets.filter.include.index@v2..v9" + } + } + }, + "testPresets.filter.include@v10..": { + "type": "object", + "description": "An optional object specifying which tests to include.", + "properties": { + "name": { + "$ref": "#/definitions/testPresets.filter.include.name@v2.." + }, + "label": { + "$ref": "#/definitions/testPresets.filter.include.label@v2.." + }, + "useUnion": { + "$ref": "#/definitions/testPresets.filter.include.useUnion@v2.." + }, + "index": { + "$ref": "#/definitions/testPresets.filter.include.index@v10.." + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + } + }, + "testPresets.filter.include.name@v2..": { + "type": "string", + "description": "An optional string specifying a regex for test names. Equivalent to passing --tests-regex on the command line." + }, + "testPresets.filter.include.label@v2..": { + "type": "string", + "description": "An optional string specifying a regex for test labels. Equivalent to passing --label-regex on the command line." + }, + "testPresets.filter.include.useUnion@v2..": { + "type": "boolean", + "description": "An optional boolean. Equivalent to passing --union on the command line." + }, + "testPresets.filter.include.index@v2..v9": { + "anyOf": [ + { + "type": "string", + "description": "An optional string specifying a file with the command line syntax for --tests-information. Available in version 2 and higher." + }, + { + "type": "object", + "description": "An optional object specifying test preset filters. Available in version 2 and higher.", + "unevaluatedProperties": false, + "properties": { + "start": { + "$ref": "#/definitions/testPresets.filter.include.index.start@v2.." + }, + "end": { + "$ref": "#/definitions/testPresets.filter.include.index.end@v2.." + }, + "stride": { + "$ref": "#/definitions/testPresets.filter.include.index.stride@v2.." + }, + "specificTests": { + "$ref": "#/definitions/testPresets.filter.include.index.specificTests@v2.." + } + } + } + ] + }, + "testPresets.filter.include.index@v10..": { + "anyOf": [ + { + "type": "string", + "description": "An optional string specifying a file with the command line syntax for --tests-information. Available in version 2 and higher." + }, + { + "type": "object", + "description": "An optional object specifying test preset filters. Available in version 2 and higher.", + "unevaluatedProperties": false, + "properties": { + "start": { + "$ref": "#/definitions/testPresets.filter.include.index.start@v2.." + }, + "end": { + "$ref": "#/definitions/testPresets.filter.include.index.end@v2.." + }, + "stride": { + "$ref": "#/definitions/testPresets.filter.include.index.stride@v2.." + }, + "specificTests": { + "$ref": "#/definitions/testPresets.filter.include.index.specificTests@v2.." + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + } + } + ] + }, + "testPresets.filter.include.index.start@v2..": { + "type": "integer", + "description": "An optional integer specifying a test index at which to start testing." + }, + "testPresets.filter.include.index.end@v2..": { + "type": "integer", + "description": "An optional integer specifying a test index at which to stop testing." + }, + "testPresets.filter.include.index.stride@v2..": { + "type": "integer", + "description": "An optional integer specifying the increment." + }, + "testPresets.filter.include.index.specificTests@v2..": { + "type": "array", + "description": "An optional array of integers specifying specific test indices to run.", + "items": { + "type": "integer", + "description": "An integer specifying the test to run by index." + } + }, + "testPresets.filter.exclude@v2..v9": { + "type": "object", + "description": "An optional object specifying which tests to exclude.", + "properties": { + "name": { + "$ref": "#/definitions/testPresets.filter.exclude.name@v2.." + }, + "label": { + "$ref": "#/definitions/testPresets.filter.exclude.label@v2.." + }, + "fixtures": { + "$ref": "#/definitions/testPresets.filter.exclude.fixtures@v2..v9" + } + } + }, + "testPresets.filter.exclude@v10..": { + "type": "object", + "description": "An optional object specifying which tests to exclude.", + "properties": { + "name": { + "$ref": "#/definitions/testPresets.filter.exclude.name@v2.." + }, + "label": { + "$ref": "#/definitions/testPresets.filter.exclude.label@v2.." + }, + "fixtures": { + "$ref": "#/definitions/testPresets.filter.exclude.fixtures@v10.." + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + } + }, + "testPresets.filter.exclude.name@v2..": { + "type": "string", + "description": "An optional string specifying a regex for test names. Equivalent to passing --exclude-regex on the command line." + }, + "testPresets.filter.exclude.label@v2..": { + "type": "string", + "description": "An optional string specifying a regex for test labels. Equivalent to passing --label-exclude on the command line." + }, + "testPresets.filter.exclude.fixtures@v2..v9": { + "type": "object", + "description": "An optional object specifying which fixtures to exclude from adding tests.", + "properties": { + "any": { + "$ref": "#/definitions/testPresets.filter.exclude.fixtures.any@v2.." + }, + "setup": { + "$ref": "#/definitions/testPresets.filter.exclude.fixtures.setup@v2.." + }, + "cleanup": { + "$ref": "#/definitions/testPresets.filter.exclude.fixtures.cleanup@v2.." + } + } + }, + "testPresets.filter.exclude.fixtures@v10..": { + "type": "object", + "description": "An optional object specifying which fixtures to exclude from adding tests.", + "properties": { + "any": { + "$ref": "#/definitions/testPresets.filter.exclude.fixtures.any@v2.." + }, + "setup": { + "$ref": "#/definitions/testPresets.filter.exclude.fixtures.setup@v2.." + }, + "cleanup": { + "$ref": "#/definitions/testPresets.filter.exclude.fixtures.cleanup@v2.." + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + } + }, + "testPresets.filter.exclude.fixtures.any@v2..": { + "type": "string", + "description": "An optional string specifying a regex for text fixtures to exclude from adding any tests. Equivalent to passing --fixture-exclude-any on the command line." + }, + "testPresets.filter.exclude.fixtures.setup@v2..": { + "type": "string", + "description": "An optional string specifying a regex for text fixtures to exclude from adding setup tests. Equivalent to passing --fixture-exclude-setup on the command line." + }, + "testPresets.filter.exclude.fixtures.cleanup@v2..": { + "type": "string", + "description": "An optional string specifying a regex for text fixtures to exclude from adding cleanup tests. Equivalent to passing --fixture-exclude-cleanup on the command line." + }, + "testPresets.execution@v2..v9": { + "type": "object", + "description": "An optional object specifying options for test execution.", + "unevaluatedProperties": false, + "properties": { + "stopOnFailure": { + "$ref": "#/definitions/testPresets.execution.stopOnFailure@v2.." + }, + "enableFailover": { + "$ref": "#/definitions/testPresets.execution.enableFailover@v2.." + }, + "jobs": { + "$ref": "#/definitions/testPresets.execution.jobs@v2..v10" + }, + "resourceSpecFile": { + "$ref": "#/definitions/testPresets.execution.resourceSpecFile@v2.." + }, + "testLoad": { + "$ref": "#/definitions/testPresets.execution.testLoad@v2.." + }, + "showOnly": { + "$ref": "#/definitions/testPresets.execution.showOnly@v2.." + }, + "repeat": { + "$ref": "#/definitions/testPresets.execution.repeat@v2..v9" + }, + "interactiveDebugging": { + "$ref": "#/definitions/testPresets.execution.interactiveDebugging@v2.." + }, + "scheduleRandom": { + "$ref": "#/definitions/testPresets.execution.scheduleRandom@v2.." + }, + "timeout": { + "$ref": "#/definitions/testPresets.execution.timeout@v2.." + }, + "noTestsAction": { + "$ref": "#/definitions/testPresets.execution.noTestsAction@v2.." + } + } + }, + "testPresets.execution@v10": { + "type": "object", + "description": "An optional object specifying options for test execution.", + "unevaluatedProperties": false, + "properties": { + "stopOnFailure": { + "$ref": "#/definitions/testPresets.execution.stopOnFailure@v2.." + }, + "enableFailover": { + "$ref": "#/definitions/testPresets.execution.enableFailover@v2.." + }, + "jobs": { + "$ref": "#/definitions/testPresets.execution.jobs@v2..v10" + }, + "resourceSpecFile": { + "$ref": "#/definitions/testPresets.execution.resourceSpecFile@v2.." + }, + "testLoad": { + "$ref": "#/definitions/testPresets.execution.testLoad@v2.." + }, + "showOnly": { + "$ref": "#/definitions/testPresets.execution.showOnly@v2.." + }, + "repeat": { + "$ref": "#/definitions/testPresets.execution.repeat@v10.." + }, + "interactiveDebugging": { + "$ref": "#/definitions/testPresets.execution.interactiveDebugging@v2.." + }, + "scheduleRandom": { + "$ref": "#/definitions/testPresets.execution.scheduleRandom@v2.." + }, + "timeout": { + "$ref": "#/definitions/testPresets.execution.timeout@v2.." + }, + "noTestsAction": { + "$ref": "#/definitions/testPresets.execution.noTestsAction@v2.." + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + } + }, + "testPresets.execution@v11": { + "type": "object", + "description": "An optional object specifying options for test execution.", + "unevaluatedProperties": false, + "properties": { + "stopOnFailure": { + "$ref": "#/definitions/testPresets.execution.stopOnFailure@v2.." + }, + "enableFailover": { + "$ref": "#/definitions/testPresets.execution.enableFailover@v2.." + }, + "jobs": { + "$ref": "#/definitions/testPresets.execution.jobs@v11.." + }, + "resourceSpecFile": { + "$ref": "#/definitions/testPresets.execution.resourceSpecFile@v2.." + }, + "testLoad": { + "$ref": "#/definitions/testPresets.execution.testLoad@v2.." + }, + "showOnly": { + "$ref": "#/definitions/testPresets.execution.showOnly@v2.." + }, + "repeat": { + "$ref": "#/definitions/testPresets.execution.repeat@v10.." + }, + "interactiveDebugging": { + "$ref": "#/definitions/testPresets.execution.interactiveDebugging@v2.." + }, + "scheduleRandom": { + "$ref": "#/definitions/testPresets.execution.scheduleRandom@v2.." + }, + "timeout": { + "$ref": "#/definitions/testPresets.execution.timeout@v2.." + }, + "noTestsAction": { + "$ref": "#/definitions/testPresets.execution.noTestsAction@v2.." + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + } + }, + "testPresets.execution@v12": { + "type": "object", + "description": "An optional object specifying options for test execution.", + "unevaluatedProperties": false, + "properties": { + "stopOnFailure": { + "$ref": "#/definitions/testPresets.execution.stopOnFailure@v2.." + }, + "enableFailover": { + "$ref": "#/definitions/testPresets.execution.enableFailover@v2.." + }, + "jobs": { + "$ref": "#/definitions/testPresets.execution.jobs@v11.." + }, + "resourceSpecFile": { + "$ref": "#/definitions/testPresets.execution.resourceSpecFile@v2.." + }, + "testLoad": { + "$ref": "#/definitions/testPresets.execution.testLoad@v2.." + }, + "showOnly": { + "$ref": "#/definitions/testPresets.execution.showOnly@v2.." + }, + "repeat": { + "$ref": "#/definitions/testPresets.execution.repeat@v10.." + }, + "interactiveDebugging": { + "$ref": "#/definitions/testPresets.execution.interactiveDebugging@v2.." + }, + "scheduleRandom": { + "$ref": "#/definitions/testPresets.execution.scheduleRandom@v2.." + }, + "timeout": { + "$ref": "#/definitions/testPresets.execution.timeout@v2.." + }, + "noTestsAction": { + "$ref": "#/definitions/testPresets.execution.noTestsAction@v2.." + }, + "testPassthroughArguments": { + "$ref": "#/definitions/testPresets.execution.testPassthroughArguments@v12" + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + } + }, + "testPresets.execution.stopOnFailure@v2..": { + "type": "boolean", + "description": "An optional boolean. If true, equivalent to passing --stop-on-failure on the command line." + }, + "testPresets.execution.enableFailover@v2..": { + "type": "boolean", + "description": "An optional boolean. If true, equivalent to passing -F on the command line." + }, + "testPresets.execution.jobs@v2..v10": { + "minimum": 0, + "type": "integer", + "description": "An optional non-negative integer. Equivalent to passing --parallel or -j on the command line." + }, + "testPresets.execution.jobs@v11..": { + "anyOf": [ + { + "type": "integer", + "minimum": 0, + "description": "An optional non-negative integer. Equivalent to passing --parallel or -j on the command line." + }, + { + "type": "string", + "minLength": 0, + "maxLength": 0, + "description": "An optional string. Equivalent to passing --parallel or -j on the command line with the number of jobs omitted." + } + ] + }, + "testPresets.execution.resourceSpecFile@v2..": { + "type": "string", + "description": "An optional string. Equivalent to passing --resource-spec-file on the command line." + }, + "testPresets.execution.testLoad@v2..": { + "type": "integer", + "description": "An optional integer. Equivalent to passing --test-load on the command line." + }, + "testPresets.execution.showOnly@v2..": { + "type": "string", + "enum": [ + "human", + "json-v1" + ], + "description": "An optional string. Equivalent to passing --show-only on the command line. Value must be \"human\" or \"json-v1\"." + }, + "testPresets.execution.repeat@v2..v9": { + "type": "object", + "description": "An optional object specifying how to repeat tests. Equivalent to passing --repeat on the command line.", + "unevaluatedProperties": false, + "properties": { + "mode": { + "$ref": "#/definitions/testPresets.execution.repeat.mode@v2.." + }, + "count": { + "$ref": "#/definitions/testPresets.execution.repeat.count@v2.." + } + }, + "required": [ + "mode", + "count" + ] + }, + "testPresets.execution.repeat@v10..": { + "type": "object", + "description": "An optional object specifying how to repeat tests. Equivalent to passing --repeat on the command line.", + "unevaluatedProperties": false, + "properties": { + "mode": { + "$ref": "#/definitions/testPresets.execution.repeat.mode@v2.." + }, + "count": { + "$ref": "#/definitions/testPresets.execution.repeat.count@v2.." + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + }, + "required": [ + "mode", + "count" + ] + }, + "testPresets.execution.repeat.mode@v2..": { + "type": "string", + "enum": [ + "until-fail", + "until-pass", + "after-timeout" + ], + "description": "A required string. Must be one of the following values: \"until-fail\", \"until-pass\", or \"after-timeout\"." + }, + "testPresets.execution.repeat.count@v2..": { + "type": "integer", + "description": "A required integer." + }, + "testPresets.execution.interactiveDebugging@v2..": { + "type": "boolean", + "description": "An optional boolean. If true, equivalent to passing --interactive-debug-mode 1 on the command line. If false, equivalent to passing --interactive-debug-mode 0 on the command line." + }, + "testPresets.execution.scheduleRandom@v2..": { + "type": "boolean", + "description": "An optional boolean. If true, equivalent to passing --schedule-random on the command line." + }, + "testPresets.execution.timeout@v2..": { + "type": "integer", + "description": "An optional integer. Equivalent to passing --timeout on the command line." + }, + "testPresets.execution.noTestsAction@v2..": { + "type": "string", + "enum": [ + "default", + "error", + "ignore" + ], + "description": "An optional string specifying the behavior if no tests are found. Must be one of the following values: \"default\" (equivalent to not passing any value on the command line), \"error\" (equivalent to passing --no-tests=error on the command line), or \"ignore\" (equivalent to passing --no-tests-ignore on the command line)." + }, + "testPresets.execution.testPassthroughArguments@v12": { + "type": "array", + "description": "An optional array of strings. Each element is forwarded as an argument to every test executable. Equivalent to passing arguments after -- on the ctest command line.", + "items": { + "type": "string" + } + }, + "packagePresets@v6..v9": { + "type": "array", + "description": "An optional array of package preset objects. Used to specify arguments to cpack.", + "items": { + "type": "object", + "description": "A package preset object.", + "unevaluatedProperties": false, + "properties": { + "name": { + "$ref": "#/definitions/packagePresets.name@v6.." + }, + "hidden": { + "$ref": "#/definitions/packagePresets.hidden@v6.." + }, + "inherits": { + "$ref": "#/definitions/packagePresets.inherits@v6.." + }, + "condition": { + "$ref": "#/definitions/packagePresets.condition@v6..v9" + }, + "vendor": { + "$ref": "#/definitions/packagePresets.vendor@v6.." + }, + "displayName": { + "$ref": "#/definitions/packagePresets.displayName@v6.." + }, + "description": { + "$ref": "#/definitions/packagePresets.description@v6.." + }, + "environment": { + "$ref": "#/definitions/packagePresets.environment@v6.." + }, + "configurePreset": { + "$ref": "#/definitions/packagePresets.configurePreset@v6.." + }, + "inheritConfigureEnvironment": { + "$ref": "#/definitions/packagePresets.inheritConfigureEnvironment@v6.." + }, + "generators": { + "$ref": "#/definitions/packagePresets.generators@v6.." + }, + "configurations": { + "$ref": "#/definitions/packagePresets.configurations@v6.." + }, + "variables": { + "$ref": "#/definitions/packagePresets.variables@v6.." + }, + "configFile": { + "$ref": "#/definitions/packagePresets.configFile@v6.." + }, + "output": { + "$ref": "#/definitions/packagePresets.output@v6..v9" + }, + "packageName": { + "$ref": "#/definitions/packagePresets.packageName@v6.." + }, + "packageVersion": { + "$ref": "#/definitions/packagePresets.packageVersion@v6.." + }, + "packageDirectory": { + "$ref": "#/definitions/packagePresets.packageDirectory@v6.." + }, + "vendorName": { + "$ref": "#/definitions/packagePresets.vendorName@v6.." + } + }, + "required": [ + "name" + ] + } + }, + "packagePresets@v10..": { + "type": "array", + "description": "An optional array of package preset objects. Used to specify arguments to cpack.", + "items": { + "type": "object", + "description": "A package preset object.", + "unevaluatedProperties": false, + "properties": { + "name": { + "$ref": "#/definitions/packagePresets.name@v6.." + }, + "hidden": { + "$ref": "#/definitions/packagePresets.hidden@v6.." + }, + "inherits": { + "$ref": "#/definitions/packagePresets.inherits@v6.." + }, + "condition": { + "$ref": "#/definitions/packagePresets.condition@v10.." + }, + "vendor": { + "$ref": "#/definitions/packagePresets.vendor@v6.." + }, + "displayName": { + "$ref": "#/definitions/packagePresets.displayName@v6.." + }, + "description": { + "$ref": "#/definitions/packagePresets.description@v6.." + }, + "environment": { + "$ref": "#/definitions/packagePresets.environment@v6.." + }, + "configurePreset": { + "$ref": "#/definitions/packagePresets.configurePreset@v6.." + }, + "inheritConfigureEnvironment": { + "$ref": "#/definitions/packagePresets.inheritConfigureEnvironment@v6.." + }, + "generators": { + "$ref": "#/definitions/packagePresets.generators@v6.." + }, + "configurations": { + "$ref": "#/definitions/packagePresets.configurations@v6.." + }, + "variables": { + "$ref": "#/definitions/packagePresets.variables@v6.." + }, + "configFile": { + "$ref": "#/definitions/packagePresets.configFile@v6.." + }, + "output": { + "$ref": "#/definitions/packagePresets.output@v10.." + }, + "packageName": { + "$ref": "#/definitions/packagePresets.packageName@v6.." + }, + "packageVersion": { + "$ref": "#/definitions/packagePresets.packageVersion@v6.." + }, + "packageDirectory": { + "$ref": "#/definitions/packagePresets.packageDirectory@v6.." + }, + "vendorName": { + "$ref": "#/definitions/packagePresets.vendorName@v6.." + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + }, + "required": [ + "name" + ] + } + }, + "packagePresets.name@v6..": { + "type": "string", + "minLength": 1, + "description": "A required string representing the machine-friendly name of the preset. This identifier is used in the cpack --preset option. There must not be two package presets in the union of CMakePresets.json and CMakeUserPresets.json in the same directory with the same name. However, a package preset may have the same name as a configure, build, test, or workflow preset." + }, + "packagePresets.hidden@v6..": { + "type": "boolean", + "description": "An optional boolean specifying whether or not a preset should be hidden. If a preset is hidden, it cannot be used in the --preset argument and does not have to have a valid configurePreset, even from inheritance. hidden presets are intended to be used as a base for other presets to inherit via the inherits field." + }, + "packagePresets.inherits@v6..": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "description": "An optional string representing the name of the preset from which to inherit." + }, + { + "type": "array", + "description": "An optional array of strings representing the names of presets from which to inherit. The preset will inherit all of the fields from the inherits presets by default (except name, hidden, inherits, description, and displayName), but can override them as desired. If multiple inherits presets provide conflicting values for the same field, the earlier preset in the inherits list will be preferred. Presets in CMakePresets.json must not inherit from presets in CMakeUserPresets.json.", + "items": { + "type": "string", + "minLength": 1, + "description": "An optional string representing the name of the preset from which to inherit." + } + } + ] + }, + "packagePresets.condition@v6..v9": { + "anyOf": [ + { + "$ref": "#/definitions/condition@v3..v9" + }, + { + "type": "null", + "description": "Null indicates that the condition always evaluates to true and is not inherited." + } + ] + }, + "packagePresets.condition@v10..": { + "anyOf": [ + { + "$ref": "#/definitions/condition@v10.." + }, + { + "type": "null", + "description": "Null indicates that the condition always evaluates to true and is not inherited." + } + ] + }, + "packagePresets.vendor@v6..": { + "type": "object", + "minLength": 1, + "description": "An optional map containing vendor-specific information. CMake does not interpret the contents of this field except to verify that it is a map if it does exist. However, it should follow the same conventions as the root-level vendor field.", + "properties": {} + }, + "packagePresets.displayName@v6..": { + "type": "string", + "description": "An optional string with a human-friendly name of the preset." + }, + "packagePresets.description@v6..": { + "type": "string", + "description": "An optional string with a human-friendly description of the preset." + }, + "packagePresets.environment@v6..": { + "type": "object", + "description": "An optional map of environment variables. The key is the variable name (which must not be an empty string). Each variable is set regardless of whether or not a value was given to it by the process's environment. This field supports macro expansion, and environment variables in this map may reference each other, and may be listed in any order, as long as such references do not cause a cycle (for example,if ENV_1 is $env{ENV_2}, ENV_2 may not be $env{ENV_1}.) Environment variables are inherited through the inherits field, and the preset's environment will be the union of its own environment and the environment from all its parents. If multiple presets in this union define the same variable, the standard rules of inherits are applied. Setting a variable to null causes it to not be set, even if a value was inherited from another preset.", + "propertyNames": { + "pattern": "^.+$" + }, + "properties": {}, + "additionalProperties": { + "anyOf": [ + { + "type": "null", + "description": "Setting a variable to null causes it to not be set, even if a value was inherited from another preset." + }, + { + "type": "string", + "description": "A string representing the value of the variable." + } + ] + } + }, + "packagePresets.configurePreset@v6..": { + "type": "string", + "minLength": 1, + "description": "An optional string specifying the name of a configure preset to associate with this package preset. If configurePreset is not specified, it must be inherited from the inherits preset (unless this preset is hidden). The build tree directory is inferred from the configure preset." + }, + "packagePresets.inheritConfigureEnvironment@v6..": { + "type": "boolean", + "description": "An optional boolean that defaults to true. If true, the environment variables from the associated configure preset are inherited after all inherited package preset environments, but before environment variables explicitly specified in this package preset." + }, + "packagePresets.generators@v6..": { + "type": "array", + "description": "An optional array of strings representing generators for CPack to use.", + "items": { + "type": "string", + "description": "An optional string representing the name of a CPack generator to use." + } + }, + "packagePresets.configurations@v6..": { + "type": "array", + "description": "An optional array of strings representing build configurations for CPack to package.", + "items": { + "type": "string", + "description": "An optional string representing the name of a configuration to package." + } + }, + "packagePresets.variables@v6..": { + "type": "object", + "description": "An optional map of variables to pass to CPack, equivalent to -D arguments. Each key is the name of a variable, and the value is the string to assign to that variable.", + "propertyNames": { + "pattern": "^.+$" + }, + "properties": {}, + "additionalProperties": { + "type": "string", + "description": "An optional string representing the value of the variable." + } + }, + "packagePresets.configFile@v6..": { + "type": "string", + "description": "An optional string representing the config file for CPack to use." + }, + "packagePresets.output@v6..v9": { + "type": "object", + "description": "An optional object specifying output options.", + "unevaluatedProperties": false, + "properties": { + "debug": { + "$ref": "#/definitions/packagePresets.output.debug@v6.." + }, + "verbose": { + "$ref": "#/definitions/packagePresets.output.verbose@v6.." + } + } + }, + "packagePresets.output@v10..": { + "type": "object", + "description": "An optional object specifying output options.", + "unevaluatedProperties": false, + "properties": { + "debug": { + "$ref": "#/definitions/packagePresets.output.debug@v6.." + }, + "verbose": { + "$ref": "#/definitions/packagePresets.output.verbose@v6.." + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + } + }, + "packagePresets.output.debug@v6..": { + "type": "boolean", + "description": "An optional boolean specifying whether or not to print debug information. A value of true is equivalent to passing --debug on the command line." + }, + "packagePresets.output.verbose@v6..": { + "type": "boolean", + "description": "An optional boolean specifying whether or not to print verbosely. A value of true is equivalent to passing --verbose on the command line." + }, + "packagePresets.packageName@v6..": { + "type": "string", + "description": "An optional string representing the package name." + }, + "packagePresets.packageVersion@v6..": { + "type": "string", + "description": "An optional string representing the package version." + }, + "packagePresets.packageDirectory@v6..": { + "type": "string", + "description": "An optional string representing the directory in which to place the package." + }, + "packagePresets.vendorName@v6..": { + "type": "string", + "description": "An optional string representing the vendor name." + }, + "workflowPresets@v6..v9": { + "type": "array", + "description": "An optional array of workflow preset objects. Used to execute configure, build, test, and package presets in order.", + "items": { + "type": "object", + "description": "A workflow preset object.", + "unevaluatedProperties": false, + "properties": { + "name": { + "$ref": "#/definitions/workflowPresets.name@v6.." + }, + "vendor": { + "$ref": "#/definitions/workflowPresets.vendor@v6.." + }, + "displayName": { + "$ref": "#/definitions/workflowPresets.displayName@v6.." + }, + "description": { + "$ref": "#/definitions/workflowPresets.description@v6.." + }, + "steps": { + "$ref": "#/definitions/workflowPresets.steps@v6..v9" + } + }, + "required": [ + "name", + "steps" + ] + } + }, + "workflowPresets@v10..": { + "type": "array", + "description": "An optional array of workflow preset objects. Used to execute configure, build, test, and package presets in order.", + "items": { + "type": "object", + "description": "A workflow preset object.", + "unevaluatedProperties": false, + "properties": { + "name": { + "$ref": "#/definitions/workflowPresets.name@v6.." + }, + "vendor": { + "$ref": "#/definitions/workflowPresets.vendor@v6.." + }, + "displayName": { + "$ref": "#/definitions/workflowPresets.displayName@v6.." + }, + "description": { + "$ref": "#/definitions/workflowPresets.description@v6.." + }, + "steps": { + "$ref": "#/definitions/workflowPresets.steps@v10.." + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + }, + "required": [ + "name", + "steps" + ] + } + }, + "workflowPresets.name@v6..": { + "type": "string", + "minLength": 1, + "description": "A required string representing the machine-friendly name of the preset. This identifier is used in the cmake --workflow --preset option. There must not be two presets (configure, build, test, package, or workflow) in the union of CMakePresets.json and CMakeUserPresets.json in the same directory with the same name. However, a workflow preset may have the same name as a configure, build, test, or package preset." + }, + "workflowPresets.vendor@v6..": { + "type": "object", + "minLength": 1, + "description": "An optional map containing vendor-specific information. CMake does not interpret the contents of this field except to verify that it is a map if it does exist. However, it should follow the same conventions as the root-level vendor field.", + "properties": {} + }, + "workflowPresets.displayName@v6..": { + "type": "string", + "description": "An optional string with a human-friendly name of the preset." + }, + "workflowPresets.description@v6..": { + "type": "string", + "description": "An optional string with a human-friendly description of the preset." + }, + "workflowPresets.steps@v6..v9": { + "type": "array", + "description": "A required array of objects describing the steps of the workflow. The first step must be a configure preset, and all subsequent steps must be non-configure presets whose configurePreset field matches the starting configure preset.", + "items": { + "type": "object", + "unevaluatedProperties": false, + "properties": { + "type": { + "$ref": "#/definitions/workflowPresets.steps.type@v6.." + }, + "name": { + "$ref": "#/definitions/workflowPresets.steps.name@v6.." + } + } + } + }, + "workflowPresets.steps@v10..": { + "type": "array", + "description": "A required array of objects describing the steps of the workflow. The first step must be a configure preset, and all subsequent steps must be non-configure presets whose configurePreset field matches the starting configure preset.", + "items": { + "type": "object", + "unevaluatedProperties": false, + "properties": { + "type": { + "$ref": "#/definitions/workflowPresets.steps.type@v6.." + }, + "name": { + "$ref": "#/definitions/workflowPresets.steps.name@v6.." + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + } + } + }, + "workflowPresets.steps.type@v6..": { + "type": "string", + "enum": [ + "configure", + "build", + "test", + "package" + ], + "description": "A required string. The first step must be configure. Subsequent steps must be either build, test, or package." + }, + "workflowPresets.steps.name@v6..": { + "type": "string", + "minLength": 1, + "description": "A required string representing the name of the configure, build, test, or package preset to run as this workflow step." + }, + "condition[1].type@v3..": { + "type": "string", + "const": "const", + "description": "A required string specifying the type of the condition." + }, + "condition[1].value@v3..": { + "type": "boolean", + "description": "A required boolean which provides a constant value for the condition's evaluation." + }, + "condition[2].type@v3..": { + "type": "string", + "enum": [ + "equals", + "notEquals" + ], + "description": "A required string specifying the type of the condition." + }, + "condition[2].lhs@v3..": { + "type": "string", + "description": "First string to compare. This field supports macro expansion." + }, + "condition[2].rhs@v3..": { + "type": "string", + "description": "Second string to compare. This field supports macro expansion." + }, + "condition[3].type@v3..": { + "type": "string", + "enum": [ + "inList", + "notInList" + ], + "description": "A required string specifying the type of the condition." + }, + "condition[3].string@v3..": { + "type": "string", + "description": "A required string to search for. This field supports macro expansion." + }, + "condition[3].list@v3..": { + "type": "array", + "description": "A required array of strings to search. This field supports macro expansion, and uses short-circuit evaluation.", + "items": { + "type": "string" + } + }, + "condition[4].type@v3..": { + "type": "string", + "enum": [ + "matches", + "notMatches" + ], + "description": "A required string specifying the type of the condition." + }, + "condition[4].string@v3..": { + "type": "string", + "description": "A required string to search. This field supports macro expansion." + }, + "condition[4].regex@v3..": { + "type": "string", + "description": "A required regular expression to search for. This field supports macro expansion." + }, + "condition[5].type@v3..": { + "type": "string", + "enum": [ + "anyOf", + "allOf" + ], + "description": "A required string specifying the type of the condition." + }, + "condition[5].conditions@v3..v9": { + "type": "array", + "description": "A required array of condition objects. These conditions use short-circuit evaluation.", + "items": { + "$ref": "#/definitions/condition@v3..v9" + } + }, + "condition[5].conditions@v10..": { + "type": "array", + "description": "A required array of condition objects. These conditions use short-circuit evaluation.", + "items": { + "$ref": "#/definitions/condition@v10.." + } + }, + "condition[6].type@v3..": { + "type": "string", + "const": "not", + "description": "A required string specifying the type of the condition." + }, + "condition[6].condition@v3..v9": { + "$ref": "#/definitions/condition@v3..v9" + }, + "condition[6].condition@v10..": { + "$ref": "#/definitions/condition@v10.." + }, + "condition@v3..v9": { + "anyOf": [ + { + "type": "boolean", + "description": "A boolean which provides a constant value for the condition's evaluation." + }, + { + "type": "object", + "unevaluatedProperties": false, + "properties": { + "type": { + "$ref": "#/definitions/condition[1].type@v3.." + }, + "value": { + "$ref": "#/definitions/condition[1].value@v3.." + } + }, + "required": [ + "type", + "value" + ] + }, + { + "type": "object", + "unevaluatedProperties": false, + "properties": { + "type": { + "$ref": "#/definitions/condition[2].type@v3.." + }, + "lhs": { + "$ref": "#/definitions/condition[2].lhs@v3.." + }, + "rhs": { + "$ref": "#/definitions/condition[2].rhs@v3.." + } + }, + "required": [ + "type", + "lhs", + "rhs" + ] + }, + { + "type": "object", + "unevaluatedProperties": false, + "properties": { + "type": { + "$ref": "#/definitions/condition[3].type@v3.." + }, + "string": { + "$ref": "#/definitions/condition[3].string@v3.." + }, + "list": { + "$ref": "#/definitions/condition[3].list@v3.." + } + }, + "required": [ + "type", + "string", + "list" + ] + }, + { + "type": "object", + "unevaluatedProperties": false, + "properties": { + "type": { + "$ref": "#/definitions/condition[4].type@v3.." + }, + "string": { + "$ref": "#/definitions/condition[4].string@v3.." + }, + "regex": { + "$ref": "#/definitions/condition[4].regex@v3.." + } + }, + "required": [ + "type", + "string", + "regex" + ] + }, + { + "type": "object", + "unevaluatedProperties": false, + "properties": { + "type": { + "$ref": "#/definitions/condition[5].type@v3.." + }, + "conditions": { + "$ref": "#/definitions/condition[5].conditions@v3..v9" + } + }, + "required": [ + "type", + "conditions" + ] + }, + { + "type": "object", + "unevaluatedProperties": false, + "properties": { + "type": { + "$ref": "#/definitions/condition[6].type@v3.." + }, + "condition": { + "$ref": "#/definitions/condition[6].condition@v3..v9" + } + }, + "required": [ + "type", + "condition" + ] + } + ] + }, + "condition@v10..": { + "anyOf": [ + { + "type": "boolean", + "description": "A boolean which provides a constant value for the condition's evaluation." + }, + { + "type": "object", + "unevaluatedProperties": false, + "properties": { + "type": { + "$ref": "#/definitions/condition[1].type@v3.." + }, + "value": { + "$ref": "#/definitions/condition[1].value@v3.." + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + }, + "required": [ + "type", + "value" + ] + }, + { + "type": "object", + "unevaluatedProperties": false, + "properties": { + "type": { + "$ref": "#/definitions/condition[2].type@v3.." + }, + "lhs": { + "$ref": "#/definitions/condition[2].lhs@v3.." + }, + "rhs": { + "$ref": "#/definitions/condition[2].rhs@v3.." + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + }, + "required": [ + "type", + "lhs", + "rhs" + ] + }, + { + "type": "object", + "unevaluatedProperties": false, + "properties": { + "type": { + "$ref": "#/definitions/condition[3].type@v3.." + }, + "string": { + "$ref": "#/definitions/condition[3].string@v3.." + }, + "list": { + "$ref": "#/definitions/condition[3].list@v3.." + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + }, + "required": [ + "type", + "string", + "list" + ] + }, + { + "type": "object", + "unevaluatedProperties": false, + "properties": { + "type": { + "$ref": "#/definitions/condition[4].type@v3.." + }, + "string": { + "$ref": "#/definitions/condition[4].string@v3.." + }, + "regex": { + "$ref": "#/definitions/condition[4].regex@v3.." + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + }, + "required": [ + "type", + "string", + "regex" + ] + }, + { + "type": "object", + "unevaluatedProperties": false, + "properties": { + "type": { + "$ref": "#/definitions/condition[5].type@v3.." + }, + "conditions": { + "$ref": "#/definitions/condition[5].conditions@v10.." + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + }, + "required": [ + "type", + "conditions" + ] + }, + { + "type": "object", + "unevaluatedProperties": false, + "properties": { + "type": { + "$ref": "#/definitions/condition[6].type@v3.." + }, + "condition": { + "$ref": "#/definitions/condition[6].condition@v10.." + }, + "$comment": { + "$ref": "#/definitions/$comment@v10.." + } + }, + "required": [ + "type", + "condition" + ] + } + ] } } } diff --git a/Help/manual/presets/schema.yaml b/Help/manual/presets/schema.yaml new file mode 100644 index 0000000000..4f03c986ad --- /dev/null +++ b/Help/manual/presets/schema.yaml @@ -0,0 +1,1990 @@ +--- +version: 12 +types: + - id: condition + type: variant + items: + - type: boolean + description: + A boolean which provides a constant value for the condition's + evaluation. + # 'const' condition + - type: object + unevaluatedProperties: false + properties: + type: + type: string + required: true + const: const + description: + A required string specifying the type of the condition. + value: + type: boolean + required: true + description: + A required boolean which provides a constant value for the + condition's evaluation. + # 'equals', 'notEquals' condition + - type: object + unevaluatedProperties: false + properties: + type: + type: string + required: true + enum: + - equals + - notEquals + description: + A required string specifying the type of the condition. + lhs: + type: string + required: true + description: + First string to compare. This field supports macro expansion. + rhs: + type: string + required: true + description: + Second string to compare. This field supports macro expansion. + # 'inList', 'notInList' condition + - type: object + properties: + type: + type: string + required: true + enum: + - inList + - notInList + description: + A required string specifying the type of the condition. + string: + type: string + required: true + description: + A required string to search for. This field supports macro + expansion. + list: + type: array + required: true + items: + type: string + description: + A required array of strings to search. This field supports macro + expansion, and uses short-circuit evaluation. + unevaluatedProperties: false + # 'matches', 'notMatches' condition + - type: object + properties: + type: + type: string + required: true + enum: + - matches + - notMatches + description: + A required string specifying the type of the condition. + string: + type: string + required: true + description: + A required string to search. This field supports macro expansion. + regex: + type: string + required: true + description: + A required regular expression to search for. This field supports + macro expansion. + unevaluatedProperties: false + # 'anyOf', 'allOf' condition + - type: object + properties: + type: + type: string + required: true + enum: + - anyOf + - allOf + description: + A required string specifying the type of the condition. + conditions: + type: array + required: true + description: + A required array of condition objects. These conditions use + short-circuit evaluation. + items: + type: ref + target: condition + unevaluatedProperties: false + # 'not' condition + - type: object + properties: + type: + type: string + required: true + const: not + description: + A required string specifying the type of the condition. + condition: + type: ref + required: true + target: condition + unevaluatedProperties: false +definitions: + inherits: &preset-inherits + anyOf: + - type: string + minLength: 1 + description: + An optional string representing the name of the preset from which to + inherit. + - type: array + description: + An optional array of strings representing the names of presets from + which to inherit. The preset will inherit all of the fields from the + inherits presets by default (except name, hidden, inherits, + description, and displayName), but can override them as desired. If + multiple inherits presets provide conflicting values for the same + field, the earlier preset in the inherits list will be preferred. + Presets in CMakePresets.json must not inherit from presets in + CMakeUserPresets.json. + items: + type: string + minLength: 1 + description: + An optional string representing the name of the preset from which + to inherit. + sphinxDescription: | + An optional array of strings representing the names of presets from which + to inherit. This field can also be a string, which is equivalent to an + array containing one string. + + The preset will inherit all of the fields from the ``inherits`` presets + by default (except ``name``, ``hidden``, ``inherits``, ``description``, + and ``displayName``), but can override them as desired. If multiple + ``inherits`` presets provide conflicting values for the same field, the + earlier preset in the ``inherits`` array will be preferred. + + A preset can only inherit from another preset that is defined in the same + file or in one of the files it includes (directly or indirectly). Presets + in ``CMakePresets.json`` may not inherit from presets in + ``CMakeUserPresets.json``. + vendor: &preset-vendor + type: object + minLength: 1 + description: + An optional map containing vendor-specific information. CMake does not + interpret the contents of this field except to verify that it is a map if + it does exist. However, it should follow the same conventions as the + root-level vendor field. + sphinxDescription: | + An optional map containing vendor-specific information. CMake does not + interpret the contents of this field except to verify that it is a map if + it does exist. However, it should follow the same conventions as the + root-level ``vendor`` field. If vendors use their own per-preset + ``vendor`` field, they should implement inheritance in a sensible manner + when appropriate. + properties: {} + displayName: &preset-displayName + type: string + description: + An optional string with a human-friendly name of the preset. + description: &preset-description + type: string + description: + An optional string with a human-friendly description of the preset. + environment: &preset-environment + type: object + description: &environment-description + An optional map of environment variables. The key is the variable name + (which must not be an empty string). Each variable is set regardless of + whether or not a value was given to it by the process's environment. This + field supports macro expansion, and environment variables in this map may + reference each other, and may be listed in any order, as long as such + references do not cause a cycle (for example,if ENV_1 is $env{ENV_2}, + ENV_2 may not be $env{ENV_1}.) Environment variables are inherited + through the inherits field, and the preset's environment will be the + union of its own environment and the environment from all its parents. If + multiple presets in this union define the same variable, the standard + rules of inherits are applied. Setting a variable to null causes it to + not be set, even if a value was inherited from another preset. + sphinxDescription: &environment-sphinx-description | + An optional map of environment variables. The key is the variable name + (which may not be an empty string), and the value is either ``null`` or a + string representing the value of the variable. Each variable is set + regardless of whether or not a value was given to it by the process's + environment. + + This field supports `macro expansion`_, and environment variables in this + map may reference each other, and may be listed in any order, as long as + such references do not cause a cycle (for example, if ``ENV_1`` is + ``$env{ENV_2}``, ``ENV_2`` may not be ``$env{ENV_1}``). ``$penv{NAME}`` + allows one to prepend or append values to existing environment variables + by accessing only values from the parent environment. + + Environment variables are inherited through the ``inherits`` field, and + the preset's environment will be the union of its own ``environment`` and + the ``environment`` from all its parents. If multiple presets in this + union define the same variable, the standard rules of ``inherits`` are + applied. Setting a variable to ``null`` causes it to not be set, even if + a value was inherited from another preset. + properties: {} + propertyNames: + pattern: '^.+$' + additionalProperties: &environment-additional-properties + anyOf: + - type: 'null' + description: + Setting a variable to null causes it to not be set, even if a value + was inherited from another preset. + - type: string + description: + A string representing the value of the variable. + architecture-or-toolset: &architecture-or-toolset-properties + value: + type: string + description: An optional string representing the value. + strategy: + type: string + enum: + - set + - external + description: ' + An optional string telling CMake how to handle the field. Valid values + are: "set" Set the respective value. This will result in an error for + generators that do not support the respective field. "external" Do not + set the value, even if the generator supports it. This is useful if, + for example, a preset uses the Ninja generator, and an IDE knows how to + set up the Visual C++ environment from the architecture and toolset + fields. In that case, CMake will ignore the field, but the IDE can use + them to set up the environment before invoking CMake. + ' + sphinxDescription: | + An optional string telling CMake how to handle the field. + Valid values are: + + ``"set"`` + Set the respective value. This will result in an error for generators + that do not support the respective field. + + ``"external"`` + Do not set the value, even if the generator supports it. This is + useful if, for example, a preset uses the Ninja generator, and an IDE + knows how to set up the Visual C++ environment from the architecture + and toolset fields. In that case, CMake will ignore the field, but + the IDE can use them to set up the environment before invoking CMake. + + If no ``strategy`` field is given, or if the field uses the string form + rather than the object form, the behavior is the same as ``"set"``. + condition: &condition + since: 3 + anyOf: + - type: ref + target: condition + - type: 'null' + description: + Null indicates that the condition always evaluates to true and is not + inherited. + sphinxDescription: | + An optional `Condition`_ object. +description: + The presets specify the generator and the build directory, and optionally an + array of variables and other arguments to pass to CMake. +properties: + $schema: + since: 8 + type: string + format: uri-reference + description: + An optional string that provides a URI to the JSON schema that describes + the structure of this JSON document. This field is used for validation + and autocompletion in editors that support JSON schema. It doesn't affect + the behavior of the document itself. If this field is not specified, the + JSON document will still be valid, but tools that use JSON schema for + validation and autocompletion may not function correctly. + version: + type: integer + required: true + description: + A required integer representing the version of the JSON schema. + sphinxDescription: | + A required integer representing the version of the JSON schema. See + `Versions`_ for discussion of the supported versions and the + corresponding version of CMake in which they were added. + cmakeMinimumRequired: + type: object + description: + An optional object representing the minimum version of CMake + needed to build this project. + sphinxDescription: | + An optional object representing the minimum version of CMake + needed to build this project. This object consists of the following + fields: + + .. include:: presets/cmakeMinimumRequired-properties.rst + properties: + major: + type: integer + description: An optional integer representing the major version. + minor: + type: integer + description: An optional integer representing the minor version. + patch: + type: integer + description: An optional integer representing the patch version. + unevaluatedProperties: false + include: + since: 4 + type: array + items: + type: string + description: + An optional array of strings representing files to include. If the + filenames are not absolute, they are considered relative to the current + file. + sphinxDescription: | + An optional array of strings representing files to include. If the + filenames are not absolute, they are considered relative to the current + file. See `Includes`_ for discussion of the constraints on included + files. + vendor: + type: object + description: + An optional map containing vendor-specific information. CMake does not + interpret the contents of this field except to verify that it is a map if + it does exist. However, the keys should be a vendor-specific domain name + followed by a /-separated path. For example, the Example IDE 1.0 could + use example.com/ExampleIDE/1.0. The value of each field can be anything + desired by the vendor, though will typically be a map. + sphinxDescription: | + An optional map containing vendor-specific information. CMake does not + interpret the contents of this field except to verify that it is a map if + it does exist. However, the keys should be a vendor-specific domain name + followed by a ``/``-separated path. For example, the Example IDE 1.0 + could use ``example.com/ExampleIDE/1.0``. The value of each field can be + anything desired by the vendor, though will typically be a map. + properties: {} + configurePresets: + type: array + description: + An optional array of configure preset objects. + sphinxDescription: | + An optional array of `Configure Preset`_ objects. + items: + type: object + description: + A configure preset object. + properties: + name: + type: string + required: true + minLength: 1 + description: + A required string representing the machine-friendly name of the + preset. This identifier is used in the cmake --preset option. + There must not be two configure presets in the union of + CMakePresets.json and CMakeUserPresets.json in the same directory + with the same name. However, a configure preset may have the same + name as a build, test, package, or workflow preset. + sphinxDescription: | + A required string representing the machine-friendly name of the + preset. This identifier is used in the :option:`cmake --preset` + option. There must not be two configure presets in the union of + ``CMakePresets.json`` and ``CMakeUserPresets.json`` in the same + directory with the same name. However, a configure preset may have + the same name as a build, test, package, or workflow preset. + hidden: + type: boolean + description: + An optional boolean specifying whether or not a preset should be + hidden. If a preset is hidden, it cannot be used in the --preset= + argument, will not show up in the CMake GUI, and does not have to + have a valid generator or binaryDir, even from inheritance. Hidden + presets are intended to be used as a base for other presets to + inherit via the inherits field. + sphinxDescription: | + An optional boolean specifying whether or not a preset should be + hidden. If a preset is hidden, it cannot be used in the + :cmake-option:`--preset` argument, will not show up in the + :manual:`CMake GUI `, and does not have to have a + valid ``generator`` or ``binaryDir``, even from inheritance. + ``hidden`` presets are intended to be used as a base for other + presets to inherit via the ``inherits`` field. + inherits: *preset-inherits + condition: *condition + vendor: *preset-vendor + displayName: *preset-displayName + description: *preset-description + generator: + revisions: + - until: 3 + type: string + description: + An optional string representing the generator to use for the + preset. If generator is not specified, it must be inherited + from the inherits preset (unless this preset is hidden). Note + that for Visual Studio generators, unlike in the command line + -G argument, you cannot include the platform name in the + generator name. Use the architecture field instead. + - since: 3 + type: string + description: + An optional string representing the generator to use for the + preset. If generator is not specified, the normal generator + discovery procedure is used. Note that for Visual Studio + generators, unlike in the command line -G argument, you cannot + include the platform name in the generator name. Use the + architecture field instead. + sphinxDescription: | + An optional string representing the + :manual:`generator ` to use for the preset. + + .. presets-versionchanged:: 3 + + If omitted, CMake will fall back to regular generator discovery + procedure. In previous versions, if not specified, this field + must be inherited from the ``inherits`` preset (unless this + preset is ``hidden``). + + Note that for :ref:`Visual Studio generators`, unlike in the + command line :cmake-option:`-G` argument, you cannot include the + platform name in the generator name. Use the ``architecture`` + field instead. + architecture: + anyOf: + - type: string + description: &architectureDescription + An optional string representing the platform for generators + that support it. + - type: object + description: *architectureDescription + properties: *architecture-or-toolset-properties + unevaluatedProperties: false + sphinxDescription: | + Optional field representing the platform for + :manual:`generators ` that support it. + + See :option:`cmake -A` for possible values. + + ``architecture`` may be either a string or an object with the + following fields: + + .. include:: presets/architecture-properties.rst + toolset: + anyOf: + - type: string + description: &toolsetDescription + An optional string representing the toolset for generators that + support it. + - type: object + description: *toolsetDescription + properties: *architecture-or-toolset-properties + unevaluatedProperties: false + sphinxDescription: | + Optional field representing the toolset for + :manual:`generators ` that support it. + + See :option:`cmake -T` for possible values. + + ``toolset`` may be either a string or an object with the following + fields: + + .. include:: presets/toolset-properties.rst + toolchainFile: + since: 3 + type: string + description: + An optional string representing the path to the toolchain file. + This field supports macro expansion. If a relative path is + specified, it is calculated relative to the build directory, and if + not found, relative to the source directory. + sphinxDescription: | + An optional string representing the path to the toolchain file. + This field supports `macro expansion`_. If a relative path is + specified, it is calculated relative to the build directory, and if + not found, relative to the source directory. This field takes + precedence over any :variable:`CMAKE_TOOLCHAIN_FILE` value. + graphviz: + since: 10 + type: string + description: + An optional string specifying the path to the graphviz dot file. + sphinxDescription: | + An optional string representing the path to the graphviz input + file, that will contain all the library and executable dependencies + in the project. See the documentation for + :option:`cmake --graphviz` for more details. + + This field supports `macro expansion`_. If a relative path is + specified, it is calculated relative to the current working + directory. + binaryDir: + revisions: + - until: 3 + type: string + description: + An optional string representing the path to the output binary + directory. This field supports macro expansion. If a relative + path is specified, it is calculated relative to the source + directory. If binaryDir is not specified, it must be inherited + from the inherits preset (unless this preset is hidden). + - since: 3 + type: string + description: + An optional string representing the path to the output binary + directory. This field supports macro expansion. If a relative + path is specified, it is calculated relative to the source + directory. If binaryDir is not specified, the path is + calculated using regular methods. + sphinxDescription: | + An optional string representing the path to the output binary + directory. This field supports `macro expansion`_. If a relative + path is specified, it is calculated relative to the source + directory. + + .. presets-versionchanged:: 3 + + If omitted, CMake will calculate the path using regular methods. + In previous versions, if not specified, this field must be + inherited from the ``inherits`` preset (unless this preset is + ``hidden``). + installDir: + since: 3 + type: string + description: + An optional string representing the path to the installation + directory, which will be used as the CMAKE_INSTALL_PREFIX variable. + This field supports macro expansion. If a relative path is + specified, it is calculated relative to the source directory. + sphinxDescription: | + An optional string representing the path to the installation + directory, which will be used as the + :variable:`CMAKE_INSTALL_PREFIX` variable. This field supports + `macro expansion`_. If a relative path is specified, it is + calculated relative to the source directory. + cmakeExecutable: + type: string + description: + An optional string representing the path to the CMake executable to + use for this preset. This is reserved for use by IDEs, and is not + used by CMake itself. IDEs that use this field should expand any + macros in it. + cacheVariables: + type: object + description: + An optional map of cache variables. The key is the variable name + (which must not be an empty string). Cache variables are inherited + through the inherits field, and the preset's variables will be the + union of its own cacheVariables and the cacheVariables from all its + parents. If multiple presets in this union define the same + variable, the standard rules of inherits are applied. + sphinxDescription: | + An optional map of cache variables. The key is the variable name + (which may not be an empty string), and the value is either + ``null``, a boolean (which is equivalent to a value of ``"TRUE"`` + or ``"FALSE"`` and a type of ``BOOL``), a string representing the + value of the variable (which supports `macro expansion`_), or an + object with the following fields: + + ``type`` + An optional string representing the type of the variable. + + ``value`` + A required string or boolean representing the value of the + variable. A boolean is equivalent to ``"TRUE"`` or ``"FALSE"``. + This field supports `macro expansion`_. + + Cache variables are inherited through the ``inherits`` field, and + the preset's variables will be the union of its own + ``cacheVariables`` and the ``cacheVariables`` from all its parents. + If multiple presets in this union define the same variable, the + standard rules of ``inherits`` are applied. Setting a variable to + ``null`` causes it to not be set, even if a value was inherited + from another preset. + properties: {} + propertyNames: + pattern: '^.+$' + additionalProperties: + anyOf: + - type: 'null' + description: + Setting a variable to null causes it to not be set, even if a + value was inherited from another preset. + - type: boolean + description: + A boolean representing the value of the variable. Equivalent + to "TRUE" or "FALSE" + - type: string + description: + A string representing the value of the variable (which + supports macro expansion). + - type: object + description: + An optional object representing the cache variables for + generators that support it. + properties: + type: + type: string + enum: + - BOOL + - FILEPATH + - PATH + - STRING + - INTERNAL + description: + An optional string representing the type of the variable. + It should be BOOL, FILEPATH, PATH, STRING, or INTERNAL. + value: + required: true + anyOf: + - type: boolean + description: + A boolean representing the value of the variable. + Equivalent to "TRUE" or "FALSE". + - type: string + description: + A string representing the value of the variable + (which supports macro expansion). + unevaluatedProperties: false + environment: *preset-environment + warnings: + type: object + description: + An optional object specifying the warnings to enable. + sphinxDescription: | + An optional object specifying the warnings to enable. + The object may contain the following fields: + + .. include:: presets/warnings-properties.rst + properties: + # These should be in lexicographical order, except for systemVars. + deprecated: + type: boolean + description: + An optional boolean. Equivalent to passing -Wdeprecated or + -Wno-deprecated on the command line. This may not be set + to false if errors.deprecated is set to true. + sphinxDescription: | + An optional boolean. Equivalent to passing + :cmake-option:`-Wdeprecated` or + :cmake-option:`-Wno-deprecated` + on the command line. + This may not be set to ``false`` + if ``errors.deprecated`` is set to ``true``. + dev: + type: boolean + description: + An optional boolean. Equivalent to passing -Wdev or + -Wno-dev on the command line. This may not be set + to false if errors.dev is set to true. + sphinxDescription: | + An optional boolean. Equivalent to passing + :cmake-option:`-Wdev` or + :cmake-option:`-Wno-dev` + on the command line. + This may not be set to ``false`` + if ``errors.dev`` is set to ``true``. + uninitialized: + type: boolean + description: + An optional boolean. Setting this to true is equivalent to + passing --warn-uninitialized on the command line. + sphinxDescription: | + An optional boolean. Setting this to ``true`` is equivalent to + passing :cmake-option:`--warn-uninitialized` on the command + line. + unusedCli: + type: boolean + description: + An optional boolean. Setting this to false is equivalent to + passing --no-warn-unused-cli on the command line. + sphinxDescription: | + An optional boolean. Setting this to ``false`` is equivalent to + passing :cmake-option:`--no-warn-unused-cli` on the command + line. + # systemVars should be last. + systemVars: + type: boolean + description: + An optional boolean. Setting this to true is equivalent to + passing --check-system-vars on the command line. + sphinxDescription: | + An optional boolean. Setting this to ``true`` is equivalent to + passing :cmake-option:`--check-system-vars` on the command + line. + unevaluatedProperties: false + errors: + type: object + description: + An optional object specifying the errors to enable. + sphinxDescription: | + An optional object specifying the errors to enable. + The object may contain the following fields: + + .. include:: presets/errors-properties.rst + properties: + # These should be in lexicographical order. + deprecated: + type: boolean + description: + An optional boolean. Equivalent to passing + -Werror=deprecated or -Wno-error=deprecated + on the command line. This may not be set + to true if warnings.deprecated is set to false. + sphinxDescription: | + An optional boolean. Equivalent to passing + :cmake-option:`-Werror=deprecated` or + :cmake-option:`-Wno-error=deprecated` + on the command line. + This may not be set to ``true`` + if ``warnings.deprecated`` is set to ``false``. + dev: + type: boolean + description: + An optional boolean. Equivalent to passing + -Werror=dev or -Wno-error=dev + on the command line. This may not be set + to true if warnings.dev is set to false. + sphinxDescription: | + An optional boolean. Equivalent to passing + :cmake-option:`-Werror=dev` or + :cmake-option:`-Wno-error=dev` + on the command line. + This may not be set to ``true`` + if ``warnings.dev`` is set to ``false``. + unevaluatedProperties: false + debug: + type: object + description: + An optional object specifying debug options. + sphinxDescription: | + An optional object specifying debug options. + The object may contain the following fields: + + .. include:: presets/debug-properties.rst + properties: + output: + type: boolean + description: + An optional boolean. Setting this to true is equivalent to + passing --debug-output on the command line. + sphinxDescription: | + An optional boolean. Setting this to ``true`` is equivalent to + passing :cmake-option:`--debug-output` on the command line. + tryCompile: + type: boolean + description: + An optional boolean. Setting this to true is equivalent to + passing --debug-trycompile on the command line. + sphinxDescription: | + An optional boolean. Setting this to ``true`` is equivalent to + passing :cmake-option:`--debug-trycompile` on the command line. + find: + type: boolean + description: + An optional boolean. Setting this to true is equivalent to + passing --debug-find on the command line. + sphinxDescription: | + An optional boolean. Setting this to ``true`` is equivalent to + passing :cmake-option:`--debug-find` on the command line. + unevaluatedProperties: false + trace: + since: 7 + type: object + description: + An optional object specifying trace options. + sphinxDescription: | + An optional object specifying trace options. + The object may contain the following fields: + + .. include:: presets/trace-properties.rst + properties: + mode: + type: string + enum: + - 'on' + - 'off' + - 'expand' + description: + An optional string that specifies the trace mode. + sphinxDescription: | + An optional string that specifies the trace mode. + Valid values are: + + ``on`` + Causes a trace of all calls made and from where to be + printed. Equivalent to passing :cmake-option:`--trace` + on the command line. + + ``off`` + A trace of all calls will not be printed. + + ``expand`` + Causes a trace with variables expanded of all calls made + and from where to be printed. Equivalent to passing + :cmake-option:`--trace-expand` on the command line. + format: + type: string + enum: + - human + - json-v1 + description: + An optional string that specifies the trace output format. + sphinxDescription: | + An optional string that specifies the format output of the + trace. Valid values are: + + ``human`` + Prints each trace line in a human-readable format. + This is the default format. Equivalent to passing + :cmake-option:`--trace-format=human` + on the command line. + + ``json-v1`` + Prints each line as a separate JSON document. Equivalent + to passing :cmake-option:`--trace-format=json-v1` + on the command line. + source: + anyOf: + - type: string + minLength: 1 + description: + An optional string representing the path to one source file + to be traced. + - type: array + description: + An optional array of strings representing the paths to source + files to be traced. + items: + type: string + minLength: 1 + description: + A string representing the path to one source file to be + traced. + sphinxDescription: | + An optional array of strings representing the paths of source + files to be traced. This field can also be a string, which is + equivalent to an array containing one string. Equivalent to + passing :cmake-option:`--trace-source` on the command line. + redirect: + type: string + description: + An optional string specifying a path to a trace output file. + sphinxDescription: | + An optional string specifying a path to a trace output file. + Equivalent to passing :cmake-option:`--trace-redirect` on the + command line. + unevaluatedProperties: false + unevaluatedProperties: false + buildPresets: + since: 2 + type: array + description: + An optional array of build preset objects. + sphinxDescription: | + An optional array of `Build Preset`_ objects. + items: + type: object + description: + A build preset object. + properties: + name: + type: string + required: true + minLength: 1 + description: + A required string representing the machine-friendly name of the + preset. This identifier is used in the cmake --build --preset + option. There must not be two build presets in the union of + CMakePresets.json and CMakeUserPresets.json in the same directory + with the same name. However, a build preset may have the same name + as a configure, test, package, or workflow preset. + sphinxDescription: | + A required string representing the machine-friendly name of the + preset. This identifier is used in the + :option:`cmake --build --preset ` option. + There must not be two build presets in the union of + ``CMakePresets.json`` and ``CMakeUserPresets.json`` in the same + directory with the same name. However, a build preset may have the + same name as a configure, test, package, or workflow preset. + hidden: + type: boolean + description: + An optional boolean specifying whether or not a preset should be + hidden. If a preset is hidden, it cannot be used in the --preset + argument and does not have to have a valid configurePreset, even + from inheritance. hidden presets are intended to be used as a base + for other presets to inherit via the inherits field. + sphinxDescription: | + An optional boolean specifying whether or not a preset should be + hidden. If a preset is hidden, it cannot be used in the + :cmake-build-option:`--preset` argument and does not have to have a + valid ``configurePreset``, even from inheritance. ``hidden`` + presets are intended to be used as a base for other presets to + inherit via the ``inherits`` field. + inherits: *preset-inherits + condition: *condition + vendor: *preset-vendor + displayName: *preset-displayName + description: *preset-description + environment: + type: object + description: *environment-description + sphinxDescription: *environment-sphinx-description + sphinxNote: | + For a CMake project using :module:`ExternalProject` with a + configuration preset having environment variables needed in the + ExternalProject, use a build preset that inherits that + configuration preset or the ExternalProject will not have the + environment variables set in the configuration preset. Example: + suppose the host defaults to one compiler (say Clang) and the user + wishes to use another compiler (say GCC). Set configuration preset + environment variables :envvar:`CC` and :envvar:`CXX` and use a + build preset that inherits that configuration preset. Otherwise the + ExternalProject may use a different (system default) compiler than + the top-level CMake project. + properties: {} + additionalProperties: *environment-additional-properties + configurePreset: + type: string + minLength: 1 + description: + An optional string specifying the name of a configure preset to + associate with this build preset. If configurePreset is not + specified, it must be inherited from the inherits preset (unless + this preset is hidden). The build tree directory is inferred from + the configure preset. + sphinxDescription: | + An optional string specifying the name of a configure preset to + associate with this build preset. If ``configurePreset`` is not + specified, it must be inherited from the inherits preset (unless + this preset is hidden). The build directory is inferred from the + configure preset, so the build will take place in the same + ``binaryDir`` that the configuration did. + inheritConfigureEnvironment: + type: boolean + description: + An optional boolean that defaults to true. If true, the environment + variables from the associated configure preset are inherited after + all inherited build preset environments, but before environment + variables explicitly specified in this build preset. + sphinxDescription: | + An optional boolean that defaults to ``true``. If ``true``, the + environment variables from the associated configure preset are + inherited after all inherited build preset environments, but before + environment variables explicitly specified in this build preset. + jobs: + type: integer + description: + An optional non-negative integer. Equivalent to passing --parallel + or -j on the command line. + sphinxDescription: | + An optional integer. Equivalent to passing + :cmake-build-option:`--parallel` or ``-j`` on the command line. + If the value is ``0``, it is equivalent to passing ``--parallel`` + with ```` omitted; alternatively, one can define the + environment variable :envvar:`CMAKE_BUILD_PARALLEL_LEVEL` as an + empty string using the ``environment`` field. + + .. versionchanged:: 4.3 + + This field does not accept negative integer values, regardless of + the version in the preset file. + minimum: 0 + targets: + anyOf: + - type: string + description: + An optional string. Equivalent to passing --target or -t on the + command line. Vendors may ignore the targets property or hide + build presets that explicitly specify targets. + - type: array + items: + type: string + description: + An optional array of strings. Equivalent to passing --target or + -t on the command line. Vendors may ignore the targets property + or hide build presets that explicitly specify targets. + sphinxDescription: | + An optional string or array of strings. Equivalent to passing + :cmake-build-option:`--target` or ``-t`` on the command line. + Vendors may ignore the targets property or hide build presets that + explicitly specify targets. This field supports `macro expansion`_. + configuration: + type: string + description: + An optional string. Equivalent to passing --config on the command + line. + sphinxDescription: | + An optional string. Equivalent to passing + :cmake-build-option:`--config` on the command line. + cleanFirst: + type: boolean + description: + An optional boolean. If true, equivalent to passing --clean-first + on the command line. + sphinxDescription: | + An optional bool. If ``true``, equivalent to passing + :cmake-build-option:`--clean-first` on the command line. + resolvePackageReferences: + since: 4 + type: string + enum: + - 'on' + - 'off' + - 'only' + description: + An optional string specifying the package resolve behavior. Valid + values are "on" (packages are resolved prior to the build), "off" + (packages are not resolved prior to the build), and "only" + (packages are resolved, but no build will be performed). + sphinxDescription: | + An optional string that specifies the package resolve mode. + + Package references are used to define dependencies to packages from + external package managers. Currently only NuGet in combination with + the :ref:`Visual Studio generators` is supported. If there are no + targets that define package references, this option does nothing. + Valid values are: + + ``on`` + Causes package references to be resolved before attempting a + build. + + ``off`` + Package references will not be resolved. Note that this may cause + errors in some build environments, such as .NET SDK style + projects. + + ``only`` + Only resolve package references, but do not perform a build. + + .. note:: + + The command line parameter + :cmake-build-option:`--resolve-package-references` + will take priority over this setting. If the command line + parameter is not provided and this setting is not specified, an + environment-specific cache variable will be evaluated to decide, + if package restoration should be performed. + + When using the :ref:`Visual Studio generators`, + package references are defined using the + :prop_tgt:`VS_PACKAGE_REFERENCES` property. Package references + are restored using NuGet. It can be disabled by setting the + :variable:`CMAKE_VS_NUGET_PACKAGE_RESTORE` variable to ``OFF``. + This can also be done from within a configure preset. + verbose: + type: boolean + description: + An optional boolean. If true, equivalent to passing --verbose on + the command line. + sphinxDescription: | + An optional boolean. If ``true``, equivalent to passing + :cmake-build-option:`--verbose` on the command line. + nativeToolOptions: + type: array + items: + type: string + description: + An optional array of strings. Equivalent to passing options after + -- on the command line. + sphinxDescription: | + An optional array of strings. Equivalent to passing options after + :cmake-build-option:`--` on the command line. The array values + support `macro expansion`_. + unevaluatedProperties: false + testPresets: + since: 2 + type: array + description: + An optional array of test preset objects. Used to specify arguments to + ctest. + sphinxDescription: | + An optional array of `Test Preset`_ objects. + items: + type: object + description: + A test preset object. + properties: + name: + type: string + required: true + minLength: 1 + description: + A required string representing the machine-friendly name of the + preset. This identifier is used in the ctest --preset option. There + must not be two test presets in the union of CMakePresets.json and + CMakeUserPresets.json in the same directory with the same name. + However, a test preset may have the same name as a configure, + build, package, or workflow preset. + sphinxDescription: | + A required string representing the machine-friendly name of the + preset. This identifier is used in the :option:`ctest --preset` + option. There must not be two test presets in the union of + ``CMakePresets.json`` and ``CMakeUserPresets.json`` in the same + directory with the same name. However, a test preset may have the + same name as a configure, build, package, or workflow preset. + hidden: + type: boolean + description: + An optional boolean specifying whether or not a preset should be + hidden. If a preset is hidden, it cannot be used in the --preset + argument and does not have to have a valid configurePreset, even + from inheritance. hidden presets are intended to be used as a base + for other presets to inherit via the inherits field. + sphinxDescription: | + An optional boolean specifying whether or not a preset should be + hidden. If a preset is hidden, it cannot be used in the + :ctest-option:`--preset` argument and does not have to have a valid + ``configurePreset``, even from inheritance. ``hidden`` presets are + intended to be used as a base for other presets to inherit via the + ``inherits`` field. + inherits: *preset-inherits + condition: *condition + vendor: *preset-vendor + displayName: *preset-displayName + description: *preset-description + environment: *preset-environment + configurePreset: + type: string + minLength: 1 + description: + An optional string specifying the name of a configure preset to + associate with this test preset. If configurePreset is not + specified, it must be inherited from the inherits preset (unless + this preset is hidden). The build directory is inferred from the + configure preset. + sphinxDescription: | + An optional string specifying the name of a configure preset to + associate with this test preset. If ``configurePreset`` is not + specified, it must be inherited from the inherits preset (unless + this preset is hidden). The build directory is inferred from the + configure preset, so tests will run in the same ``binaryDir`` that + the configuration and build used. + inheritConfigureEnvironment: + type: boolean + description: + An optional boolean that defaults to true. If true, the environment + variables from the associated configure preset are inherited after + all inherited test preset environments, but before environment + variables explicitly specified in this test preset. + sphinxDescription: | + An optional boolean that defaults to ``true``. If ``true``, the + environment variables from the associated configure preset are + inherited after all inherited test preset environments, but before + environment variables explicitly specified in this test preset. + configuration: + type: string + description: + An optional string. Equivalent to passing --build-config on the + command line. + sphinxDescription: | + An optional string. Equivalent to passing + :ctest-option:`--build-config` on the command line. + overwriteConfigurationFile: + type: array + description: + An optional array of configuration options to overwrite options + specified in the CTest configuration file. Equivalent to passing + ``--overwrite`` for each value in the array. + sphinxDescription: | + An optional array of configuration options to overwrite options + specified in the CTest configuration file. Equivalent to passing + :ctest-option:`--overwrite` for each value in the array. The array + values support `macro expansion`_. + items: + type: string + description: + An option written as a key-value pair in the form "key=value". + output: + id: testOutput + type: object + description: + An optional object specifying output options. + sphinxDescription: | + An optional object specifying output options. + The object may contain the following fields: + + .. include:: presets/testOutput-properties.rst + properties: + shortProgress: + type: boolean + description: + An optional boolean. If true, equivalent to passing --progress + on the command line. + sphinxDescription: | + An optional bool. If ``true``, equivalent to passing + :ctest-option:`--progress` on the command line. + verbosity: + type: string + enum: + - default + - verbose + - extra + description: ' + An optional string specifying verbosity level. Valid values are + "default" (equivalent to passing no verbosity flags on the + command line), "verbose" (equivalent to passing --verbose on + the command line), and "extra" (equivalent to passing + --extra-verbose on the command line). + ' + sphinxDescription: | + An optional string specifying verbosity level. Must be one of + the following: + + ``default`` + Equivalent to passing no verbosity flags on the command line. + + ``verbose`` + Equivalent to passing :ctest-option:`--verbose` on the + command line. + + ``extra`` + Equivalent to passing :ctest-option:`--extra-verbose` on the + command line. + debug: + type: boolean + description: + An optional boolean. If true, equivalent to passing --debug on + the command line. + sphinxDescription: | + An optional bool. If ``true``, equivalent to passing + :ctest-option:`--debug` on the command line. + outputOnFailure: + type: boolean + description: + An optional boolean. If true, equivalent to passing + --output-on-failure on the command line. + sphinxDescription: | + An optional bool. If ``true``, equivalent to passing + :ctest-option:`--output-on-failure` on the command line. + quiet: + type: boolean + description: + An optional boolean. If true, equivalent to passing --quiet on + the command line. + sphinxDescription: | + An optional bool. If ``true``, equivalent to passing + :ctest-option:`--quiet` on the command line. + outputLogFile: + type: string + description: + An optional string specifying a path to a log file. Equivalent + to passing --output-log on the command line. + sphinxDescription: | + An optional string specifying a path to a log file. Equivalent + to passing :ctest-option:`--output-log` on the command line. + This field supports `macro expansion`_. + outputJUnitFile: + since: 6 + type: string + description: + An optional string specifying a path to a JUnit file. + Equivalent to passing --output-junit on the command line. + sphinxDescription: | + An optional string specifying a path to a JUnit file. + Equivalent to passing :ctest-option:`--output-junit` on the + command line. This field supports `macro expansion`_. + labelSummary: + type: boolean + description: + An optional boolean. If false, equivalent to passing + --no-label-summary on the command line. + sphinxDescription: | + An optional bool. If ``false``, equivalent to passing + :ctest-option:`--no-label-summary` on the command line. + subprojectSummary: + type: boolean + description: + An optional boolean. If false, equivalent to passing + --no-subproject-summary on the command line. + sphinxDescription: | + An optional bool. If ``false``, equivalent to passing + :ctest-option:`--no-subproject-summary` on the command line. + maxPassedTestOutputSize: + type: integer + description: + An optional integer specifying the maximum output for passed + tests in bytes. Equivalent to passing --test-output-size-passed + on the command line. + sphinxDescription: | + An optional integer specifying the maximum output for passed + tests in bytes. Equivalent to passing + :ctest-option:`--test-output-size-passed` on the command line. + maxFailedTestOutputSize: + type: integer + description: + An optional integer specifying the maximum output for failed + tests in bytes. Equivalent to passing --test-output-size-failed + on the command line. + sphinxDescription: | + An optional integer specifying the maximum output for failed + tests in bytes. Equivalent to passing + :ctest-option:`--test-output-size-failed` on the command line. + testOutputTruncation: + since: 5 + type: string + enum: + - tail + - middle + - head + description: ' + An optional string specifying the test output truncation mode. + Equivalent to passing --test-output-truncation on the command + line. Must be one of the following values: "tail", "middle", or + "head". + ' + sphinxDescription: | + An optional string specifying the test output truncation mode. + Equivalent to passing :ctest-option:`--test-output-truncation` + on the command line. Must be one of the following values: + + * ``tail`` + + * ``middle`` + + * ``head`` + maxTestNameWidth: + type: integer + description: + An optional integer specifying the maximum width of a test name + to output. Equivalent to passing --max-width on the command + line. + sphinxDescription: | + An optional integer specifying the maximum width of a test name + to output. Equivalent to passing :ctest-option:`--max-width` on + the command line. + unevaluatedProperties: false + filter: + type: object + description: + An optional object specifying how to filter the tests to run. + sphinxDescription: | + An optional object specifying how to filter the tests to run. + The object may contain the following fields: + + .. include:: presets/filter-properties.rst + properties: + include: + type: object + description: + An optional object specifying which tests to include. + sphinxDescription: | + An optional object specifying which tests to include. + The object may contain the following fields: + + .. include:: presets/include-properties.rst + properties: + name: + type: string + description: + An optional string specifying a regex for test names. + Equivalent to passing --tests-regex on the command line. + sphinxDescription: | + An optional string specifying a regex for test names. + Equivalent to passing :ctest-option:`--tests-regex` on the + command line. This field supports `macro expansion`_. + + CMake regex syntax is described under + :ref:`string(REGEX) `. + label: + type: string + description: + An optional string specifying a regex for test labels. + Equivalent to passing --label-regex on the command line. + sphinxDescription: | + An optional string specifying a regex for test labels. + Equivalent to passing :ctest-option:`--label-regex` on the + command line. This field supports `macro expansion`_. + useUnion: + type: boolean + description: + An optional boolean. Equivalent to passing --union on the + command line. + sphinxDescription: | + An optional bool. Equivalent to passing + :ctest-option:`--union` on the command line. + index: + anyOf: + - type: string + description: + An optional string specifying a file with the command + line syntax for --tests-information. Available in + version 2 and higher. + - type: object + description: + An optional object specifying test preset filters. + Available in version 2 and higher. + properties: + start: + type: integer + description: + An optional integer specifying a test index at + which to start testing. + end: + type: integer + description: + An optional integer specifying a test index at + which to stop testing. + stride: + type: integer + description: + An optional integer specifying the increment. + specificTests: + type: array + description: + An optional array of integers specifying specific + test indices to run. + items: + type: integer + description: + An integer specifying the test to run by index. + unevaluatedProperties: false + sphinxDescription: | + An optional object specifying tests to include by test + index. The object may contain the following fields. Can + also be an optional string specifying a file with the + command line syntax for + :ctest-option:`--tests-information`. If specified as a + string, this field supports `macro expansion`_. + + .. include:: presets/index-properties.rst + exclude: + type: object + description: + An optional object specifying which tests to exclude. + sphinxDescription: | + An optional object specifying which tests to exclude. + The object may contain the following fields: + + .. include:: presets/exclude-properties.rst + properties: + name: + type: string + description: + An optional string specifying a regex for test names. + Equivalent to passing --exclude-regex on the command line. + sphinxDescription: | + An optional string specifying a regex for test names. + Equivalent to passing :ctest-option:`--exclude-regex` on + the command line. This field supports `macro expansion`_. + label: + type: string + description: + An optional string specifying a regex for test labels. + Equivalent to passing --label-exclude on the command line. + sphinxDescription: | + An optional string specifying a regex for test labels. + Equivalent to passing :ctest-option:`--label-exclude` on + the command line. This field supports `macro expansion`_. + fixtures: + type: object + description: + An optional object specifying which fixtures to exclude + from adding tests. + sphinxDescription: | + An optional object specifying which fixtures to exclude + from adding tests. The object may contain the following + fields: + + .. include:: presets/fixtures-properties.rst + properties: + any: + type: string + description: + An optional string specifying a regex for text fixtures + to exclude from adding any tests. Equivalent to passing + --fixture-exclude-any on the command line. + sphinxDescription: | + An optional string specifying a regex for text fixtures + to exclude from adding any tests. Equivalent to passing + :ctest-option:`--fixture-exclude-any` on the command + line. This field supports `macro expansion`_. + setup: + type: string + description: + An optional string specifying a regex for text fixtures + to exclude from adding setup tests. Equivalent to + passing --fixture-exclude-setup on the command line. + sphinxDescription: | + An optional string specifying a regex for text fixtures + to exclude from adding setup tests. Equivalent to + passing :ctest-option:`--fixture-exclude-setup` on the + command line. This field supports `macro expansion`_. + cleanup: + type: string + description: + An optional string specifying a regex for text fixtures + to exclude from adding cleanup tests. Equivalent to + passing --fixture-exclude-cleanup on the command line. + sphinxDescription: | + An optional string specifying a regex for text fixtures + to exclude from adding cleanup tests. Equivalent to + passing :ctest-option:`--fixture-exclude-cleanup` on + the command line. + This field supports `macro expansion`_. + execution: + type: object + description: + An optional object specifying options for test execution. + sphinxDescription: | + An optional object specifying options for test execution. + The object may contain the following fields: + + .. include:: presets/execution-properties.rst + properties: + stopOnFailure: + type: boolean + description: + An optional boolean. If true, equivalent to passing + --stop-on-failure on the command line. + sphinxDescription: | + An optional bool. If ``true``, equivalent to passing + :ctest-option:`--stop-on-failure` on the command line. + enableFailover: + type: boolean + description: + An optional boolean. If true, equivalent to passing -F on the + command line. + sphinxDescription: | + An optional bool. If ``true``, equivalent to passing + :ctest-option:`-F` on the command line. + jobs: + revisions: + - until: 11 + type: integer + minimum: 0 + description: + An optional non-negative integer. Equivalent to passing + --parallel or -j on the command line. + - since: 11 + anyOf: + - type: integer + minimum: 0 + description: + An optional non-negative integer. Equivalent to passing + --parallel or -j on the command line. + - type: string + minLength: 0 + maxLength: 0 + description: + An optional string. Equivalent to passing --parallel or + -j on the command line with the number of jobs omitted. + sphinxDescription: | + An optional integer. Equivalent to passing + :ctest-option:`--parallel` on the command line. If the value is + ``0``, it is equivalent to unbounded parallelism. + + .. presets-versionchanged:: 11 + + This field can also be a string, in which case it must be + empty, and is equivalent to passing ``--parallel`` with + ```` omitted. + + .. versionchanged:: 4.3 + + This field does not accept negative integer values, + regardless of the version in the preset file. + minimum: 0 + resourceSpecFile: + type: string + description: + An optional string. Equivalent to passing --resource-spec-file + on the command line. + sphinxDescription: | + An optional string. Equivalent to passing + :ctest-option:`--resource-spec-file` on the command line. This + field supports `macro expansion`_. + testLoad: + type: integer + description: + An optional integer. Equivalent to passing --test-load on the + command line. + sphinxDescription: | + An optional integer. Equivalent to passing + :ctest-option:`--test-load` on the command line. + showOnly: + type: string + enum: + - human + - json-v1 + description: + An optional string. Equivalent to passing --show-only on the + command line. Value must be "human" or "json-v1". + sphinxDescription: | + An optional string. Equivalent to passing + :ctest-option:`--show-only` on the command line. The string + must be one of the following values: + + * ``human`` + + * ``json-v1`` + repeat: + type: object + description: + An optional object specifying how to repeat tests. Equivalent + to passing --repeat on the command line. + sphinxDescription: | + An optional object specifying how to repeat tests. Equivalent + to passing :ctest-option:`--repeat` on the command line. + The object must have the following fields: + + .. include:: presets/repeat-properties.rst + properties: + mode: + type: string + required: true + enum: + - until-fail + - until-pass + - after-timeout + description: ' + A required string. Must be one of the following values: + "until-fail", "until-pass", or "after-timeout". + ' + sphinxDescription: | + A required string. Must be one of the following values: + + * ``until-fail`` + + * ``until-pass`` + + * ``after-timeout`` + count: + type: integer + required: true + description: + A required integer. + unevaluatedProperties: false + interactiveDebugging: + type: boolean + description: + An optional boolean. If true, equivalent to passing + --interactive-debug-mode 1 on the command line. If false, + equivalent to passing --interactive-debug-mode 0 on the + command line. + sphinxDescription: | + An optional bool. If ``true``, equivalent to passing + :ctest-option:`--interactive-debug-mode 1` on the command line. + If ``false``, equivalent to passing + :ctest-option:`--interactive-debug-mode 0` on the command line. + scheduleRandom: + type: boolean + description: + An optional boolean. If true, equivalent to passing + --schedule-random on the command line. + sphinxDescription: | + An optional bool. If ``true``, equivalent to passing + :ctest-option:`--schedule-random` on the command line. + timeout: + type: integer + description: + An optional integer. Equivalent to passing --timeout on the + command line. + sphinxDescription: | + An optional integer. Equivalent to passing + :ctest-option:`--timeout` on the command line. + noTestsAction: + type: string + enum: + - default + - error + - ignore + description: ' + An optional string specifying the behavior if no tests are + found. Must be one of the following values: "default" + (equivalent to not passing any value on the command line), + "error" (equivalent to passing --no-tests=error on the command + line), or "ignore" (equivalent to passing --no-tests-ignore on + the command line). + ' + sphinxDescription: | + An optional string specifying the behavior if no tests are + found. Must be one of the following values: + + ``default`` + Equivalent to not passing any value on the command line. + + ``error`` + Equivalent to passing :ctest-option:`--no-tests=error` + on the command line. + + ``ignore`` + Equivalent to passing :ctest-option:`--no-tests=ignore` + on the command line. + testPassthroughArguments: + since: 12 + type: array + items: + type: string + description: + An optional array of strings. Each element is forwarded as an + argument to every test executable. Equivalent to passing + arguments after -- on the ctest command line. + sphinxDescription: | + An optional array of strings. Each element is forwarded as an + argument to every test executable, equivalent to passing + arguments after :option:`ctest --` on the command line. + + When both preset and command-line passthrough arguments are + specified, preset arguments appear first, followed by + command-line arguments. + unevaluatedProperties: false + unevaluatedProperties: false + packagePresets: + since: 6 + type: array + description: + An optional array of package preset objects. Used to specify arguments to + cpack. + sphinxDescription: | + An optional array of `Package Preset`_ objects. + items: + type: object + description: + A package preset object. + properties: + name: + type: string + required: true + minLength: 1 + description: + A required string representing the machine-friendly name of the + preset. This identifier is used in the cpack --preset option. There + must not be two package presets in the union of CMakePresets.json + and CMakeUserPresets.json in the same directory with the same name. + However, a package preset may have the same name as a configure, + build, test, or workflow preset. + sphinxDescription: | + A required string representing the machine-friendly name of the + preset. This identifier is used in the :option:`cpack --preset` + option. There must not be two package presets in the union of + ``CMakePresets.json`` and ``CMakeUserPresets.json`` in the same + directory with the same name. However, a package preset may have + the same name as a configure, build, test, or workflow preset. + hidden: + type: boolean + description: + An optional boolean specifying whether or not a preset should be + hidden. If a preset is hidden, it cannot be used in the --preset + argument and does not have to have a valid configurePreset, even + from inheritance. hidden presets are intended to be used as a base + for other presets to inherit via the inherits field. + sphinxDescription: | + An optional boolean specifying whether or not a preset should be + hidden. If a preset is hidden, it cannot be used in the + :cpack-option:`--preset` argument and does not have to have a valid + ``configurePreset``, even from inheritance. ``hidden`` presets are + intended to be used as a base for other presets to inherit via the + ``inherits`` field. + inherits: *preset-inherits + condition: *condition + vendor: *preset-vendor + displayName: *preset-displayName + description: *preset-description + environment: *preset-environment + configurePreset: + type: string + minLength: 1 + description: + An optional string specifying the name of a configure preset to + associate with this package preset. If configurePreset is not + specified, it must be inherited from the inherits preset (unless + this preset is hidden). The build tree directory is inferred from + the configure preset. + sphinxDescription: | + An optional string specifying the name of a configure preset to + associate with this package preset. If ``configurePreset`` is not + specified, it must be inherited from the inherits preset (unless + this preset is hidden). The build directory is inferred from the + configure preset, so packaging will run in the same ``binaryDir`` + that the configuration did and build did. + inheritConfigureEnvironment: + type: boolean + description: + An optional boolean that defaults to true. If true, the environment + variables from the associated configure preset are inherited after + all inherited package preset environments, but before environment + variables explicitly specified in this package preset. + sphinxDescription: | + An optional boolean that defaults to ``true``. If ``true``, the + environment variables from the associated configure preset are + inherited after all inherited package preset environments, but + before environment variables explicitly specified in this package + preset. + generators: + type: array + description: + An optional array of strings representing generators for CPack to + use. + items: + type: string + description: + An optional string representing the name of a CPack generator + to use. + configurations: + type: array + description: + An optional array of strings representing build configurations for + CPack to package. + items: + type: string + description: + An optional string representing the name of a configuration to + package. + variables: + type: object + description: + An optional map of variables to pass to CPack, equivalent to -D + arguments. Each key is the name of a variable, and the value is the + string to assign to that variable. + sphinxDescription: | + An optional map of variables to pass to CPack, equivalent to + :cpack-option:`-D` arguments. Each key is the name of a variable, + and the value is the string to assign to that variable. + properties: {} + propertyNames: + pattern: '^.+$' + additionalProperties: + type: string + description: + An optional string representing the value of the variable. + configFile: + type: string + description: + An optional string representing the config file for CPack to use. + output: + id: packageOutput + type: object + description: + An optional object specifying output options. + sphinxDescription: | + An optional object specifying output options. Valid keys are: + + .. include:: presets/packageOutput-properties.rst + properties: + debug: + type: boolean + description: + An optional boolean specifying whether or not to print debug + information. A value of true is equivalent to passing --debug + on the command line. + sphinxDescription: | + An optional boolean specifying whether or not to print debug + information. A value of ``true`` is equivalent to passing + :cpack-option:`--debug` on the command line. + verbose: + type: boolean + description: + An optional boolean specifying whether or not to print + verbosely. A value of true is equivalent to passing --verbose + on the command line. + sphinxDescription: | + An optional boolean specifying whether or not to print + verbosely. A value of ``true`` is equivalent to passing + :cpack-option:`--verbose` on the command line. + unevaluatedProperties: false + packageName: + type: string + description: + An optional string representing the package name. + sphinxNote: &package-naming-note | + Due to problems with the implementation, this field does not affect + the name of the final package file produced. However, other aspects + of the package may use the value, leading to inconsistencies. A + future CMake release may address this problem, but until then, it + is recommended that this field not be used. + packageVersion: + type: string + description: + An optional string representing the package version. + sphinxNote: *package-naming-note + packageDirectory: + type: string + description: + An optional string representing the directory in which to place the + package. + vendorName: + type: string + description: + An optional string representing the vendor name. + unevaluatedProperties: false + workflowPresets: + since: 6 + type: array + description: + An optional array of workflow preset objects. Used to execute configure, + build, test, and package presets in order. + sphinxDescription: | + An optional array of `Workflow Preset`_ objects. + items: + type: object + description: + A workflow preset object. + properties: + name: + type: string + required: true + minLength: 1 + description: + A required string representing the machine-friendly name of the + preset. This identifier is used in the cmake --workflow --preset + option. There must not be two presets (configure, build, test, + package, or workflow) in the union of CMakePresets.json and + CMakeUserPresets.json in the same directory with the same name. + However, a workflow preset may have the same name as a configure, + build, test, or package preset. + sphinxDescription: | + A required string representing the machine-friendly name of the + preset. This identifier is used in the + :option:`cmake --workflow --preset ` + option. There must not be two workflow presets in the union of + ``CMakePresets.json`` and ``CMakeUserPresets.json`` in the same + directory with the same name. However, a workflow preset may have + the same name as a configure, build, test, or package preset. + vendor: *preset-vendor + displayName: *preset-displayName + description: *preset-description + steps: + type: array + required: true + description: + A required array of objects describing the steps of the workflow. + The first step must be a configure preset, and all subsequent steps + must be non-configure presets whose configurePreset field matches + the starting configure preset. + sphinxDescription: | + A required array of objects describing the steps of the workflow. + The first step must be a configure preset, and all subsequent steps + must be non-configure presets whose ``configurePreset`` field + matches the starting configure preset. Each object may contain the + following fields: + + .. include:: presets/steps-properties.rst + items: + type: object + properties: + type: + type: string + enum: + - configure + - build + - test + - package + description: + A required string. The first step must be configure. + Subsequent steps must be either build, test, or package. + sphinxDescription: | + A required string. The first step must be ``configure``. + Subsequent steps must be either ``build``, ``test``, or + ``package``. + name: + type: string + minLength: 1 + description: + A required string representing the name of the configure, + build, test, or package preset to run as this workflow step. + unevaluatedProperties: false + unevaluatedProperties: false +additionalProperties: false diff --git a/Help/manual/presets/steps-properties.rst b/Help/manual/presets/steps-properties.rst new file mode 100644 index 0000000000..6da4a514c5 --- /dev/null +++ b/Help/manual/presets/steps-properties.rst @@ -0,0 +1,14 @@ +.. This file was generated by Utilities/Scripts/regenerate-presets.py + from Help/manual/presets/schema.yaml. Do not edit. + +.. _`CMakePresets.workflowPresets.steps.type`: + +``type`` + A required string. The first step must be ``configure``. + Subsequent steps must be either ``build``, ``test``, or + ``package``. + +.. _`CMakePresets.workflowPresets.steps.name`: + +``name`` + A required string representing the name of the configure, build, test, or package preset to run as this workflow step. diff --git a/Help/manual/presets/testOutput-properties.rst b/Help/manual/presets/testOutput-properties.rst new file mode 100644 index 0000000000..3e5a6df693 --- /dev/null +++ b/Help/manual/presets/testOutput-properties.rst @@ -0,0 +1,107 @@ +.. This file was generated by Utilities/Scripts/regenerate-presets.py + from Help/manual/presets/schema.yaml. Do not edit. + +.. _`CMakePresets.testPresets.output.shortProgress`: + +``shortProgress`` + An optional bool. If ``true``, equivalent to passing + :ctest-option:`--progress` on the command line. + +.. _`CMakePresets.testPresets.output.verbosity`: + +``verbosity`` + An optional string specifying verbosity level. Must be one of + the following: + + ``default`` + Equivalent to passing no verbosity flags on the command line. + + ``verbose`` + Equivalent to passing :ctest-option:`--verbose` on the + command line. + + ``extra`` + Equivalent to passing :ctest-option:`--extra-verbose` on the + command line. + +.. _`CMakePresets.testPresets.output.debug`: + +``debug`` + An optional bool. If ``true``, equivalent to passing + :ctest-option:`--debug` on the command line. + +.. _`CMakePresets.testPresets.output.outputOnFailure`: + +``outputOnFailure`` + An optional bool. If ``true``, equivalent to passing + :ctest-option:`--output-on-failure` on the command line. + +.. _`CMakePresets.testPresets.output.quiet`: + +``quiet`` + An optional bool. If ``true``, equivalent to passing + :ctest-option:`--quiet` on the command line. + +.. _`CMakePresets.testPresets.output.outputLogFile`: + +``outputLogFile`` + An optional string specifying a path to a log file. Equivalent + to passing :ctest-option:`--output-log` on the command line. + This field supports `macro expansion`_. + +.. _`CMakePresets.testPresets.output.outputJUnitFile`: + +``outputJUnitFile`` + .. presets-versionadded:: 6 + + An optional string specifying a path to a JUnit file. + Equivalent to passing :ctest-option:`--output-junit` on the + command line. This field supports `macro expansion`_. + +.. _`CMakePresets.testPresets.output.labelSummary`: + +``labelSummary`` + An optional bool. If ``false``, equivalent to passing + :ctest-option:`--no-label-summary` on the command line. + +.. _`CMakePresets.testPresets.output.subprojectSummary`: + +``subprojectSummary`` + An optional bool. If ``false``, equivalent to passing + :ctest-option:`--no-subproject-summary` on the command line. + +.. _`CMakePresets.testPresets.output.maxPassedTestOutputSize`: + +``maxPassedTestOutputSize`` + An optional integer specifying the maximum output for passed + tests in bytes. Equivalent to passing + :ctest-option:`--test-output-size-passed` on the command line. + +.. _`CMakePresets.testPresets.output.maxFailedTestOutputSize`: + +``maxFailedTestOutputSize`` + An optional integer specifying the maximum output for failed + tests in bytes. Equivalent to passing + :ctest-option:`--test-output-size-failed` on the command line. + +.. _`CMakePresets.testPresets.output.testOutputTruncation`: + +``testOutputTruncation`` + .. presets-versionadded:: 5 + + An optional string specifying the test output truncation mode. + Equivalent to passing :ctest-option:`--test-output-truncation` + on the command line. Must be one of the following values: + + * ``tail`` + + * ``middle`` + + * ``head`` + +.. _`CMakePresets.testPresets.output.maxTestNameWidth`: + +``maxTestNameWidth`` + An optional integer specifying the maximum width of a test name + to output. Equivalent to passing :ctest-option:`--max-width` on + the command line. diff --git a/Help/manual/presets/testPresets-properties.rst b/Help/manual/presets/testPresets-properties.rst new file mode 100644 index 0000000000..293d88fdd7 --- /dev/null +++ b/Help/manual/presets/testPresets-properties.rst @@ -0,0 +1,146 @@ +.. This file was generated by Utilities/Scripts/regenerate-presets.py + from Help/manual/presets/schema.yaml. Do not edit. + +.. _`CMakePresets.testPresets.name`: + +``name`` + A required string representing the machine-friendly name of the + preset. This identifier is used in the :option:`ctest --preset` + option. There must not be two test presets in the union of + ``CMakePresets.json`` and ``CMakeUserPresets.json`` in the same + directory with the same name. However, a test preset may have the + same name as a configure, build, package, or workflow preset. + +.. _`CMakePresets.testPresets.hidden`: + +``hidden`` + An optional boolean specifying whether or not a preset should be + hidden. If a preset is hidden, it cannot be used in the + :ctest-option:`--preset` argument and does not have to have a valid + ``configurePreset``, even from inheritance. ``hidden`` presets are + intended to be used as a base for other presets to inherit via the + ``inherits`` field. + +.. _`CMakePresets.testPresets.inherits`: + +``inherits`` + An optional array of strings representing the names of presets from which + to inherit. This field can also be a string, which is equivalent to an + array containing one string. + + The preset will inherit all of the fields from the ``inherits`` presets + by default (except ``name``, ``hidden``, ``inherits``, ``description``, + and ``displayName``), but can override them as desired. If multiple + ``inherits`` presets provide conflicting values for the same field, the + earlier preset in the ``inherits`` array will be preferred. + + A preset can only inherit from another preset that is defined in the same + file or in one of the files it includes (directly or indirectly). Presets + in ``CMakePresets.json`` may not inherit from presets in + ``CMakeUserPresets.json``. + +.. _`CMakePresets.testPresets.condition`: + +``condition`` + .. presets-versionadded:: 3 + + An optional `Condition`_ object. + +.. _`CMakePresets.testPresets.vendor`: + +``vendor`` + An optional map containing vendor-specific information. CMake does not + interpret the contents of this field except to verify that it is a map if + it does exist. However, it should follow the same conventions as the + root-level ``vendor`` field. If vendors use their own per-preset + ``vendor`` field, they should implement inheritance in a sensible manner + when appropriate. + +.. _`CMakePresets.testPresets.displayName`: + +``displayName`` + An optional string with a human-friendly name of the preset. + +.. _`CMakePresets.testPresets.description`: + +``description`` + An optional string with a human-friendly description of the preset. + +.. _`CMakePresets.testPresets.environment`: + +``environment`` + An optional map of environment variables. The key is the variable name + (which may not be an empty string), and the value is either ``null`` or a + string representing the value of the variable. Each variable is set + regardless of whether or not a value was given to it by the process's + environment. + + This field supports `macro expansion`_, and environment variables in this + map may reference each other, and may be listed in any order, as long as + such references do not cause a cycle (for example, if ``ENV_1`` is + ``$env{ENV_2}``, ``ENV_2`` may not be ``$env{ENV_1}``). ``$penv{NAME}`` + allows one to prepend or append values to existing environment variables + by accessing only values from the parent environment. + + Environment variables are inherited through the ``inherits`` field, and + the preset's environment will be the union of its own ``environment`` and + the ``environment`` from all its parents. If multiple presets in this + union define the same variable, the standard rules of ``inherits`` are + applied. Setting a variable to ``null`` causes it to not be set, even if + a value was inherited from another preset. + +.. _`CMakePresets.testPresets.configurePreset`: + +``configurePreset`` + An optional string specifying the name of a configure preset to + associate with this test preset. If ``configurePreset`` is not + specified, it must be inherited from the inherits preset (unless + this preset is hidden). The build directory is inferred from the + configure preset, so tests will run in the same ``binaryDir`` that + the configuration and build used. + +.. _`CMakePresets.testPresets.inheritConfigureEnvironment`: + +``inheritConfigureEnvironment`` + An optional boolean that defaults to ``true``. If ``true``, the + environment variables from the associated configure preset are + inherited after all inherited test preset environments, but before + environment variables explicitly specified in this test preset. + +.. _`CMakePresets.testPresets.configuration`: + +``configuration`` + An optional string. Equivalent to passing + :ctest-option:`--build-config` on the command line. + +.. _`CMakePresets.testPresets.overwriteConfigurationFile`: + +``overwriteConfigurationFile`` + An optional array of configuration options to overwrite options + specified in the CTest configuration file. Equivalent to passing + :ctest-option:`--overwrite` for each value in the array. The array + values support `macro expansion`_. + +.. _`CMakePresets.testPresets.output`: + +``output`` + An optional object specifying output options. + The object may contain the following fields: + + .. include:: presets/testOutput-properties.rst + +.. _`CMakePresets.testPresets.filter`: + +``filter`` + An optional object specifying how to filter the tests to run. + The object may contain the following fields: + + .. include:: presets/filter-properties.rst + +.. _`CMakePresets.testPresets.execution`: + +``execution`` + An optional object specifying options for test execution. + The object may contain the following fields: + + .. include:: presets/execution-properties.rst diff --git a/Help/manual/presets/toolset-properties.rst b/Help/manual/presets/toolset-properties.rst new file mode 100644 index 0000000000..1fc91cafae --- /dev/null +++ b/Help/manual/presets/toolset-properties.rst @@ -0,0 +1,27 @@ +.. This file was generated by Utilities/Scripts/regenerate-presets.py + from Help/manual/presets/schema.yaml. Do not edit. + +.. _`CMakePresets.configurePresets.toolset.value`: + +``value`` + An optional string representing the value. + +.. _`CMakePresets.configurePresets.toolset.strategy`: + +``strategy`` + An optional string telling CMake how to handle the field. + Valid values are: + + ``"set"`` + Set the respective value. This will result in an error for generators + that do not support the respective field. + + ``"external"`` + Do not set the value, even if the generator supports it. This is + useful if, for example, a preset uses the Ninja generator, and an IDE + knows how to set up the Visual C++ environment from the architecture + and toolset fields. In that case, CMake will ignore the field, but + the IDE can use them to set up the environment before invoking CMake. + + If no ``strategy`` field is given, or if the field uses the string form + rather than the object form, the behavior is the same as ``"set"``. diff --git a/Help/manual/presets/trace-properties.rst b/Help/manual/presets/trace-properties.rst new file mode 100644 index 0000000000..b7b8b94e8f --- /dev/null +++ b/Help/manual/presets/trace-properties.rst @@ -0,0 +1,53 @@ +.. This file was generated by Utilities/Scripts/regenerate-presets.py + from Help/manual/presets/schema.yaml. Do not edit. + +.. _`CMakePresets.configurePresets.trace.mode`: + +``mode`` + An optional string that specifies the trace mode. + Valid values are: + + ``on`` + Causes a trace of all calls made and from where to be + printed. Equivalent to passing :cmake-option:`--trace` + on the command line. + + ``off`` + A trace of all calls will not be printed. + + ``expand`` + Causes a trace with variables expanded of all calls made + and from where to be printed. Equivalent to passing + :cmake-option:`--trace-expand` on the command line. + +.. _`CMakePresets.configurePresets.trace.format`: + +``format`` + An optional string that specifies the format output of the + trace. Valid values are: + + ``human`` + Prints each trace line in a human-readable format. + This is the default format. Equivalent to passing + :cmake-option:`--trace-format=human` + on the command line. + + ``json-v1`` + Prints each line as a separate JSON document. Equivalent + to passing :cmake-option:`--trace-format=json-v1` + on the command line. + +.. _`CMakePresets.configurePresets.trace.source`: + +``source`` + An optional array of strings representing the paths of source + files to be traced. This field can also be a string, which is + equivalent to an array containing one string. Equivalent to + passing :cmake-option:`--trace-source` on the command line. + +.. _`CMakePresets.configurePresets.trace.redirect`: + +``redirect`` + An optional string specifying a path to a trace output file. + Equivalent to passing :cmake-option:`--trace-redirect` on the + command line. diff --git a/Help/manual/presets/warnings-properties.rst b/Help/manual/presets/warnings-properties.rst new file mode 100644 index 0000000000..f0b0e05af3 --- /dev/null +++ b/Help/manual/presets/warnings-properties.rst @@ -0,0 +1,43 @@ +.. This file was generated by Utilities/Scripts/regenerate-presets.py + from Help/manual/presets/schema.yaml. Do not edit. + +.. _`CMakePresets.configurePresets.warnings.deprecated`: + +``deprecated`` + An optional boolean. Equivalent to passing + :cmake-option:`-Wdeprecated` or + :cmake-option:`-Wno-deprecated` + on the command line. + This may not be set to ``false`` + if ``errors.deprecated`` is set to ``true``. + +.. _`CMakePresets.configurePresets.warnings.dev`: + +``dev`` + An optional boolean. Equivalent to passing + :cmake-option:`-Wdev` or + :cmake-option:`-Wno-dev` + on the command line. + This may not be set to ``false`` + if ``errors.dev`` is set to ``true``. + +.. _`CMakePresets.configurePresets.warnings.uninitialized`: + +``uninitialized`` + An optional boolean. Setting this to ``true`` is equivalent to + passing :cmake-option:`--warn-uninitialized` on the command + line. + +.. _`CMakePresets.configurePresets.warnings.unusedCli`: + +``unusedCli`` + An optional boolean. Setting this to ``false`` is equivalent to + passing :cmake-option:`--no-warn-unused-cli` on the command + line. + +.. _`CMakePresets.configurePresets.warnings.systemVars`: + +``systemVars`` + An optional boolean. Setting this to ``true`` is equivalent to + passing :cmake-option:`--check-system-vars` on the command + line. diff --git a/Help/manual/presets/workflowPresets-properties.rst b/Help/manual/presets/workflowPresets-properties.rst new file mode 100644 index 0000000000..fdebe968ae --- /dev/null +++ b/Help/manual/presets/workflowPresets-properties.rst @@ -0,0 +1,44 @@ +.. This file was generated by Utilities/Scripts/regenerate-presets.py + from Help/manual/presets/schema.yaml. Do not edit. + +.. _`CMakePresets.workflowPresets.name`: + +``name`` + A required string representing the machine-friendly name of the + preset. This identifier is used in the + :option:`cmake --workflow --preset ` + option. There must not be two workflow presets in the union of + ``CMakePresets.json`` and ``CMakeUserPresets.json`` in the same + directory with the same name. However, a workflow preset may have + the same name as a configure, build, test, or package preset. + +.. _`CMakePresets.workflowPresets.vendor`: + +``vendor`` + An optional map containing vendor-specific information. CMake does not + interpret the contents of this field except to verify that it is a map if + it does exist. However, it should follow the same conventions as the + root-level ``vendor`` field. If vendors use their own per-preset + ``vendor`` field, they should implement inheritance in a sensible manner + when appropriate. + +.. _`CMakePresets.workflowPresets.displayName`: + +``displayName`` + An optional string with a human-friendly name of the preset. + +.. _`CMakePresets.workflowPresets.description`: + +``description`` + An optional string with a human-friendly description of the preset. + +.. _`CMakePresets.workflowPresets.steps`: + +``steps`` + A required array of objects describing the steps of the workflow. + The first step must be a configure preset, and all subsequent steps + must be non-configure presets whose ``configurePreset`` field + matches the starting configure preset. Each object may contain the + following fields: + + .. include:: presets/steps-properties.rst diff --git a/Help/variable/CMAKE_INSTALL_PREFIX.rst b/Help/variable/CMAKE_INSTALL_PREFIX.rst index 340bc35e92..6ccdeec490 100644 --- a/Help/variable/CMAKE_INSTALL_PREFIX.rst +++ b/Help/variable/CMAKE_INSTALL_PREFIX.rst @@ -60,6 +60,6 @@ See Also * The :option:`--install-prefix ` option. * The :genex:`$` generator expression. -* The :ref:`installDir ` field in CMake configure - presets. +* The :ref:`installDir ` field in + CMake configure presets. * The :variable:`CPACK_PACKAGING_INSTALL_PREFIX` variable. diff --git a/Utilities/Scripts/regenerate-presets.py b/Utilities/Scripts/regenerate-presets.py new file mode 100755 index 0000000000..ccb5bab079 --- /dev/null +++ b/Utilities/Scripts/regenerate-presets.py @@ -0,0 +1,686 @@ +#!/usr/bin/env python3 +"""Generate CMake presets documentation (reST) and JSON schema. + +The documentation and JSON schema for CMake presets are both generated from +Help/manual/presets/schema.yaml, which describes the schema in a way that +allows both documentation forms to be combined in a single file, and also makes +it much easier to manage version revisions (compared to editing the JSON schema +'by hand'). + +All input and output files are expected to be in known locations relative to +this script. + +Usage: python3 regenerate-presets.py +""" + +import json +from copy import deepcopy +from pathlib import Path +from typing import Any, Self + +import yaml + +LATEST = 1 +TYPES = {} +REFS = {} + +PRESETS_REL = 'Help/manual/presets' +SCHEMA_YAML_FILENAME = 'schema.yaml' +SCHEMA_JSON_FILENAME = 'schema.json' + +WORKSPACE = Path(__file__).parent.parent.parent.absolute() +PRESETS = WORKSPACE / PRESETS_REL + +RST_BANNER = f"""\ +.. This file was generated by {Path(__file__).relative_to(WORKSPACE)} + from {PRESETS_REL}/{SCHEMA_YAML_FILENAME}. Do not edit. +""" + + +# ============================================================================= +class Value: + + # ------------------------------------------------------------------------- + def __init__(self, data: list[dict[str, Any]]): + self.data = data + self.spans = None + + # ------------------------------------------------------------------------- + @property + def objects(self) -> dict[str, 'Object']: + return {} + + # ------------------------------------------------------------------------- + def updateSpans(self, since: int, until: int) -> None: + self.spans = [(since, until)] + + # ------------------------------------------------------------------------- + def updateRefs(self, objects: dict[str, 'Object']) -> None: + pass + + # ------------------------------------------------------------------------- + def defs(self) -> dict[str, Any]: + return {} + + # ------------------------------------------------------------------------- + def schema(self, version: int) -> dict[str, Any]: + return deepcopy(self.data) + + +# ============================================================================= +class Object(Value): + + # ------------------------------------------------------------------------- + def __init__(self, data: dict[str, Any], name: str, + label: str | None = None): + # Prevent data sharing from modifying unrelated parts of the schema as + # we pick apart our section. + data = deepcopy(data) + + self.name = data.pop('id', name) + self.label = label + + self.properties = {} + for n, p in data.pop('properties').items(): + pl = '.'.join([label, n]) if label is not None else n + self.properties[n] = Property(p, n, pl) + if len(self.properties): + self.properties[CommentProperty.name] = CommentProperty() + + ap = data.pop('additionalProperties', None) + if ap is not None: + self.additionalProperties = buildValue(ap, self.name, self.label) + else: + self.additionalProperties = None + + super().__init__(data) + + # ------------------------------------------------------------------------- + @property + def objects(self) -> dict[str, Self]: + out = {self.name: self} + for p in self.properties.values(): + out.update(p.objects) + if self.additionalProperties is not None: + out.update(self.additionalProperties.objects) + return out + + # ------------------------------------------------------------------------- + def updateSpans(self, since: int, until: int) -> None: + spans = [[(since, until)]] + for p in self.properties.values(): + p.updateSpans(since, until) + spans.append(p.spans) + if self.additionalProperties is not None: + self.additionalProperties.updateSpans(since, until) + spans.append(self.additionalProperties.spans) + self.spans = combineSpans(*spans) + + # ------------------------------------------------------------------------- + def updateRefs(self, objects: dict[str, 'Object']) -> None: + for p in self.properties.values(): + p.updateRefs(objects) + if self.additionalProperties is not None: + self.additionalProperties.updateRefs(objects) + + # ------------------------------------------------------------------------- + def doc(self, since: int, until: int) -> str | None: + since = max(since, self.spans[0][0]) + until = min(until, self.spans[-1][1]) + + out = [] + for _, p in self.properties.items(): + content = p.doc(since, until) + if not content: + continue + out.append(content) + + return '\n\n'.join(out) if len(out) else None + + # ------------------------------------------------------------------------- + def defs(self, exclude: set[str] = {}) -> dict[str, Any]: + out = {} + for n, p in self.properties.items(): + if n in exclude: + continue + for s in p.spans: + r = f'{p.label}@{spanRef(*s)}' + out[r] = p.schema(s[0]) + out.update(p.defs()) + if self.additionalProperties is not None: + out.update(self.additionalProperties.defs()) + return out + + # ------------------------------------------------------------------------- + def schema(self, version: int, inline: set[str] = {}) -> dict[str, Any]: + out = deepcopy(self.data) + + props = {} + required = [] + for n, p in self.properties.items(): + if n in inline: + props[n] = p.schema(version) + else: + r = p.ref(version) + if r is not None: + props[n] = r + if p.required: + required.append(n) + + out['properties'] = props + if len(required): + out['required'] = required + + if self.additionalProperties is not None: + ap = self.additionalProperties.schema(version) + out['additionalProperties'] = ap + return out + + +# ============================================================================= +class Ref(Value): + + # ------------------------------------------------------------------------- + def __init__(self, data: list[dict[str, Any]]): + self.target = data.pop('target') + self.targetSpans = None + super().__init__(data) + + # ------------------------------------------------------------------------- + def updateSpans(self, since: int, until: int) -> None: + if self.spans is None: + super().updateSpans(since, until) + self.spans = trimSpans(self.spans, since, until) + + # ------------------------------------------------------------------------- + def updateRefs(self, objects: dict[str, 'Object']) -> None: + global REFS + + t = objects.get(self.target) + if t is not None: + since = self.spans[0][0] + until = self.spans[-1][1] + self.spans = trimSpans(t.spans, since, until) + self.targetSpans = t.spans + + rs = REFS.get(self.target, (since, until)) + REFS[self.target] = (min(since, rs[0]), max(until, rs[1])) + + # ------------------------------------------------------------------------- + def schema(self, version: int) -> dict[str, Any]: + ts = trimSpans(self.targetSpans, *REFS[self.target]) + s = findSpan(ts, version) + if s is not None: + return { + '$ref': f'#/definitions/{self.target}@{spanRef(*s)}', + } + return {} + + +# ============================================================================= +class Array(Value): + + # ------------------------------------------------------------------------- + def __init__(self, data: dict[str, Any], name: str, label: str): + item = data.pop('items') + self.value = buildValue(item, name, label) + + super().__init__(data) + + # ------------------------------------------------------------------------- + @property + def objects(self) -> dict[str, Object]: + return self.value.objects + + # ------------------------------------------------------------------------- + def updateSpans(self, since: int, until: int) -> None: + self.value.updateSpans(since, until) + self.spans = self.value.spans + + # ------------------------------------------------------------------------- + def updateRefs(self, objects: dict[str, 'Object']) -> None: + self.value.updateRefs(objects) + + # ------------------------------------------------------------------------- + def defs(self) -> dict[str, Any]: + return self.value.defs() + + # ------------------------------------------------------------------------- + def schema(self, version: int) -> dict[str, Any]: + out = deepcopy(self.data) + out['items'] = self.value.schema(version) + return out + + +# ============================================================================= +class Union(Value): + + # ------------------------------------------------------------------------- + def __init__(self, data: list[dict[str, Any]], name: str, label: str): + self.items = [] + for i, d in enumerate(data): + self.items.append(buildValue(d, name, self.itemLabel(label, i))) + + super().__init__({}) + + # ------------------------------------------------------------------------- + def itemLabel(self, label: str, index: int) -> str: + return label + + # ------------------------------------------------------------------------- + @property + def objects(self) -> dict[str, Object]: + out = {} + for v in self.items: + out.update(v.objects) + return out + + # ------------------------------------------------------------------------- + def updateSpans(self, since: int, until: int) -> None: + spans = [[(since, until)]] + for i in self.items: + i.updateSpans(since, until) + spans.append(i.spans) + self.spans = combineSpans(*spans) + + # ------------------------------------------------------------------------- + def updateRefs(self, objects: dict[str, 'Object']) -> None: + for i in self.items: + i.updateRefs(objects) + + # ------------------------------------------------------------------------- + def defs(self) -> dict[str, Any]: + out = {} + for v in self.items: + out.update(v.defs()) + return out + + # ------------------------------------------------------------------------- + def schema(self, version: int) -> dict[str, Any]: + out = [] + for i in self.items: + out.append(i.schema(version)) + return {'anyOf': out} + + +# ============================================================================= +class Variant(Union): + + # ------------------------------------------------------------------------- + def __init__(self, data: list[dict[str, Any]], name: str, label: str): + self.identifier = data.pop('id', None) + + if self.identifier is not None: + name = self.identifier + label = self.identifier + + super().__init__(data.pop('items'), name, label) + + # ------------------------------------------------------------------------- + def itemLabel(self, label: str, index: int) -> str: + return f'{label}[{index}]' + + # ------------------------------------------------------------------------- + @property + def objects(self) -> dict[str, Object]: + out = super().objects + if self.identifier is not None: + out[self.identifier] = self + return out + + # ------------------------------------------------------------------------- + def doc(self, since: int, until: int) -> None: + return None + + # ------------------------------------------------------------------------- + def defs(self) -> dict[str, Any]: + out = super().defs() + + if self.identifier is not None: + for s in self.spans: + n = f'{self.identifier}@{spanRef(*s)}' + out[n] = super().schema(s[0]) + + return out + + # ------------------------------------------------------------------------- + def schema(self, version: int) -> dict[str, Any]: + if self.identifier is not None: + s = findSpan(self.spans, version) + if s is not None: + return { + '$ref': f'#/definitions/{self.identifier}@{spanRef(*s)}', + } + return {} + + return super().schema(version) + + +# ============================================================================= +class Property: + + # ------------------------------------------------------------------------- + def __init__(self, data: dict[str, Any], name: str, label: str): + self.name = name + self.label = label + self.since = data.pop('since', 1) + self.until = data.pop('until', LATEST + 1) + self.required = data.pop('required', False) + self.content = data.pop('sphinxDescription', data.get('description')) + + note = data.pop('sphinxNote', None) + if note is not None: + self.content += f'\n\n.. note::\n\n{indent(note)}' + + self._revisions = [] + for rev in data.pop('revisions', []): + rd = deepcopy(data) + rd.update(rev) + self._revisions.append(Property(rd, self.name, self.label)) + + if len(self._revisions): + self.since = max(self.since, + min([r.since for r in self._revisions])) + self.until = min(self.until, + max([r.until for r in self._revisions])) + self.value = None + else: + self.value = buildValue(data, self.name, self.label) + + self.spans = None + + # ------------------------------------------------------------------------- + @property + def objects(self) -> dict[str, Object]: + if len(self._revisions): + out = {} + for r in self._revisions: + out.update(r.objects) + return out + + return self.value.objects + + # ------------------------------------------------------------------------- + def updateSpans(self, since: int, until: int) -> None: + since = max(since, self.since) + until = min(until, self.until) + + if len(self._revisions): + spans = [[(since, until)]] + for r in self._revisions: + r.updateSpans(since, until) + spans.append(r.spans) + self.spans = combineSpans(*spans) + else: + self.value.updateSpans(since, until) + self.spans = self.value.spans + + # ------------------------------------------------------------------------- + def updateRefs(self, objects: dict[str, 'Object']) -> None: + if len(self._revisions): + for r in self._revisions: + r.updateRefs(objects) + else: + self.value.updateRefs(objects) + + # ------------------------------------------------------------------------- + def ref(self, version: int) -> dict[str, str] | None: + s = findSpan(self.spans, version) + if s is not None: + return { + '$ref': f'#/definitions/{self.label}@{spanRef(*s)}', + } + return None + + # ------------------------------------------------------------------------- + def doc(self, since: int, until: int) -> str | None: + if self.content is None: + return None + + out = f'.. _`CMakePresets.{self.label}`:\n\n``{self.name}``\n' + if self.since > since: + out += f' .. presets-versionadded:: {self.since}\n\n' + if self.until < until: + out += f' .. presets-versionremoved:: {self.until}\n\n' + out += indent(self.content) + + return out + + # ------------------------------------------------------------------------- + def defs(self) -> dict[str, Any]: + if len(self._revisions): + out = {} + for r in self._revisions: + out.update(r.defs()) + return out + + return self.value.defs() + + # ------------------------------------------------------------------------- + def schema(self, version: int) -> dict[str, Any]: + for r in self._revisions: + if version >= r.since and version < r.until: + return r.value.schema(version) + return self.value.schema(version) + + +# ============================================================================= +class CommentProperty(Property): + name: str = '$comment' + since: int = 10 + + # ------------------------------------------------------------------------- + def __init__(self): + data = { + 'since': type(self).since, + 'id': 'comment', + 'type': 'variant', + 'items': [ + { + 'type': 'string', + 'description': 'A single-line comment.', + }, + { + 'type': 'array', + 'description': 'A multi-line comment.', + 'minItems': 1, + 'items': { + 'type': 'string', + 'description': 'One line of the multi-line comment.', + } + } + ], + } + super().__init__(data, type(self).name, type(self).name) + + # ------------------------------------------------------------------------- + def doc(self, since: int, until: int) -> None: + return None + + +# ----------------------------------------------------------------------------- +def buildValue( + data: Any, name: str, label: str | None = None +) -> Variant | Object | Array | Ref | Value: + if type(data) is dict: + if 'anyOf' in data: + return Union(data.pop('anyOf'), name, label) + elif data['type'] == 'variant': + return Variant(data, name, label) + elif data['type'] == 'array': + return Array(data, name, label) + elif data['type'] == 'object': + return Object(data, name, label) + elif data['type'] == 'ref': + return Ref(data) + + return Value(data) + + +# ----------------------------------------------------------------------------- +def extractDivisions(spans: list[tuple[int, int]]) -> set[int]: + return {n for s in spans for n in s} + + +# ----------------------------------------------------------------------------- +def trimSpans(spans: list[tuple[int, int]], + since: int, until: int) -> list[tuple[int, int]]: + divisions = extractDivisions(spans) + + last = since + out = [] + + for d in sorted(divisions): + if d > since: + out.append((last, min(d, until))) + last = min(d, until) + if d >= until: + break + + return out + + +# ----------------------------------------------------------------------------- +def combineSpans(*spans: list[tuple[int, int]]) -> list[tuple[int, int]]: + divisions = set() + for s in spans: + divisions.update(extractDivisions(s)) + + divisions = sorted(divisions) + last = divisions.pop(0) + out = [] + + for d in divisions: + out.append((last, d)) + last = d + + return out + + +# ----------------------------------------------------------------------------- +def findSpan(spans: list[tuple[int, int]], + version: int) -> tuple[int, int] | None: + for s in spans: + if version >= s[0] and version < s[1]: + return s + + return None + + +# ----------------------------------------------------------------------------- +def spanRef(since: int, until: int) -> str: + if since + 1 < until: + if until > LATEST: + return f'v{since}..' + else: + return f'v{since}..v{until - 1}' + return f'v{since}' + + +# ----------------------------------------------------------------------------- +def indent(text: str): + return '\n'.join([(' ' + line).rstrip() for line in text.split('\n')]) + + +# ----------------------------------------------------------------------------- +def trimDescriptions(data: Any): + if type(data) is dict: + for k, v in data.items(): + if type(v) is str and k in {'description', 'sphinxDescription'}: + data[k] = v.strip() + elif type(v) is dict: + data[k] = trimDescriptions(v) + elif type(v) is list: + data[k] = [trimDescriptions(item) for item in v] + + return data + + +# ----------------------------------------------------------------------------- +def main(): + # Read the schema definition. + with open(PRESETS / SCHEMA_YAML_FILENAME, 'r') as f: + schema = yaml.safe_load(f) + + # Extract the current (latest) version. + global LATEST + + del schema['definitions'] + LATEST = schema.pop('version') + + # Remove whitespace around descriptions. + schema = trimDescriptions(schema) + + # Extract global type definitions. + global TYPES, REFS + + for t in schema.pop('types', []): + name = t['id'] + value = buildValue(t, name) + value.updateSpans(1, LATEST + 1) + TYPES[name] = value + + for t in TYPES.values(): + t.updateRefs(TYPES) + + # Reset the spans for references, as these currently contain only spans for + # circular references of global types, which are likely broader than the + # actual usage spans of those types. We'll recalculate the correct spans + # when we update refs from the root object. + REFS = {} + + # Parse the root object. This will also recursively parse other objects. + root = Object(schema, 'root') + root.updateSpans(1, LATEST + 1) + + # Resolve references. + objects = root.objects + + types = objects + types.update(TYPES) + + root.updateRefs(types) + + for name, value in TYPES.items(): + span = REFS.get(name) + if span is not None: + value.updateSpans(*span) + + root.updateSpans(1, LATEST + 1) + + # Extract Sphinx documentation for each object's properties. + for n, o in objects.items(): + doc = o.doc(1, LATEST + 1) + if doc is not None: + print(f'- Generating reST documentation for {n} properties') + with open(PRESETS / f'{o.name}-properties.rst', 'w') as f: + print(RST_BANNER, file=f) + print(doc, file=f) + + # Generate schema for each version. + versions = [] + for v in range(1, LATEST + 1): + vs = root.schema(v, inline={'version'}) + vs['properties']['version']['const'] = v + versions.append(vs) + + # Add definitions and write the schema. + types = root.defs(exclude={'version'}) + for t in TYPES.values(): + types.update(t.defs()) + + schema = { + '$schema': 'http://json-schema.org/draft/2020-12/schema#', + 'type': 'object', + 'oneOf': versions, + 'required': ['version'], + 'definitions': types + } + + with open(PRESETS / SCHEMA_JSON_FILENAME, 'w') as f: + print(json.dumps(schema, indent=2), file=f) + + +# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +main() diff --git a/Utilities/Sphinx/cmake.py b/Utilities/Sphinx/cmake.py index fbc2062eea..0d676c5824 100644 --- a/Utilities/Sphinx/cmake.py +++ b/Utilities/Sphinx/cmake.py @@ -21,6 +21,8 @@ if sphinx.version_info >= (2,): from sphinx import addnodes from sphinx.directives import ObjectDescription, nl_escape_re from sphinx.domains import Domain, ObjType + from sphinx.domains.changeset import VersionChange + from sphinx.domains.changeset import versionlabels, versionlabel_classes from sphinx.domains.std import OptionXRefRole from sphinx.roles import XRefRole from sphinx.util import logging, ws_re @@ -776,4 +778,21 @@ def setup(app): app.add_transform(CMakeTransform) app.add_transform(CMakeXRefTransform) app.add_domain(CMakeDomain) + + versionlabels.update({ + 'presets-versionadded': 'Added in presets version %s', + 'presets-versionchanged': 'Changed in presets version %s', + 'presets-versionremoved': 'Removed in presets version %s', + }) + + versionlabel_classes.update({ + 'presets-versionadded': 'added', + 'presets-versionchanged': 'changed', + 'presets-versionremoved': 'removed', + }) + + app.add_directive('presets-versionadded', VersionChange) + app.add_directive('presets-versionchanged', VersionChange) + app.add_directive('presets-versionremoved', VersionChange) + return {"parallel_read_safe": True} diff --git a/Utilities/Sphinx/conf.py.in b/Utilities/Sphinx/conf.py.in index 54ebc8e215..7cceaf21ce 100644 --- a/Utilities/Sphinx/conf.py.in +++ b/Utilities/Sphinx/conf.py.in @@ -26,7 +26,8 @@ exclude_patterns = [ 'dev', # NOTE Ignore shared RST files used in `.. include::` directives 'include/*.rst', - '**/include/*.rst' + '**/include/*.rst', + 'manual/presets/*.rst', ] extensions = ['cmake']