code:
.. cmake-manual-description: CMakePresets.json

cmake-presets(7)
****************

.. only:: html

   .. contents::

Introduction
============

.. versionadded:: 3.19

One problem that CMake users often face is sharing settings with other people
for common ways to configure a project. This may be done to support CI builds,
or for users who frequently use the same build. CMake supports two main files,
``CMakePresets.json`` and ``CMakeUserPresets.json``, that allow users to
specify common configure options and share them with others. CMake also
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 <cmake --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.

``CMakePresets.json`` may be checked into a version control system, and
``CMakeUserPresets.json`` should NOT be checked in. For example, if a
project is using Git, ``CMakePresets.json`` may be tracked, and
``CMakeUserPresets.json`` should be added to the ``.gitignore``.

Format
======

The files are a JSON document with an object as the root:

.. literalinclude:: presets/example.json
  :language: json

The root object recognizes the following fields:

``$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.
  This is allowed in preset files specifying version ``8`` or above.

``version``
  A required integer representing the version of the JSON schema.
  The supported versions are:

  ``1``
    .. versionadded:: 3.19

  ``2``
    .. versionadded:: 3.20

  ``3``
    .. versionadded:: 3.21

  ``4``
    .. versionadded:: 3.23

  ``5``
    .. versionadded:: 3.24

  ``6``
    .. versionadded:: 3.25

  ``7``
    .. versionadded:: 3.27

  ``8``
    .. versionadded:: 3.28

``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.

Includes
^^^^^^^^

``CMakePresets.json`` and ``CMakeUserPresets.json`` can include other files
with the ``include`` field in file version ``4`` and later. Files included
by these files can also include other files. If ``CMakePresets.json`` and
``CMakeUserPresets.json`` are both present, ``CMakeUserPresets.json``
implicitly includes ``CMakePresets.json``, even with no ``include`` field,
in all versions of the format.

If a preset file contains presets that inherit from presets in another file,
the file must include the other file either directly or indirectly.
Include cycles are not allowed among files. If ``a.json`` includes
``b.json``, ``b.json`` cannot include ``a.json``. However, a file may be
included multiple times from the same file or from different files.

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.

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 :ref:`cmake --preset <CMake Options>` 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``
  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 :manual:`CMake GUI <cmake-gui(1)>`, 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.

``generator``
  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``). In version ``3``
  or above, this field may be omitted to fall back to regular generator
  discovery procedure.

  Note that for Visual Studio generators, unlike in the command line
  :option:`-G <cmake -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 <cmake-generators(7)>` 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"``.

``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.

``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.

``installDir``
  An optional string representing the path to the installation directory.
  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}``.)

  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 <cmake -Wdev>`
    or :option:`-Wno-dev <cmake -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 <cmake -Wdeprecated>` or
    :option:`-Wno-deprecated <cmake -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 <cmake --warn-uninitialized>` on the command
    line.

  ``unusedCli``
    An optional boolean. Setting this to ``false`` is equivalent to passing
    :option:`--no-warn-unused-cli <cmake --no-warn-unused-cli>` on the command
    line.

  ``systemVars``
    An optional boolean. Setting this to ``true`` is equivalent to passing
    :option:`--check-system-vars <cmake --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 <cmake -Werror>`
    or :option:`-Wno-error=dev <cmake -Werror>` 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 <cmake -Werror>` or
    :option:`-Wno-error=deprecated <cmake -Werror>` 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 <cmake --debug-output>` on the command line.

  ``tryCompile``
    An optional boolean. Setting this to ``true`` is equivalent to passing
    :option:`--debug-trycompile <cmake --debug-trycompile>` on the command
    line.

  ``find``
    An optional boolean. Setting this to ``true`` is equivalent to passing
    :option:`--debug-find <cmake --debug-find>` on the command line.

``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 <cmake --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 <cmake --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 <cmake --trace-format>`
      on the command line.

    ``json-v1``
      Prints each line as a separate JSON document.  Equivalent to passing
      :option:`--trace-format=json-v1 <cmake --trace-format>`
      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 <cmake --trace-source>` on the command line.

  ``redirect``
    An optional string specifying a path to a trace output file.  Equivalent
    to passing :option:`--trace-redirect <cmake --trace-redirect>`
    on the command line.

Build Preset
^^^^^^^^^^^^

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
  :ref:`cmake --build --preset <Build Tool Mode>` 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``
  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 <cmake --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}``.)

  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 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 ``CC`` and ``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.

``jobs``
  An optional integer. Equivalent to passing
  :option:`--parallel <cmake--build --parallel>` or ``-j`` on the command line.

``targets``
  An optional string or array of strings. Equivalent to passing
  :option:`--target <cmake--build --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 <cmake--build --config>` on the command line.

``cleanFirst``
  An optional bool. If true, equivalent to passing
  :option:`--clean-first <cmake--build --clean-first>` on the command line.

``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
  Visual Studio generator 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 <cmake--build --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 Visual Studio generator, 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
    ``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 <cmake--build --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
^^^^^^^^^^^

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.

``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 <ctest --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}``.)

  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 <ctest --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 <ctest --overwrite>` for each value in the array.
  The array values support macro expansion.

``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 <ctest --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 <ctest --verbose>` on
      the command line.

    ``extra``
      Equivalent to passing :option:`--extra-verbose <ctest --extra-verbose>`
      on the command line.

  ``debug``
    An optional bool. If true, equivalent to passing
    :option:`--debug <ctest --debug>` on the command line.

  ``outputOnFailure``
    An optional bool. If true, equivalent to passing
    :option:`--output-on-failure <ctest --output-on-failure>` on the command
    line.

  ``quiet``
    An optional bool. If true, equivalent to passing
    :option:`--quiet <ctest --quiet>` on the command line.

  ``outputLogFile``
    An optional string specifying a path to a log file. Equivalent to
    passing :option:`--output-log <ctest --output-log>` on the command line.
    This field supports macro expansion.

  ``outputJUnitFile``
    An optional string specifying a path to a JUnit file. Equivalent to
    passing :option:`--output-junit <ctest --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 <ctest --no-label-summary>` on the command
    line.

  ``subprojectSummary``
    An optional bool. If false, equivalent to passing
    :option:`--no-subproject-summary <ctest --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 <ctest --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 <ctest --test-output-size-failed>`
    on the command line.

  ``testOutputTruncation``
    An optional string specifying the test output truncation mode. Equivalent
    to passing
    :option:`--test-output-truncation <ctest --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 <ctest --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 <ctest --tests-regex>` on the command
      line. This field supports macro expansion. CMake regex syntax is
      described under :ref:`string(REGEX) <Regex Specification>`.

    ``label``
      An optional string specifying a regex for test labels. Equivalent to
      passing :option:`--label-regex <ctest --label-regex>` on the command
      line. This field supports macro expansion.

    ``useUnion``
      An optional bool. Equivalent to passing :option:`--union <ctest --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 <ctest --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 <ctest --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 <ctest --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 <ctest --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 <ctest --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 <ctest --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 <ctest --stop-on-failure>` on the command
    line.

  ``enableFailover``
    An optional bool. If true, equivalent to passing :option:`-F <ctest -F>`
    on the command line.

  ``jobs``
    An optional integer. Equivalent to passing
    :option:`--parallel <ctest --parallel>` on the command line.

  ``resourceSpecFile``
    An optional string. Equivalent to passing
    :option:`--resource-spec-file <ctest --resource-spec-file>` on
    the command line. This field supports macro expansion.

  ``testLoad``
    An optional integer. Equivalent to passing
    :option:`--test-load <ctest --test-load>` on the command line.

  ``showOnly``
    An optional string. Equivalent to passing
    :option:`--show-only <ctest --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 <ctest --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 <ctest --interactive-debug-mode>`
    on the command line. If false, equivalent to passing
    :option:`--interactive-debug-mode 0 <ctest --interactive-debug-mode>`
    on the command line.

  ``scheduleRandom``
    An optional bool. If true, equivalent to passing
    :option:`--schedule-random <ctest --schedule-random>` on the command
    line.

  ``timeout``
    An optional integer. Equivalent to passing
    :option:`--timeout <ctest --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 <ctest --no-tests>`
      on the command line.

    ``ignore``
      Equivalent to passing :option:`--no-tests=ignore <ctest --no-tests>`
      on the command line.

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:

``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.

``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 <cpack --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}``.)

  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 <cpack -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 <cpack --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 <cpack --verbose>`
    on the command line.

``packageName``
  An optional string representing the package name.

``packageVersion``
  An optional string representing the package version.

``packageDirectory``
  An optional string representing the directory in which to place the package.

``vendorName``
  An optional string representing the vendor name.

.. _`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:

``name``
  A required string representing the machine-friendly name of the preset.
  This identifier is used in the
  :ref:`cmake --workflow --preset <Workflow Mode>` 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``
  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.

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:

``type``
  A required string with one of the following values:

  ``"const"``
    Indicates that the condition is constant. This is equivalent to using a
    boolean in place of the object. The condition object will have the
    following additional fields:

    ``value``
      A required boolean which provides a constant value for the condition's
      evaluation.

  ``"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:

    ``lhs``
      First string to compare. This field supports macro expansion.

    ``rhs``
      Second string to compare. This field supports macro expansion.

  ``"inList"``

  ``"notInList"``
    Indicates that the condition searches for a string in a list of strings.
    The condition object will have the following additional fields:

    ``string``
      A required string to search for. This field supports macro expansion.

    ``list``
      A required array of strings to search. This field supports macro
      expansion, and uses short-circuit evaluation.

  ``"matches"``

  ``"notMatches"``
    Indicates that the condition searches for a regular expression in a string.
    The condition object will have the following additional fields:

    ``string``
      A required string to search. This field supports macro expansion.

    ``regex``
      A required regular expression to search for. This field supports macro
      expansion.

  ``"anyOf"``

  ``"allOf"``

    Indicates that the condition is an aggregation of zero or more nested
    conditions. The condition object will have the following additional fields:

    ``conditions``
      A required array of condition objects. These conditions use short-circuit
      evaluation.

  ``"not"``
    Indicates that the condition is an inversion of another condition. The
    condition object will have the following additional fields:

    ``condition``
      A required condition object.

Macro Expansion
^^^^^^^^^^^^^^^

As mentioned above, some fields support macro expansion. Macros are
recognized in the form ``$<macro-namespace>{<macro-name>}``. All macros are
evaluated in the context of the preset being used, even if the macro is in a
field that was inherited from another preset. For example, if the ``Base``
preset sets variable ``PRESET_NAME`` to ``${presetName}``, and the
``Derived`` preset inherits from ``Base``, ``PRESET_NAME`` will be set to
``Derived``.

It is an error to not put a closing brace at the end of a macro name. For
example, ``${sourceDir`` is invalid. A dollar sign (``$``) followed by
anything other than a left curly brace (``{``) with a possible namespace is
interpreted as a literal dollar sign.

Recognized macros include:

``${sourceDir}``
  Path to the project source directory (i.e. the same as
  :variable:`CMAKE_SOURCE_DIR`).

``${sourceParentDir}``
  Path to the project source directory's parent directory.

``${sourceDirName}``
  The last filename component of ``${sourceDir}``. For example, if
  ``${sourceDir}`` is ``/path/to/source``, this would be ``source``.

``${presetName}``
  Name specified in the preset's ``name`` field.

``${generator}``
  Generator specified in the preset's ``generator`` field. For build and
  test presets, this will evaluate to the generator specified by
  ``configurePreset``.

``${hostSystemName}``
  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.

``${fileDir}``
  Path to the directory containing the preset file which contains the macro.
  This is allowed in preset files specifying version ``4`` or above.

``${dollar}``
  A literal dollar sign (``$``).

``${pathListSep}``
  Native character for separating lists of paths, such as ``:`` or ``;``.

  For example, by setting ``PATH`` to
  ``/path/to/ninja/bin${pathListSep}$env{PATH}``, ``${pathListSep}`` will
  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{<variable-name>}``
  Environment variable with name ``<variable-name>``. The variable name may
  not be an empty string. If the variable is defined in the ``environment``
  field, that value is used instead of the value from the parent environment.
  If the environment variable is not defined, this evaluates as an empty
  string.

  Note that while Windows environment variable names are case-insensitive,
  variable names within a preset are still case-sensitive. This may lead to
  unexpected results when using inconsistent casing. For best results, keep
  the casing of environment variable names consistent.

``$penv{<variable-name>}``
  Similar to ``$env{<variable-name>}``, except that the value only comes from
  the parent environment, and never from the ``environment`` field. This
  allows you to prepend or append values to existing environment variables.
  For example, setting ``PATH`` to ``/path/to/ninja/bin:$penv{PATH}`` will
  prepend ``/path/to/ninja/bin`` to the ``PATH`` environment variable. This
  is needed because ``$env{<variable-name>}`` does not allow circular
  references.

``$vendor{<macro-name>}``
  An extension point for vendors to insert their own macros. CMake will not
  be able to use presets which have a ``$vendor{<macro-name>}`` macro, and
  effectively ignores such presets. However, it will still be able to use
  other presets from the same file.

  CMake does not make any attempt to interpret ``$vendor{<macro-name>}``
  macros. However, to avoid name collisions, IDE vendors should prefix
  ``<macro-name>`` with a very short (preferably <= 4 characters) vendor
  identifier prefix, followed by a ``.``, followed by the macro name. For
  example, the Example IDE could have ``$vendor{xide.ideInstallDir}``.

Schema
======

:download:`This file </manual/presets/schema.json>` provides a machine-readable
JSON schema for the ``CMakePresets.json`` format.


code:
.. cmake-manual-description: CMake Properties Reference

cmake-properties(7)
*******************

.. only:: html

   .. contents::

.. _`Global Properties`:

Properties of Global Scope
==========================

.. toctree::
   :maxdepth: 1

   /prop_gbl/ALLOW_DUPLICATE_CUSTOM_TARGETS
   /prop_gbl/AUTOGEN_SOURCE_GROUP
   /prop_gbl/AUTOGEN_TARGETS_FOLDER
   /prop_gbl/AUTOMOC_SOURCE_GROUP
   /prop_gbl/AUTOMOC_TARGETS_FOLDER
   /prop_gbl/AUTORCC_SOURCE_GROUP
   /prop_gbl/AUTOUIC_SOURCE_GROUP
   /prop_gbl/CMAKE_C_KNOWN_FEATURES
   /prop_gbl/CMAKE_CUDA_KNOWN_FEATURES
   /prop_gbl/CMAKE_CXX_KNOWN_FEATURES
   /prop_gbl/CMAKE_ROLE
   /prop_gbl/DEBUG_CONFIGURATIONS
   /prop_gbl/DISABLED_FEATURES
   /prop_gbl/ECLIPSE_EXTRA_CPROJECT_CONTENTS
   /prop_gbl/ECLIPSE_EXTRA_NATURES
   /prop_gbl/ENABLED_FEATURES
   /prop_gbl/ENABLED_LANGUAGES
   /prop_gbl/FIND_LIBRARY_USE_LIB32_PATHS
   /prop_gbl/FIND_LIBRARY_USE_LIB64_PATHS
   /prop_gbl/FIND_LIBRARY_USE_LIBX32_PATHS
   /prop_gbl/FIND_LIBRARY_USE_OPENBSD_VERSIONING
   /prop_gbl/GENERATOR_IS_MULTI_CONFIG
   /prop_gbl/GLOBAL_DEPENDS_DEBUG_MODE
   /prop_gbl/GLOBAL_DEPENDS_NO_CYCLES
   /prop_gbl/IN_TRY_COMPILE
   /prop_gbl/JOB_POOLS
   /prop_gbl/PACKAGES_FOUND
   /prop_gbl/PACKAGES_NOT_FOUND
   /prop_gbl/PREDEFINED_TARGETS_FOLDER
   /prop_gbl/REPORT_UNDEFINED_PROPERTIES
   /prop_gbl/RULE_LAUNCH_COMPILE
   /prop_gbl/RULE_LAUNCH_CUSTOM
   /prop_gbl/RULE_LAUNCH_LINK
   /prop_gbl/RULE_MESSAGES
   /prop_gbl/TARGET_ARCHIVES_MAY_BE_SHARED_LIBS
   /prop_gbl/TARGET_MESSAGES
   /prop_gbl/TARGET_SUPPORTS_SHARED_LIBS
   /prop_gbl/USE_FOLDERS
   /prop_gbl/XCODE_EMIT_EFFECTIVE_PLATFORM_NAME

.. _`Directory Properties`:

Properties on Directories
=========================

.. toctree::
   :maxdepth: 1

   /prop_dir/ADDITIONAL_CLEAN_FILES
   /prop_dir/BINARY_DIR
   /prop_dir/BUILDSYSTEM_TARGETS
   /prop_dir/CACHE_VARIABLES
   /prop_dir/CLEAN_NO_CUSTOM
   /prop_dir/CMAKE_CONFIGURE_DEPENDS
   /prop_dir/COMPILE_DEFINITIONS
   /prop_dir/COMPILE_OPTIONS
   /prop_dir/DEFINITIONS
   /prop_dir/EXCLUDE_FROM_ALL
   /prop_dir/IMPLICIT_DEPENDS_INCLUDE_TRANSFORM
   /prop_dir/IMPORTED_TARGETS
   /prop_dir/INCLUDE_DIRECTORIES
   /prop_dir/INCLUDE_REGULAR_EXPRESSION
   /prop_dir/LABELS
   /prop_dir/LINK_DIRECTORIES
   /prop_dir/LINK_OPTIONS
   /prop_dir/LISTFILE_STACK
   /prop_dir/MACROS
   /prop_dir/PARENT_DIRECTORY
   /prop_dir/RULE_LAUNCH_COMPILE
   /prop_dir/RULE_LAUNCH_CUSTOM
   /prop_dir/RULE_LAUNCH_LINK
   /prop_dir/SOURCE_DIR
   /prop_dir/SUBDIRECTORIES
   /prop_dir/SYSTEM
   /prop_dir/TESTS
   /prop_dir/TEST_INCLUDE_FILES
   /prop_dir/VARIABLES
   /prop_dir/VS_GLOBAL_SECTION_POST_section
   /prop_dir/VS_GLOBAL_SECTION_PRE_section
   /prop_dir/VS_STARTUP_PROJECT

.. _`Target Properties`:

Properties on Targets
=====================

.. toctree::
   :maxdepth: 1

   /prop_tgt/ADDITIONAL_CLEAN_FILES
   /prop_tgt/AIX_EXPORT_ALL_SYMBOLS
   /prop_tgt/ALIAS_GLOBAL
   /prop_tgt/ALIASED_TARGET
   /prop_tgt/ANDROID_ANT_ADDITIONAL_OPTIONS
   /prop_tgt/ANDROID_API
   /prop_tgt/ANDROID_API_MIN
   /prop_tgt/ANDROID_ARCH
   /prop_tgt/ANDROID_ASSETS_DIRECTORIES
   /prop_tgt/ANDROID_GUI
   /prop_tgt/ANDROID_JAR_DEPENDENCIES
   /prop_tgt/ANDROID_JAR_DIRECTORIES
   /prop_tgt/ANDROID_JAVA_SOURCE_DIR
   /prop_tgt/ANDROID_NATIVE_LIB_DEPENDENCIES
   /prop_tgt/ANDROID_NATIVE_LIB_DIRECTORIES
   /prop_tgt/ANDROID_PROCESS_MAX
   /prop_tgt/ANDROID_PROGUARD
   /prop_tgt/ANDROID_PROGUARD_CONFIG_PATH
   /prop_tgt/ANDROID_SECURE_PROPS_PATH
   /prop_tgt/ANDROID_SKIP_ANT_STEP
   /prop_tgt/ANDROID_STL_TYPE
   /prop_tgt/ARCHIVE_OUTPUT_DIRECTORY
   /prop_tgt/ARCHIVE_OUTPUT_DIRECTORY_CONFIG
   /prop_tgt/ARCHIVE_OUTPUT_NAME
   /prop_tgt/ARCHIVE_OUTPUT_NAME_CONFIG
   /prop_tgt/AUTOGEN_BETTER_GRAPH_MULTI_CONFIG
   /prop_tgt/AUTOGEN_BUILD_DIR
   /prop_tgt/AUTOGEN_COMMAND_LINE_LENGTH_MAX
   /prop_tgt/AUTOGEN_ORIGIN_DEPENDS
   /prop_tgt/AUTOGEN_PARALLEL
   /prop_tgt/AUTOGEN_TARGET_DEPENDS
   /prop_tgt/AUTOGEN_USE_SYSTEM_INCLUDE
   /prop_tgt/AUTOMOC
   /prop_tgt/AUTOMOC_COMPILER_PREDEFINES
   /prop_tgt/AUTOMOC_DEPEND_FILTERS
   /prop_tgt/AUTOMOC_EXECUTABLE
   /prop_tgt/AUTOMOC_MACRO_NAMES
   /prop_tgt/AUTOMOC_MOC_OPTIONS
   /prop_tgt/AUTOMOC_PATH_PREFIX
   /prop_tgt/AUTORCC
   /prop_tgt/AUTORCC_EXECUTABLE
   /prop_tgt/AUTORCC_OPTIONS
   /prop_tgt/AUTOUIC
   /prop_tgt/AUTOUIC_EXECUTABLE
   /prop_tgt/AUTOUIC_OPTIONS
   /prop_tgt/AUTOUIC_SEARCH_PATHS
   /prop_tgt/BINARY_DIR
   /prop_tgt/BUILD_RPATH
   /prop_tgt/BUILD_RPATH_USE_ORIGIN
   /prop_tgt/BUILD_WITH_INSTALL_NAME_DIR
   /prop_tgt/BUILD_WITH_INSTALL_RPATH
   /prop_tgt/BUNDLE
   /prop_tgt/BUNDLE_EXTENSION
   /prop_tgt/C_EXTENSIONS
   /prop_tgt/C_STANDARD
   /prop_tgt/C_STANDARD_REQUIRED
   /prop_tgt/COMMON_LANGUAGE_RUNTIME
   /prop_tgt/COMPATIBLE_INTERFACE_BOOL
   /prop_tgt/COMPATIBLE_INTERFACE_NUMBER_MAX
   /prop_tgt/COMPATIBLE_INTERFACE_NUMBER_MIN
   /prop_tgt/COMPATIBLE_INTERFACE_STRING
   /prop_tgt/COMPILE_DEFINITIONS
   /prop_tgt/COMPILE_FEATURES
   /prop_tgt/COMPILE_FLAGS
   /prop_tgt/COMPILE_OPTIONS
   /prop_tgt/COMPILE_PDB_NAME
   /prop_tgt/COMPILE_PDB_NAME_CONFIG
   /prop_tgt/COMPILE_PDB_OUTPUT_DIRECTORY
   /prop_tgt/COMPILE_PDB_OUTPUT_DIRECTORY_CONFIG
   /prop_tgt/COMPILE_WARNING_AS_ERROR
   /prop_tgt/CONFIG_OUTPUT_NAME
   /prop_tgt/CONFIG_POSTFIX
   /prop_tgt/CROSSCOMPILING_EMULATOR
   /prop_tgt/CUDA_ARCHITECTURES
   /prop_tgt/CUDA_CUBIN_COMPILATION
   /prop_tgt/CUDA_EXTENSIONS
   /prop_tgt/CUDA_FATBIN_COMPILATION
   /prop_tgt/CUDA_OPTIX_COMPILATION
   /prop_tgt/CUDA_PTX_COMPILATION
   /prop_tgt/CUDA_RESOLVE_DEVICE_SYMBOLS
   /prop_tgt/CUDA_RUNTIME_LIBRARY
   /prop_tgt/CUDA_SEPARABLE_COMPILATION
   /prop_tgt/CUDA_STANDARD
   /prop_tgt/CUDA_STANDARD_REQUIRED
   /prop_tgt/CXX_EXTENSIONS
   /prop_tgt/CXX_MODULE_DIRS
   /prop_tgt/CXX_MODULE_DIRS_NAME
   /prop_tgt/CXX_MODULE_SET
   /prop_tgt/CXX_MODULE_SET_NAME
   /prop_tgt/CXX_MODULE_SETS
   /prop_tgt/CXX_SCAN_FOR_MODULES
   /prop_tgt/CXX_STANDARD
   /prop_tgt/CXX_STANDARD_REQUIRED
   /prop_tgt/DEBUG_POSTFIX
   /prop_tgt/DEFINE_SYMBOL
   /prop_tgt/DEPLOYMENT_ADDITIONAL_FILES
   /prop_tgt/DEPLOYMENT_REMOTE_DIRECTORY
   /prop_tgt/DEPRECATION
   /prop_tgt/DISABLE_PRECOMPILE_HEADERS
   /prop_tgt/DLL_NAME_WITH_SOVERSION
   /prop_tgt/DOTNET_SDK
   /prop_tgt/DOTNET_TARGET_FRAMEWORK
   /prop_tgt/DOTNET_TARGET_FRAMEWORK_VERSION
   /prop_tgt/EchoString
   /prop_tgt/ENABLE_EXPORTS
   /prop_tgt/EXCLUDE_FROM_ALL
   /prop_tgt/EXCLUDE_FROM_DEFAULT_BUILD
   /prop_tgt/EXCLUDE_FROM_DEFAULT_BUILD_CONFIG
   /prop_tgt/EXPORT_COMPILE_COMMANDS
   /prop_tgt/EXPORT_FIND_PACKAGE_NAME
   /prop_tgt/EXPORT_NAME
   /prop_tgt/EXPORT_NO_SYSTEM
   /prop_tgt/EXPORT_PROPERTIES
   /prop_tgt/FOLDER
   /prop_tgt/Fortran_BUILDING_INSTRINSIC_MODULES
   /prop_tgt/Fortran_FORMAT
   /prop_tgt/Fortran_MODULE_DIRECTORY
   /prop_tgt/Fortran_PREPROCESS
   /prop_tgt/FRAMEWORK
   /prop_tgt/FRAMEWORK_MULTI_CONFIG_POSTFIX_CONFIG
   /prop_tgt/FRAMEWORK_VERSION
   /prop_tgt/GENERATOR_FILE_NAME
   /prop_tgt/GHS_INTEGRITY_APP
   /prop_tgt/GHS_NO_SOURCE_GROUP_FILE
   /prop_tgt/GNUtoMS
   /prop_tgt/HAS_CXX
   /prop_tgt/HEADER_DIRS
   /prop_tgt/HEADER_DIRS_NAME
   /prop_tgt/HEADER_SET
   /prop_tgt/HEADER_SET_NAME
   /prop_tgt/HEADER_SETS
   /prop_tgt/HIP_ARCHITECTURES
   /prop_tgt/HIP_EXTENSIONS
   /prop_tgt/HIP_STANDARD
   /prop_tgt/HIP_STANDARD_REQUIRED
   /prop_tgt/IMPLICIT_DEPENDS_INCLUDE_TRANSFORM
   /prop_tgt/IMPORTED
   /prop_tgt/IMPORTED_COMMON_LANGUAGE_RUNTIME
   /prop_tgt/IMPORTED_CONFIGURATIONS
   /prop_tgt/IMPORTED_CXX_MODULES_COMPILE_DEFINITIONS
   /prop_tgt/IMPORTED_CXX_MODULES_COMPILE_FEATURES
   /prop_tgt/IMPORTED_CXX_MODULES_COMPILE_OPTIONS
   /prop_tgt/IMPORTED_CXX_MODULES_INCLUDE_DIRECTORIES
   /prop_tgt/IMPORTED_CXX_MODULES_LINK_LIBRARIES
   /prop_tgt/IMPORTED_GLOBAL
   /prop_tgt/IMPORTED_IMPLIB
   /prop_tgt/IMPORTED_IMPLIB_CONFIG
   /prop_tgt/IMPORTED_LIBNAME
   /prop_tgt/IMPORTED_LIBNAME_CONFIG
   /prop_tgt/IMPORTED_LINK_DEPENDENT_LIBRARIES
   /prop_tgt/IMPORTED_LINK_DEPENDENT_LIBRARIES_CONFIG
   /prop_tgt/IMPORTED_LINK_INTERFACE_LANGUAGES
   /prop_tgt/IMPORTED_LINK_INTERFACE_LANGUAGES_CONFIG
   /prop_tgt/IMPORTED_LINK_INTERFACE_LIBRARIES
   /prop_tgt/IMPORTED_LINK_INTERFACE_LIBRARIES_CONFIG
   /prop_tgt/IMPORTED_LINK_INTERFACE_MULTIPLICITY
   /prop_tgt/IMPORTED_LINK_INTERFACE_MULTIPLICITY_CONFIG
   /prop_tgt/IMPORTED_LOCATION
   /prop_tgt/IMPORTED_LOCATION_CONFIG
   /prop_tgt/IMPORTED_NO_SONAME
   /prop_tgt/IMPORTED_NO_SONAME_CONFIG
   /prop_tgt/IMPORTED_OBJECTS
   /prop_tgt/IMPORTED_OBJECTS_CONFIG
   /prop_tgt/IMPORTED_SONAME
   /prop_tgt/IMPORTED_SONAME_CONFIG
   /prop_tgt/IMPORT_PREFIX
   /prop_tgt/IMPORT_SUFFIX
   /prop_tgt/INCLUDE_DIRECTORIES
   /prop_tgt/INSTALL_NAME_DIR
   /prop_tgt/INSTALL_REMOVE_ENVIRONMENT_RPATH
   /prop_tgt/INSTALL_RPATH
   /prop_tgt/INSTALL_RPATH_USE_LINK_PATH
   /prop_tgt/INTERFACE_AUTOMOC_MACRO_NAMES
   /prop_tgt/INTERFACE_AUTOUIC_OPTIONS
   /prop_tgt/INTERFACE_COMPILE_DEFINITIONS
   /prop_tgt/INTERFACE_COMPILE_FEATURES
   /prop_tgt/INTERFACE_COMPILE_OPTIONS
   /prop_tgt/INTERFACE_CXX_MODULE_SETS
   /prop_tgt/INTERFACE_HEADER_SETS
   /prop_tgt/INTERFACE_HEADER_SETS_TO_VERIFY
   /prop_tgt/INTERFACE_INCLUDE_DIRECTORIES
   /prop_tgt/INTERFACE_LINK_DEPENDS
   /prop_tgt/INTERFACE_LINK_DIRECTORIES
   /prop_tgt/INTERFACE_LINK_LIBRARIES
   /prop_tgt/INTERFACE_LINK_LIBRARIES_DIRECT
   /prop_tgt/INTERFACE_LINK_LIBRARIES_DIRECT_EXCLUDE
   /prop_tgt/INTERFACE_LINK_OPTIONS
   /prop_tgt/INTERFACE_POSITION_INDEPENDENT_CODE
   /prop_tgt/INTERFACE_PRECOMPILE_HEADERS
   /prop_tgt/INTERFACE_SOURCES
   /prop_tgt/INTERFACE_SYSTEM_INCLUDE_DIRECTORIES
   /prop_tgt/INTERPROCEDURAL_OPTIMIZATION
   /prop_tgt/INTERPROCEDURAL_OPTIMIZATION_CONFIG
   /prop_tgt/ISPC_HEADER_DIRECTORY
   /prop_tgt/ISPC_HEADER_SUFFIX
   /prop_tgt/ISPC_INSTRUCTION_SETS
   /prop_tgt/JOB_POOL_COMPILE
   /prop_tgt/JOB_POOL_LINK
   /prop_tgt/JOB_POOL_PRECOMPILE_HEADER
   /prop_tgt/LABELS
   /prop_tgt/LANG_CLANG_TIDY
   /prop_tgt/LANG_CLANG_TIDY_EXPORT_FIXES_DIR
   /prop_tgt/LANG_COMPILER_LAUNCHER
   /prop_tgt/LANG_CPPCHECK
   /prop_tgt/LANG_CPPLINT
   /prop_tgt/LANG_EXTENSIONS
   /prop_tgt/LANG_INCLUDE_WHAT_YOU_USE
   /prop_tgt/LANG_LINKER_LAUNCHER
   /prop_tgt/LANG_STANDARD
   /prop_tgt/LANG_STANDARD_REQUIRED
   /prop_tgt/LANG_VISIBILITY_PRESET
   /prop_tgt/LIBRARY_OUTPUT_DIRECTORY
   /prop_tgt/LIBRARY_OUTPUT_DIRECTORY_CONFIG
   /prop_tgt/LIBRARY_OUTPUT_NAME
   /prop_tgt/LIBRARY_OUTPUT_NAME_CONFIG
   /prop_tgt/LINK_DEPENDS
   /prop_tgt/LINK_DEPENDS_NO_SHARED
   /prop_tgt/LINK_DIRECTORIES
   /prop_tgt/LINK_FLAGS
   /prop_tgt/LINK_FLAGS_CONFIG
   /prop_tgt/LINK_INTERFACE_LIBRARIES
   /prop_tgt/LINK_INTERFACE_LIBRARIES_CONFIG
   /prop_tgt/LINK_INTERFACE_MULTIPLICITY
   /prop_tgt/LINK_INTERFACE_MULTIPLICITY_CONFIG
   /prop_tgt/LINK_LIBRARIES
   /prop_tgt/LINK_LIBRARIES_ONLY_TARGETS
   /prop_tgt/LINK_LIBRARY_OVERRIDE
   /prop_tgt/LINK_LIBRARY_OVERRIDE_LIBRARY
   /prop_tgt/LINK_OPTIONS
   /prop_tgt/LINK_SEARCH_END_STATIC
   /prop_tgt/LINK_SEARCH_START_STATIC
   /prop_tgt/LINK_WHAT_YOU_USE
   /prop_tgt/LINKER_LANGUAGE
   /prop_tgt/LINKER_TYPE
   /prop_tgt/LOCATION
   /prop_tgt/LOCATION_CONFIG
   /prop_tgt/MACHO_COMPATIBILITY_VERSION
   /prop_tgt/MACHO_CURRENT_VERSION
   /prop_tgt/MACOSX_BUNDLE
   /prop_tgt/MACOSX_BUNDLE_INFO_PLIST
   /prop_tgt/MACOSX_FRAMEWORK_INFO_PLIST
   /prop_tgt/MACOSX_RPATH
   /prop_tgt/MANUALLY_ADDED_DEPENDENCIES
   /prop_tgt/MAP_IMPORTED_CONFIG_CONFIG
   /prop_tgt/MSVC_DEBUG_INFORMATION_FORMAT
   /prop_tgt/MSVC_RUNTIME_LIBRARY
   /prop_tgt/NAME
   /prop_tgt/NO_SONAME
   /prop_tgt/NO_SYSTEM_FROM_IMPORTED
   /prop_tgt/OBJC_EXTENSIONS
   /prop_tgt/OBJC_STANDARD
   /prop_tgt/OBJC_STANDARD_REQUIRED
   /prop_tgt/OBJCXX_EXTENSIONS
   /prop_tgt/OBJCXX_STANDARD
   /prop_tgt/OBJCXX_STANDARD_REQUIRED
   /prop_tgt/OPTIMIZE_DEPENDENCIES
   /prop_tgt/OSX_ARCHITECTURES
   /prop_tgt/OSX_ARCHITECTURES_CONFIG
   /prop_tgt/OUTPUT_NAME
   /prop_tgt/OUTPUT_NAME_CONFIG
   /prop_tgt/PCH_INSTANTIATE_TEMPLATES
   /prop_tgt/PCH_WARN_INVALID
   /prop_tgt/PDB_NAME
   /prop_tgt/PDB_NAME_CONFIG
   /prop_tgt/PDB_OUTPUT_DIRECTORY
   /prop_tgt/PDB_OUTPUT_DIRECTORY_CONFIG
   /prop_tgt/POSITION_INDEPENDENT_CODE
   /prop_tgt/PRECOMPILE_HEADERS
   /prop_tgt/PRECOMPILE_HEADERS_REUSE_FROM
   /prop_tgt/PREFIX
   /prop_tgt/PRIVATE_HEADER
   /prop_tgt/PROJECT_LABEL
   /prop_tgt/PUBLIC_HEADER
   /prop_tgt/RESOURCE
   /prop_tgt/RULE_LAUNCH_COMPILE
   /prop_tgt/RULE_LAUNCH_CUSTOM
   /prop_tgt/RULE_LAUNCH_LINK
   /prop_tgt/RUNTIME_OUTPUT_DIRECTORY
   /prop_tgt/RUNTIME_OUTPUT_DIRECTORY_CONFIG
   /prop_tgt/RUNTIME_OUTPUT_NAME
   /prop_tgt/RUNTIME_OUTPUT_NAME_CONFIG
   /prop_tgt/SKIP_BUILD_RPATH
   /prop_tgt/SOURCE_DIR
   /prop_tgt/SOURCES
   /prop_tgt/SOVERSION
   /prop_tgt/STATIC_LIBRARY_FLAGS
   /prop_tgt/STATIC_LIBRARY_FLAGS_CONFIG
   /prop_tgt/STATIC_LIBRARY_OPTIONS
   /prop_tgt/SUFFIX
   /prop_tgt/Swift_COMPILATION_MODE
   /prop_tgt/Swift_DEPENDENCIES_FILE
   /prop_tgt/Swift_LANGUAGE_VERSION
   /prop_tgt/Swift_MODULE_DIRECTORY
   /prop_tgt/Swift_MODULE_NAME
   /prop_tgt/SYSTEM
   /prop_tgt/TEST_LAUNCHER
   /prop_tgt/TYPE
   /prop_tgt/UNITY_BUILD
   /prop_tgt/UNITY_BUILD_BATCH_SIZE
   /prop_tgt/UNITY_BUILD_CODE_AFTER_INCLUDE
   /prop_tgt/UNITY_BUILD_CODE_BEFORE_INCLUDE
   /prop_tgt/UNITY_BUILD_MODE
   /prop_tgt/UNITY_BUILD_UNIQUE_ID
   /prop_tgt/VERIFY_INTERFACE_HEADER_SETS
   /prop_tgt/VERSION
   /prop_tgt/VISIBILITY_INLINES_HIDDEN
   /prop_tgt/VS_CONFIGURATION_TYPE
   /prop_tgt/VS_DEBUGGER_COMMAND
   /prop_tgt/VS_DEBUGGER_COMMAND_ARGUMENTS
   /prop_tgt/VS_DEBUGGER_ENVIRONMENT
   /prop_tgt/VS_DEBUGGER_WORKING_DIRECTORY
   /prop_tgt/VS_DESKTOP_EXTENSIONS_VERSION
   /prop_tgt/VS_DOTNET_DOCUMENTATION_FILE
   /prop_tgt/VS_DOTNET_REFERENCE_refname
   /prop_tgt/VS_DOTNET_REFERENCEPROP_refname_TAG_tagname
   /prop_tgt/VS_DOTNET_REFERENCES
   /prop_tgt/VS_DOTNET_REFERENCES_COPY_LOCAL
   /prop_tgt/VS_DOTNET_STARTUP_OBJECT
   /prop_tgt/VS_DOTNET_TARGET_FRAMEWORK_VERSION
   /prop_tgt/VS_DPI_AWARE
   /prop_tgt/VS_GLOBAL_KEYWORD
   /prop_tgt/VS_GLOBAL_PROJECT_TYPES
   /prop_tgt/VS_GLOBAL_ROOTNAMESPACE
   /prop_tgt/VS_GLOBAL_variable
   /prop_tgt/VS_IOT_EXTENSIONS_VERSION
   /prop_tgt/VS_IOT_STARTUP_TASK
   /prop_tgt/VS_JUST_MY_CODE_DEBUGGING
   /prop_tgt/VS_KEYWORD
   /prop_tgt/VS_MOBILE_EXTENSIONS_VERSION
   /prop_tgt/VS_NO_COMPILE_BATCHING
   /prop_tgt/VS_NO_SOLUTION_DEPLOY
   /prop_tgt/VS_PACKAGE_REFERENCES
   /prop_tgt/VS_PLATFORM_TOOLSET
   /prop_tgt/VS_PROJECT_IMPORT
   /prop_tgt/VS_SCC_AUXPATH
   /prop_tgt/VS_SCC_LOCALPATH
   /prop_tgt/VS_SCC_PROJECTNAME
   /prop_tgt/VS_SCC_PROVIDER
   /prop_tgt/VS_SDK_REFERENCES
   /prop_tgt/VS_SOLUTION_DEPLOY
   /prop_tgt/VS_SOURCE_SETTINGS_tool
   /prop_tgt/VS_USER_PROPS
   /prop_tgt/VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION
   /prop_tgt/VS_WINRT_COMPONENT
   /prop_tgt/VS_WINRT_REFERENCES
   /prop_tgt/WATCOM_RUNTIME_LIBRARY
   /prop_tgt/WIN32_EXECUTABLE
   /prop_tgt/WINDOWS_EXPORT_ALL_SYMBOLS
   /prop_tgt/XCODE_ATTRIBUTE_an-attribute
   /prop_tgt/XCODE_EMBED_FRAMEWORKS_CODE_SIGN_ON_COPY
   /prop_tgt/XCODE_EMBED_FRAMEWORKS_REMOVE_HEADERS_ON_COPY
   /prop_tgt/XCODE_EMBED_type
   /prop_tgt/XCODE_EMBED_type_CODE_SIGN_ON_COPY
   /prop_tgt/XCODE_EMBED_type_PATH
   /prop_tgt/XCODE_EMBED_type_REMOVE_HEADERS_ON_COPY
   /prop_tgt/XCODE_EXPLICIT_FILE_TYPE
   /prop_tgt/XCODE_GENERATE_SCHEME
   /prop_tgt/XCODE_LINK_BUILD_PHASE_MODE
   /prop_tgt/XCODE_PRODUCT_TYPE
   /prop_tgt/XCODE_SCHEME_ADDRESS_SANITIZER
   /prop_tgt/XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN
   /prop_tgt/XCODE_SCHEME_ARGUMENTS
   /prop_tgt/XCODE_SCHEME_DEBUG_AS_ROOT
   /prop_tgt/XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING
   /prop_tgt/XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER
   /prop_tgt/XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS
   /prop_tgt/XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE
   /prop_tgt/XCODE_SCHEME_ENABLE_GPU_API_VALIDATION
   /prop_tgt/XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE
   /prop_tgt/XCODE_SCHEME_ENABLE_GPU_SHADER_VALIDATION
   /prop_tgt/XCODE_SCHEME_ENVIRONMENT
   /prop_tgt/XCODE_SCHEME_EXECUTABLE
   /prop_tgt/XCODE_SCHEME_GUARD_MALLOC
   /prop_tgt/XCODE_SCHEME_LAUNCH_CONFIGURATION
   /prop_tgt/XCODE_SCHEME_LAUNCH_MODE
   /prop_tgt/XCODE_SCHEME_MAIN_THREAD_CHECKER_STOP
   /prop_tgt/XCODE_SCHEME_MALLOC_GUARD_EDGES
   /prop_tgt/XCODE_SCHEME_MALLOC_SCRIBBLE
   /prop_tgt/XCODE_SCHEME_MALLOC_STACK
   /prop_tgt/XCODE_SCHEME_THREAD_SANITIZER
   /prop_tgt/XCODE_SCHEME_THREAD_SANITIZER_STOP
   /prop_tgt/XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER
   /prop_tgt/XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER_STOP
   /prop_tgt/XCODE_SCHEME_WORKING_DIRECTORY
   /prop_tgt/XCODE_SCHEME_ZOMBIE_OBJECTS
   /prop_tgt/XCODE_XCCONFIG
   /prop_tgt/XCTEST

.. _`Test Properties`:

Properties on Tests
===================

.. toctree::
   :maxdepth: 1

   /prop_test/ATTACHED_FILES
   /prop_test/ATTACHED_FILES_ON_FAIL
   /prop_test/COST
   /prop_test/DEPENDS
   /prop_test/DISABLED
   /prop_test/ENVIRONMENT
   /prop_test/ENVIRONMENT_MODIFICATION
   /prop_test/FAIL_REGULAR_EXPRESSION
   /prop_test/FIXTURES_CLEANUP
   /prop_test/FIXTURES_REQUIRED
   /prop_test/FIXTURES_SETUP
   /prop_test/GENERATED_RESOURCE_SPEC_FILE
   /prop_test/LABELS
   /prop_test/MEASUREMENT
   /prop_test/PASS_REGULAR_EXPRESSION
   /prop_test/PROCESSOR_AFFINITY
   /prop_test/PROCESSORS
   /prop_test/REQUIRED_FILES
   /prop_test/RESOURCE_GROUPS
   /prop_test/RESOURCE_LOCK
   /prop_test/RUN_SERIAL
   /prop_test/SKIP_REGULAR_EXPRESSION
   /prop_test/SKIP_RETURN_CODE
   /prop_test/TIMEOUT
   /prop_test/TIMEOUT_AFTER_MATCH
   /prop_test/TIMEOUT_SIGNAL_GRACE_PERIOD
   /prop_test/TIMEOUT_SIGNAL_NAME
   /prop_test/WILL_FAIL
   /prop_test/WORKING_DIRECTORY

.. _`Source File Properties`:

Properties on Source Files
==========================

.. toctree::
   :maxdepth: 1

   /prop_sf/ABSTRACT
   /prop_sf/AUTORCC_OPTIONS
   /prop_sf/AUTOUIC_OPTIONS
   /prop_sf/COMPILE_DEFINITIONS
   /prop_sf/COMPILE_FLAGS
   /prop_sf/COMPILE_OPTIONS
   /prop_sf/CXX_SCAN_FOR_MODULES
   /prop_sf/EXTERNAL_OBJECT
   /prop_sf/Fortran_FORMAT
   /prop_sf/Fortran_PREPROCESS
   /prop_sf/GENERATED
   /prop_sf/HEADER_FILE_ONLY
   /prop_sf/INCLUDE_DIRECTORIES
   /prop_sf/KEEP_EXTENSION
   /prop_sf/LABELS
   /prop_sf/LANGUAGE
   /prop_sf/LOCATION
   /prop_sf/MACOSX_PACKAGE_LOCATION
   /prop_sf/OBJECT_DEPENDS
   /prop_sf/OBJECT_OUTPUTS
   /prop_sf/SKIP_AUTOGEN
   /prop_sf/SKIP_AUTOMOC
   /prop_sf/SKIP_AUTORCC
   /prop_sf/SKIP_AUTOUIC
   /prop_sf/SKIP_LINTING
   /prop_sf/SKIP_PRECOMPILE_HEADERS
   /prop_sf/SKIP_UNITY_BUILD_INCLUSION
   /prop_sf/Swift_DEPENDENCIES_FILE
   /prop_sf/Swift_DIAGNOSTICS_FILE
   /prop_sf/SYMBOLIC
   /prop_sf/UNITY_GROUP
   /prop_sf/VS_COPY_TO_OUT_DIR
   /prop_sf/VS_CSHARP_tagname
   /prop_sf/VS_DEPLOYMENT_CONTENT
   /prop_sf/VS_DEPLOYMENT_LOCATION
   /prop_sf/VS_INCLUDE_IN_VSIX
   /prop_sf/VS_RESOURCE_GENERATOR
   /prop_sf/VS_SETTINGS
   /prop_sf/VS_SHADER_DISABLE_OPTIMIZATIONS
   /prop_sf/VS_SHADER_ENABLE_DEBUG
   /prop_sf/VS_SHADER_ENTRYPOINT
   /prop_sf/VS_SHADER_FLAGS
   /prop_sf/VS_SHADER_MODEL
   /prop_sf/VS_SHADER_OBJECT_FILE_NAME
   /prop_sf/VS_SHADER_OUTPUT_HEADER_FILE
   /prop_sf/VS_SHADER_TYPE
   /prop_sf/VS_SHADER_VARIABLE_NAME
   /prop_sf/VS_TOOL_OVERRIDE.rst
   /prop_sf/VS_XAML_TYPE
   /prop_sf/WRAP_EXCLUDE
   /prop_sf/XCODE_EXPLICIT_FILE_TYPE
   /prop_sf/XCODE_FILE_ATTRIBUTES
   /prop_sf/XCODE_LAST_KNOWN_FILE_TYPE

.. _`Cache Entry Properties`:

Properties on Cache Entries
===========================

.. toctree::
   :maxdepth: 1

   /prop_cache/ADVANCED
   /prop_cache/HELPSTRING
   /prop_cache/MODIFIED
   /prop_cache/STRINGS
   /prop_cache/TYPE
   /prop_cache/VALUE

.. _`Installed File Properties`:

Properties on Installed Files
=============================

.. toctree::
   :maxdepth: 1

   /prop_inst/CPACK_DESKTOP_SHORTCUTS.rst
   /prop_inst/CPACK_NEVER_OVERWRITE.rst
   /prop_inst/CPACK_PERMANENT.rst
   /prop_inst/CPACK_START_MENU_SHORTCUTS.rst
   /prop_inst/CPACK_STARTUP_SHORTCUTS.rst
   /prop_inst/CPACK_WIX_ACL.rst

Deprecated Properties on Directories
====================================

.. toctree::
   :maxdepth: 1

   /prop_dir/ADDITIONAL_MAKE_CLEAN_FILES
   /prop_dir/COMPILE_DEFINITIONS_CONFIG
   /prop_dir/INTERPROCEDURAL_OPTIMIZATION
   /prop_dir/INTERPROCEDURAL_OPTIMIZATION_CONFIG
   /prop_dir/TEST_INCLUDE_FILE

Deprecated Properties on Targets
================================

.. toctree::
   :maxdepth: 1

   /prop_tgt/COMPILE_DEFINITIONS_CONFIG
   /prop_tgt/IMPORTED_NO_SYSTEM
   /prop_tgt/IOS_INSTALL_COMBINED
   /prop_tgt/POST_INSTALL_SCRIPT
   /prop_tgt/PRE_INSTALL_SCRIPT
   /prop_tgt/VS_WINRT_EXTENSIONS

Deprecated Properties on Source Files
=====================================

.. toctree::
   :maxdepth: 1

   /prop_sf/COMPILE_DEFINITIONS_CONFIG

repo_name: lazytadpole/codenamesilverfish

license: mit


code:
.. cmake-manual-description: CMake Qt Features Reference

cmake-qt(7)
***********

.. only:: html

   .. contents::

Introduction
============

CMake can find and use Qt 4, Qt 5 and Qt 6 libraries. The Qt 4 libraries are
found by the :module:`FindQt4` find-module shipped with CMake, whereas the
Qt 5 and Qt 6 libraries are found using "Config-file Packages" shipped with
Qt 5 and Qt 6. See :manual:`cmake-packages(7)` for more information about CMake
packages, and see `the Qt cmake manual`_ for your Qt version.

.. _`the Qt cmake manual`: https://doc.qt.io/qt-6/cmake-manual.html

Qt 4, Qt 5 and Qt 6 may be used together in the same
:manual:`CMake buildsystem <cmake-buildsystem(7)>`:

.. code-block:: cmake

  cmake_minimum_required(VERSION 3.16 FATAL_ERROR)

  project(Qt4_5_6)

  set(CMAKE_AUTOMOC ON)

  find_package(Qt6 COMPONENTS Widgets DBus REQUIRED)
  add_executable(publisher publisher.cpp)
  target_link_libraries(publisher Qt6::Widgets Qt6::DBus)

  find_package(Qt5 COMPONENTS Gui DBus REQUIRED)
  add_executable(subscriber1 subscriber1.cpp)
  target_link_libraries(subscriber1 Qt5::Gui Qt5::DBus)

  find_package(Qt4 REQUIRED)
  add_executable(subscriber2 subscriber2.cpp)
  target_link_libraries(subscriber2 Qt4::QtGui Qt4::QtDBus)

A CMake target may not link to more than one Qt version.  A diagnostic is issued
if this is attempted or results from transitive target dependency evaluation.

Qt Build Tools
==============

Qt relies on some bundled tools for code generation, such as ``moc`` for
meta-object code generation, ``uic`` for widget layout and population,
and ``rcc`` for virtual file system content generation.  These tools may be
automatically invoked by :manual:`cmake(1)` if the appropriate conditions
are met.  The automatic tool invocation may be used with Qt version 4 to 6.

.. _`Qt AUTOMOC`:

AUTOMOC
^^^^^^^

The :prop_tgt:`AUTOMOC` target property controls whether :manual:`cmake(1)`
inspects the C++ files in the target to determine if they require ``moc`` to
be run, and to create rules to execute ``moc`` at the appropriate time.

If a macro from :prop_tgt:`AUTOMOC_MACRO_NAMES` is found in a header file,
``moc`` will be run on the file.  The result will be put into a file named
according to ``moc_<basename>.cpp``.
If the macro is found in a C++ implementation
file, the moc output will be put into a file named according to
``<basename>.moc``, following the Qt conventions.  The ``<basename>.moc`` must
be included by the user in the C++ implementation file with a preprocessor
``#include``.

Included ``moc_*.cpp`` and ``*.moc`` files will be generated in the
``<AUTOGEN_BUILD_DIR>/include`` directory which is
automatically added to the target's :prop_tgt:`INCLUDE_DIRECTORIES`.

* This differs from CMake 3.7 and below; see their documentation for details.

* For :prop_gbl:`multi configuration generators <GENERATOR_IS_MULTI_CONFIG>`,
  the include directory is ``<AUTOGEN_BUILD_DIR>/include_<CONFIG>``.

* See :prop_tgt:`AUTOGEN_BUILD_DIR`.

Not included ``moc_<basename>.cpp`` files will be generated in custom
folders to avoid name collisions and included in a separate
file which is compiled into the target, named either
``<AUTOGEN_BUILD_DIR>/mocs_compilation.cpp`` or
``<AUTOGEN_BUILD_DIR>/mocs_compilation_$<CONFIG>.cpp``.

* See :prop_tgt:`AUTOGEN_BUILD_DIR`.

The ``moc`` command line will consume the :prop_tgt:`COMPILE_DEFINITIONS` and
:prop_tgt:`INCLUDE_DIRECTORIES` target properties from the target it is being
invoked for, and for the appropriate build configuration.

The :prop_tgt:`AUTOMOC` target property may be pre-set for all
following targets by setting the :variable:`CMAKE_AUTOMOC` variable.  The
:prop_tgt:`AUTOMOC_MOC_OPTIONS` target property may be populated to set
options to pass to ``moc``. The :variable:`CMAKE_AUTOMOC_MOC_OPTIONS`
variable may be populated to pre-set the options for all following targets.

Additional macro names to search for can be added to
:prop_tgt:`AUTOMOC_MACRO_NAMES`.

Additional ``moc`` dependency file names can be extracted from source code
by using :prop_tgt:`AUTOMOC_DEPEND_FILTERS`.

Source C++ files can be excluded from :prop_tgt:`AUTOMOC` processing by
enabling :prop_sf:`SKIP_AUTOMOC` or the broader :prop_sf:`SKIP_AUTOGEN`.

.. _`Qt AUTOUIC`:

AUTOUIC
^^^^^^^

The :prop_tgt:`AUTOUIC` target property controls whether :manual:`cmake(1)`
inspects the C++ files in the target to determine if they require ``uic`` to
be run, and to create rules to execute ``uic`` at the appropriate time.

If a preprocessor ``#include`` directive is found which matches
``<path>ui_<basename>.h``, and a ``<basename>.ui`` file exists,
then ``uic`` will be executed to generate the appropriate file.
The ``<basename>.ui`` file is searched for in the following places

1. ``<source_dir>/<basename>.ui``
2. ``<source_dir>/<path><basename>.ui``
3. ``<AUTOUIC_SEARCH_PATHS>/<basename>.ui``
4. ``<AUTOUIC_SEARCH_PATHS>/<path><basename>.ui``

where ``<source_dir>`` is the directory of the C++ file and
:prop_tgt:`AUTOUIC_SEARCH_PATHS` is a list of additional search paths.

The generated generated ``ui_*.h`` files are placed in the
``<AUTOGEN_BUILD_DIR>/include`` directory which is
automatically added to the target's :prop_tgt:`INCLUDE_DIRECTORIES`.

* This differs from CMake 3.7 and below; see their documentation for details.

* For :prop_gbl:`multi configuration generators <GENERATOR_IS_MULTI_CONFIG>`,
  the include directory is ``<AUTOGEN_BUILD_DIR>/include_<CONFIG>``.

* See :prop_tgt:`AUTOGEN_BUILD_DIR`.

The :prop_tgt:`AUTOUIC` target property may be pre-set for all following
targets by setting the :variable:`CMAKE_AUTOUIC` variable.  The
:prop_tgt:`AUTOUIC_OPTIONS` target property may be populated to set options
to pass to ``uic``.  The :variable:`CMAKE_AUTOUIC_OPTIONS` variable may be
populated to pre-set the options for all following targets.  The
:prop_sf:`AUTOUIC_OPTIONS` source file property may be set on the
``<basename>.ui`` file to set particular options for the file.  This
overrides options from the :prop_tgt:`AUTOUIC_OPTIONS` target property.

A target may populate the :prop_tgt:`INTERFACE_AUTOUIC_OPTIONS` target
property with options that should be used when invoking ``uic``.  This must be
consistent with the :prop_tgt:`AUTOUIC_OPTIONS` target property content of the
depender target.  The :variable:`CMAKE_DEBUG_TARGET_PROPERTIES` variable may
be used to track the origin target of such
:prop_tgt:`INTERFACE_AUTOUIC_OPTIONS`.  This means that a library which
provides an alternative translation system for Qt may specify options which
should be used when running ``uic``:

.. code-block:: cmake

  add_library(KI18n klocalizedstring.cpp)
  target_link_libraries(KI18n Qt6::Core)

  # KI18n uses the tr2i18n() function instead of tr().  That function is
  # declared in the klocalizedstring.h header.
  set(autouic_options
    -tr tr2i18n
    -include klocalizedstring.h
  )

  set_property(TARGET KI18n APPEND PROPERTY
    INTERFACE_AUTOUIC_OPTIONS ${autouic_options}
  )

A consuming project linking to the target exported from upstream automatically
uses appropriate options when ``uic`` is run by :prop_tgt:`AUTOUIC`, as a
result of linking with the :prop_tgt:`IMPORTED` target:

.. code-block:: cmake

  set(CMAKE_AUTOUIC ON)
  # Uses a libwidget.ui file:
  add_library(LibWidget libwidget.cpp)
  target_link_libraries(LibWidget
    KF5::KI18n
    Qt5::Widgets
  )

Source files can be excluded from :prop_tgt:`AUTOUIC` processing by
enabling :prop_sf:`SKIP_AUTOUIC` or the broader :prop_sf:`SKIP_AUTOGEN`.

.. _`Qt AUTORCC`:

AUTORCC
^^^^^^^

The :prop_tgt:`AUTORCC` target property controls whether :manual:`cmake(1)`
creates rules to execute ``rcc`` at the appropriate time on source files
which have the suffix ``.qrc``.

.. code-block:: cmake

  add_executable(myexe main.cpp resource_file.qrc)

The :prop_tgt:`AUTORCC` target property may be pre-set for all following targets
by setting the :variable:`CMAKE_AUTORCC` variable.  The
:prop_tgt:`AUTORCC_OPTIONS` target property may be populated to set options
to pass to ``rcc``.  The :variable:`CMAKE_AUTORCC_OPTIONS` variable may be
populated to pre-set the options for all following targets.  The
:prop_sf:`AUTORCC_OPTIONS` source file property may be set on the
``<name>.qrc`` file to set particular options for the file.  This
overrides options from the :prop_tgt:`AUTORCC_OPTIONS` target property.

Source files can be excluded from :prop_tgt:`AUTORCC` processing by
enabling :prop_sf:`SKIP_AUTORCC` or the broader :prop_sf:`SKIP_AUTOGEN`.

.. _`<ORIGIN>_autogen`:

The ``<ORIGIN>_autogen`` target
===============================

The ``moc`` and ``uic`` tools are executed as part of a synthesized
:ref:`<ORIGIN>_autogen` :command:`custom target <add_custom_target>` generated by
CMake.  By default that :ref:`<ORIGIN>_autogen` target inherits the dependencies
of the ``<ORIGIN>`` target (see :prop_tgt:`AUTOGEN_ORIGIN_DEPENDS`).
Target dependencies may be added to the :ref:`<ORIGIN>_autogen` target by adding
them to the :prop_tgt:`AUTOGEN_TARGET_DEPENDS` target property.

.. note::
  If Qt 5.15 or later is used and the generator is either :generator:`Ninja` or
  :ref:`Makefile Generators`, see :ref:`<ORIGIN>_autogen_timestamp_deps`.

.. _`<ORIGIN>_autogen_timestamp_deps`:

The ``<ORIGIN>_autogen_timestamp_deps`` target
==============================================

If Qt 5.15 or later is used and the generator is either :generator:`Ninja` or
:ref:`Makefile Generators`, the ``<ORIGIN>_autogen_timestamp_deps`` target is
also created in addition to the :ref:`<ORIGIN>_autogen` target.  This target
does not have any sources or commands to execute, but it has dependencies that
were previously inherited by the pre-Qt 5.15 :ref:`<ORIGIN>_autogen` target.
These dependencies will serve as a list of order-only dependencies for the
custom command, without forcing the custom command to re-execute.

Visual Studio Generators
========================

When using the :manual:`Visual Studio generators <cmake-generators(7)>`, CMake
generates a ``PRE_BUILD`` :command:`custom command <add_custom_command>`
instead of the :ref:`<ORIGIN>_autogen`
:command:`custom target <add_custom_target>` (for :prop_tgt:`AUTOMOC` and
:prop_tgt:`AUTOUIC`).  This isn't always possible though and an
:ref:`<ORIGIN>_autogen` :command:`custom target <add_custom_target>` is used,
when either

- the ``<ORIGIN>`` target depends on :prop_sf:`GENERATED` files which aren't
  excluded from :prop_tgt:`AUTOMOC` and :prop_tgt:`AUTOUIC` by
  :prop_sf:`SKIP_AUTOMOC`, :prop_sf:`SKIP_AUTOUIC`, :prop_sf:`SKIP_AUTOGEN`
  or :policy:`CMP0071`
- :prop_tgt:`AUTOGEN_TARGET_DEPENDS` lists a source file
- :variable:`CMAKE_GLOBAL_AUTOGEN_TARGET` is enabled

qtmain.lib on Windows
=====================

The Qt 4 and 5 :prop_tgt:`IMPORTED` targets for the QtGui libraries specify
that the qtmain.lib static library shipped with Qt will be linked by all
dependent executables which have the :prop_tgt:`WIN32_EXECUTABLE` enabled.

To disable this behavior, enable the ``Qt5_NO_LINK_QTMAIN`` target property for
Qt 5 based targets or ``QT4_NO_LINK_QTMAIN`` target property for Qt 4 based
targets.

.. code-block:: cmake

  add_executable(myexe WIN32 main.cpp)
  target_link_libraries(myexe Qt4::QtGui)

  add_executable(myexe_no_qtmain WIN32 main_no_qtmain.cpp)
  set_property(TARGET main_no_qtmain PROPERTY QT4_NO_LINK_QTMAIN ON)
  target_link_libraries(main_no_qtmain Qt4::QtGui)


code:
.. cmake-manual-description: CMake Server

cmake-server(7)
***************

The :manual:`cmake(1)` server mode has been removed since CMake 3.20.
Clients should use the :manual:`cmake-file-api(7)` instead.