code:
CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>_SUPPORTED
-------------------------------------------------

.. versionadded:: 3.24

This variable specifies whether the ``<FEATURE>`` is supported for the link
language ``<LANG>``.  If this variable is true, then the ``<FEATURE>`` must
be defined by :variable:`CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>`, and the
more generic :variable:`CMAKE_LINK_GROUP_USING_<FEATURE>_SUPPORTED` and
:variable:`CMAKE_LINK_GROUP_USING_<FEATURE>` variables are not used.

If ``CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>_SUPPORTED`` is false or is not
set, then the :variable:`CMAKE_LINK_GROUP_USING_<FEATURE>_SUPPORTED` variable
will determine whether ``<FEATURE>`` is deemed to be supported.


code:
CMAKE_<LANG>_LINK_LIBRARY_FILE_FLAG
-----------------------------------

.. versionadded:: 3.16

Language-specific flag to be used to link a library specified by
a path to its file.

The flag will be used before a library file path is given to the
linker.  This is needed only on very few platforms.

repo_name: lazytadpole/codenamesilverfish

license: mit


code:
CMAKE_<LANG>_LINK_LIBRARY_FLAG
------------------------------

.. versionadded:: 3.16

Flag to be used to link a library into a shared library or executable.

This flag will be used to specify a library to link to a shared library or an
executable for the specific language.  On most compilers this is ``-l``.


code:
CMAKE_<LANG>_LINK_LIBRARY_SUFFIX
--------------------------------

.. versionadded:: 3.16

Language-specific suffix for libraries that you link to.

The suffix to use for the end of a library filename, ``.lib`` on Windows.


code:
CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>
-----------------------------------------

.. versionadded:: 3.24

This variable defines how to link a library or framework for the specified
``<FEATURE>`` when a :genex:`LINK_LIBRARY` generator expression is used and
the link language for the target is ``<LANG>``.
For this variable to have any effect, the associated
:variable:`CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED` variable
must be set to true.

The :variable:`CMAKE_LINK_LIBRARY_USING_<FEATURE>` variable should be defined
instead for features that are independent of the link language.

.. include:: CMAKE_LINK_LIBRARY_USING_FEATURE.txt


code:
CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED
---------------------------------------------------

.. versionadded:: 3.24

Set to ``TRUE`` if the ``<FEATURE>``, as defined by variable
:variable:`CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>`, is supported for the
linker language ``<LANG>``.

.. note::

  This variable is evaluated before the more generic variable
  :variable:`CMAKE_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED`.


code:
CMAKE_<LANG>_LINK_WHAT_YOU_USE_FLAG
-----------------------------------

.. versionadded:: 3.22

Linker flag to be used to configure linker so that all specified libraries on
the command line will be linked into the target.

See also variable :variable:`CMAKE_LINK_WHAT_YOU_USE_CHECK`.


code:
CMAKE_<LANG>_OUTPUT_EXTENSION
-----------------------------

Extension for the output of a compile for a single file.

This is the extension for an object file for the given ``<LANG>``.  For
example ``.obj`` for C on Windows.


code:
CMAKE_<LANG>_PLATFORM_ID
------------------------

An internal variable subject to change.

This is used in determining the platform and is subject to change.


code:
CMAKE_<LANG>_SIMULATE_ID
------------------------

Identification string of the "simulated" compiler.

Some compilers simulate other compilers to serve as drop-in
replacements.  When CMake detects such a compiler it sets this
variable to what would have been the :variable:`CMAKE_<LANG>_COMPILER_ID` for
the simulated compiler.

.. note::
  In other words, this variable describes the ABI compatibility
  of the generated code.


code:
CMAKE_<LANG>_SIMULATE_VERSION
-----------------------------

Version string of "simulated" compiler.

Some compilers simulate other compilers to serve as drop-in
replacements.  When CMake detects such a compiler it sets this
variable to what would have been the :variable:`CMAKE_<LANG>_COMPILER_VERSION`
for the simulated compiler.


code:
CMAKE_<LANG>_SIZEOF_DATA_PTR
----------------------------

Size of pointer-to-data types for language ``<LANG>``.

This holds the size (in bytes) of pointer-to-data types in the target
platform ABI.  It is defined for languages ``C`` and ``CXX`` (C++).


code:
CMAKE_<LANG>_SOURCE_FILE_EXTENSIONS
-----------------------------------

Extensions of source files for the given language.

This is the list of extensions for a given language's source files.


code:
CMAKE_<LANG>_STANDARD
---------------------

The variations are:

* :variable:`CMAKE_C_STANDARD`
* :variable:`CMAKE_CXX_STANDARD`
* :variable:`CMAKE_CUDA_STANDARD`
* :variable:`CMAKE_HIP_STANDARD`
* :variable:`CMAKE_OBJC_STANDARD`
* :variable:`CMAKE_OBJCXX_STANDARD`

Default values for :prop_tgt:`<LANG>_STANDARD` target properties if set when a
target is created.

For supported CMake versions see the respective pages.

See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.


code:
CMAKE_<LANG>_STANDARD_DEFAULT
-----------------------------

.. versionadded:: 3.9

The compiler's default standard for the language ``<LANG>``. Empty if the
compiler has no conception of standard levels.


code:
CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES
-----------------------------------------

.. versionadded:: 3.6

Include directories to be used for every source file compiled with
the ``<LANG>`` compiler.  This is meant for specification of system
include directories needed by the language for the current platform.
The directories always appear at the end of the include path passed
to the compiler.

This variable should not be set by project code.  It is meant to be set by
CMake's platform information modules for the current toolchain, or by a
toolchain file when used with :variable:`CMAKE_TOOLCHAIN_FILE`.

See also :variable:`CMAKE_<LANG>_STANDARD_LIBRARIES`.


code:
CMAKE_<LANG>_STANDARD_LIBRARIES
-------------------------------

.. versionadded:: 3.6

Libraries linked into every executable and shared library linked
for language ``<LANG>``.  This is meant for specification of system
libraries needed by the language for the current platform.

This variable should not be set by project code.  It is meant to be set by
CMake's platform information modules for the current toolchain, or by a
toolchain file when used with :variable:`CMAKE_TOOLCHAIN_FILE`.

See also :variable:`CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES`.


code:
CMAKE_<LANG>_STANDARD_REQUIRED
------------------------------

The variations are:

* :variable:`CMAKE_C_STANDARD_REQUIRED`
* :variable:`CMAKE_CXX_STANDARD_REQUIRED`
* :variable:`CMAKE_CUDA_STANDARD_REQUIRED`
* :variable:`CMAKE_HIP_STANDARD_REQUIRED`
* :variable:`CMAKE_OBJC_STANDARD_REQUIRED`
* :variable:`CMAKE_OBJCXX_STANDARD_REQUIRED`

Default values for :prop_tgt:`<LANG>_STANDARD_REQUIRED` target properties if
set when a target is created.

For supported CMake versions see the respective pages.

See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.


code:
CMAKE_<LANG>_USING_LINKER_MODE
------------------------------

.. versionadded:: 3.29

This variable specify what is the type of data stored in variable
 :variable:`CMAKE_<LANG>_USING_LINKER_<TYPE>`. There are two possible values:

``FLAG``
  :variable:`CMAKE_<LANG>_USING_LINKER_<TYPE>` holds compiler flags. This is
  the default.

``TOOL``
  :variable:`CMAKE_<LANG>_USING_LINKER_<TYPE>` holds the path to the linker
  tool.


code:
CMAKE_<LANG>_USING_LINKER_<TYPE>
--------------------------------

.. versionadded:: 3.29

This variable defines how to specify the linker for the link step for the type
as specified by the variable :variable:`CMAKE_LINKER_TYPE` or the target
property :prop_tgt:`LINKER_TYPE`. It can hold compiler flags for the link step
or directly the linker tool. The type of data is given by the variable
:variable:`CMAKE_<LANG>_USING_LINKER_MODE`.

For example, to specify the ``LLVM`` linker for ``GNU`` compilers, we have:

.. code-block:: cmake

  set(CMAKE_C_USING_LINKER_LLD "-fuse-ld=lld")

Or on ``Windows`` platform, for ``Clang`` compilers simulating ``MSVC``, we
have:

.. code-block:: cmake

  set(CMAKE_C_USING_LINKER_LLD "-fuse-ld=lld-link")

And for the ``MSVC`` compiler, linker is directly used, so we have:

.. code-block:: cmake

  set(CMAKE_C_USING_LINKER_LLD "/path/to/lld-link.exe")
  set(CMAKE_C_USING_LINKER_MODE TOOL)


code:
CMAKE_<LANG>_VISIBILITY_PRESET
------------------------------

Default value for the :prop_tgt:`<LANG>_VISIBILITY_PRESET` target
property when a target is created.


code:
CMAKE_LIBRARY_ARCHITECTURE
--------------------------

Target architecture library directory name, if detected.

This is the value of :variable:`CMAKE_<LANG>_LIBRARY_ARCHITECTURE` as detected
for one of the enabled languages.


code:
CMAKE_LIBRARY_ARCHITECTURE_REGEX
--------------------------------

Regex matching possible target architecture library directory names.

This is used to detect :variable:`CMAKE_<LANG>_LIBRARY_ARCHITECTURE` from the
implicit linker search path by matching the ``<arch>`` name.


code:
CMAKE_LIBRARY_OUTPUT_DIRECTORY
------------------------------

Where to put all the :ref:`LIBRARY <Library Output Artifacts>`
target files when built.

This variable is used to initialize the :prop_tgt:`LIBRARY_OUTPUT_DIRECTORY`
property on all the targets.  See that target property for additional
information.


code:
CMAKE_LIBRARY_OUTPUT_DIRECTORY_<CONFIG>
---------------------------------------

.. versionadded:: 3.3

Where to put all the :ref:`LIBRARY <Library Output Artifacts>`
target files when built for a specific configuration.

This variable is used to initialize the
:prop_tgt:`LIBRARY_OUTPUT_DIRECTORY_<CONFIG>` property on all the targets.
See that target property for additional information.


code:
CMAKE_LIBRARY_PATH
------------------

:ref:`Semicolon-separated list <CMake Language Lists>` of directories specifying a search path
for the :command:`find_library` command.  By default it is empty, it is
intended to be set by the project.

There is also an environment variable :envvar:`CMAKE_LIBRARY_PATH`, which is used
as an additional list of search directories.

See also :variable:`CMAKE_SYSTEM_LIBRARY_PATH` and :variable:`CMAKE_PREFIX_PATH`.


code:
CMAKE_LIBRARY_PATH_FLAG
-----------------------

The flag to be used to add a library search path to a compiler.

The flag will be used to specify a library directory to the compiler.
On most compilers this is ``-L``.


code:
CMAKE_LINKER_TYPE
-----------------

.. versionadded:: 3.29

Specify which linker will be used for the link step.

.. note::
  It is assumed that the linker specified is fully compatible with the standard
  one. CMake will not do any options translation.

This variable is used to initialize the :prop_tgt:`LINKER_TYPE` target
property when they are created by calls to :command:`add_library` or
:command:`add_executable` commands. It is meaningful only for targets having a
link step. If set, its value is also used by the :command:`try_compile`
command.

.. include:: LINKER_PREDEFINED_TYPES.txt


code:
CMAKE_LINK_DEF_FILE_FLAG
------------------------

Linker flag to be used to specify a ``.def`` file for dll creation.

The flag will be used to add a ``.def`` file when creating a dll on
Windows; this is only defined on Windows.


code:
CMAKE_LINK_DEPENDS_NO_SHARED
----------------------------

Whether to skip link dependencies on shared library files.

This variable initializes the :prop_tgt:`LINK_DEPENDS_NO_SHARED` property on
targets when they are created.  See that target property for
additional information.


code:
CMAKE_LINK_DEPENDS_USE_LINKER
-----------------------------

.. versionadded:: 3.27

For the :ref:`Makefile <Makefile Generators>` and
:ref:`Ninja <Ninja Generators>` generators, link dependencies are now, for a
selection of linkers, generated by the linker itself. By defining this
variable with value ``FALSE``, you can deactivate this feature.

This feature is also deactivated if the :prop_tgt:`LINK_DEPENDS_NO_SHARED`
target property is true.

.. note::

  CMake version |release| defaults this variable to ``FALSE`` because
  GNU binutils linkers (``ld``, ``ld.bfd``, ``ld.gold``) generate spurious
  dependencies on temporary files when LTO is enabled.  See `GNU bug 30568`_.

.. _`GNU bug 30568`: https://sourceware.org/bugzilla/show_bug.cgi?id=30568


code:
CMAKE_LINK_DIRECTORIES_BEFORE
-----------------------------

.. versionadded:: 3.13

Whether to append or prepend directories by default in
:command:`link_directories`.

This variable affects the default behavior of the :command:`link_directories`
command.  Setting this variable to ``ON`` is equivalent to using the ``BEFORE``
option in all uses of that command.


code:
CMAKE_LINK_GROUP_USING_<FEATURE>
--------------------------------

.. versionadded:: 3.24

This variable defines how to link a group of libraries for the specified
``<FEATURE>`` when a :genex:`LINK_GROUP` generator expression is used.
Both of the following conditions must be met for this variable to have any
effect:

* The associated :variable:`CMAKE_LINK_GROUP_USING_<FEATURE>_SUPPORTED`
  variable must be set to true.

* There is no language-specific definition for the same ``<FEATURE>``.
  This means :variable:`CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>_SUPPORTED`
  cannot be true for the link language used by the target for which the
  :genex:`LINK_GROUP` generator expression is evaluated.

The :variable:`CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>` variable should be
defined instead for features that are dependent on the link language.

.. include:: CMAKE_LINK_GROUP_USING_FEATURE.txt


code:
CMAKE_LINK_GROUP_USING_<FEATURE>_SUPPORTED
------------------------------------------

.. versionadded:: 3.24

This variable specifies whether the ``<FEATURE>`` is supported regardless of
the link language.  If this variable is true, then the ``<FEATURE>`` must
be defined by :variable:`CMAKE_LINK_GROUP_USING_<FEATURE>`.

Note that this variable has no effect if
:variable:`CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>_SUPPORTED` is true for
the link language of the target.


code:
CMAKE_LINK_INTERFACE_LIBRARIES
------------------------------

Default value for :prop_tgt:`LINK_INTERFACE_LIBRARIES` of targets.

This variable is used to initialize the :prop_tgt:`LINK_INTERFACE_LIBRARIES`
property on all the targets.  See that target property for additional
information.


code:
CMAKE_LINK_LIBRARIES_ONLY_TARGETS
---------------------------------

.. versionadded:: 3.23

Set this variable to initialize the :prop_tgt:`LINK_LIBRARIES_ONLY_TARGETS`
property of non-imported targets when they are created.  Setting it to true
enables an additional check that all items named by
:command:`target_link_libraries` that can be target names are actually names
of existing targets.  See the target property documentation for details.


code:
CMAKE_LINK_LIBRARY_FILE_FLAG
----------------------------

Flag to be used to link a library specified by a path to its file.

The flag will be used before a library file path is given to the
linker.  This is needed only on very few platforms.


code:
CMAKE_LINK_LIBRARY_FLAG
-----------------------

Flag to be used to link a library into an executable.

The flag will be used to specify a library to link to an executable.
On most compilers this is ``-l``.


code:
CMAKE_LINK_LIBRARY_SUFFIX
-------------------------

The suffix for libraries that you link to.

The suffix to use for the end of a library filename, ``.lib`` on Windows.


code:
CMAKE_LINK_LIBRARY_USING_<FEATURE>
----------------------------------

.. versionadded:: 3.24

This variable defines how to link a library or framework for the specified
``<FEATURE>`` when a :genex:`LINK_LIBRARY` generator expression is used.
Both of the following conditions must be met for this variable to have any
effect:

* The associated :variable:`CMAKE_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED`
  variable must be set to true.

* There is no language-specific definition for the same ``<FEATURE>``.
  This means :variable:`CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED`
  cannot be true for the link language used by the target for which the
  :genex:`LINK_LIBRARY` generator expression is evaluated.

.. include:: CMAKE_LINK_LIBRARY_USING_FEATURE.txt


code:
CMAKE_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED
--------------------------------------------

.. versionadded:: 3.24

Set to ``TRUE`` if the ``<FEATURE>``, as defined by variable
:variable:`CMAKE_LINK_LIBRARY_USING_<FEATURE>`, is supported regardless the
linker language.

.. note::

  This variable is evaluated if, and only if, the variable
  :variable:`CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED` is not
  defined.


code:
CMAKE_LINK_SEARCH_END_STATIC
----------------------------

.. versionadded:: 3.4

End a link line such that static system libraries are used.

Some linkers support switches such as ``-Bstatic`` and ``-Bdynamic`` to
determine whether to use static or shared libraries for ``-lXXX`` options.
CMake uses these options to set the link type for libraries whose full
paths are not known or (in some cases) are in implicit link
directories for the platform.  By default CMake adds an option at the
end of the library list (if necessary) to set the linker search type
back to its starting type.  This property switches the final linker
search type to ``-Bstatic`` regardless of how it started.

This variable is used to initialize the target property
:prop_tgt:`LINK_SEARCH_END_STATIC` for all targets. If set, its
value is also used by the :command:`try_compile` command.

See also :variable:`CMAKE_LINK_SEARCH_START_STATIC`.


code:
CMAKE_LINK_SEARCH_START_STATIC
------------------------------

.. versionadded:: 3.4

Assume the linker looks for static libraries by default.

Some linkers support switches such as ``-Bstatic`` and ``-Bdynamic`` to
determine whether to use static or shared libraries for ``-lXXX`` options.
CMake uses these options to set the link type for libraries whose full
paths are not known or (in some cases) are in implicit link
directories for the platform.  By default the linker search type is
assumed to be ``-Bdynamic`` at the beginning of the library list.  This
property switches the assumption to ``-Bstatic``.  It is intended for use
when linking an executable statically (e.g.  with the GNU ``-static``
option).

This variable is used to initialize the target property
:prop_tgt:`LINK_SEARCH_START_STATIC` for all targets.  If set, its
value is also used by the :command:`try_compile` command.

See also :variable:`CMAKE_LINK_SEARCH_END_STATIC`.


code:
CMAKE_LINK_WHAT_YOU_USE
-----------------------

.. versionadded:: 3.7

Default value for :prop_tgt:`LINK_WHAT_YOU_USE` target property.
This variable is used to initialize the property on each target as it is
created.


code:
CMAKE_LINK_WHAT_YOU_USE_CHECK
-----------------------------

.. versionadded:: 3.22

Defines the command executed after the link step to check libraries usage.
This check is currently only defined on ``ELF`` platforms with value
``ldd -u -r``.

See also :variable:`CMAKE_<LANG>_LINK_WHAT_YOU_USE_FLAG` variables.


code:
CMAKE_MACOSX_BUNDLE
-------------------

Default value for :prop_tgt:`MACOSX_BUNDLE` of targets.

This variable is used to initialize the :prop_tgt:`MACOSX_BUNDLE` property on
all the targets.  See that target property for additional information.

This variable is set to ``ON`` by default if :variable:`CMAKE_SYSTEM_NAME`
equals to :ref:`iOS, tvOS, visionOS or watchOS <Cross Compiling for iOS, tvOS, visionOS, or watchOS>`.


code:
CMAKE_MACOSX_RPATH
-------------------

Whether to use rpaths on macOS and iOS.

This variable is used to initialize the :prop_tgt:`MACOSX_RPATH` property on
all targets.


code:
CMAKE_MAJOR_VERSION
-------------------

First version number component of the :variable:`CMAKE_VERSION`
variable.


code:
CMAKE_MAKE_PROGRAM
------------------

Tool that can launch the native build system.
The value may be the full path to an executable or just the tool
name if it is expected to be in the ``PATH``.

The tool selected depends on the :variable:`CMAKE_GENERATOR` used
to configure the project:

* The :ref:`Makefile Generators` set this to ``make``, ``gmake``, or
  a generator-specific tool (e.g. ``nmake`` for :generator:`NMake Makefiles`).

  These generators store ``CMAKE_MAKE_PROGRAM`` in the CMake cache
  so that it may be edited by the user.

* The :generator:`Ninja` generator sets this to ``ninja``.

  This generator stores ``CMAKE_MAKE_PROGRAM`` in the CMake cache
  so that it may be edited by the user.

* The :generator:`Xcode` generator sets this to ``xcodebuild``.

  This generator prefers to lookup the build tool at build time
  rather than to store ``CMAKE_MAKE_PROGRAM`` in the CMake cache
  ahead of time.  This is because ``xcodebuild`` is easy to find.

  For compatibility with versions of CMake prior to 3.2, if
  a user or project explicitly adds ``CMAKE_MAKE_PROGRAM`` to
  the CMake cache then CMake will use the specified value.

* The :ref:`Visual Studio Generators` set this to the full path to
  ``MSBuild.exe`` (VS >= 10), ``devenv.com`` (VS 7,8,9), or
  ``VCExpress.exe`` (VS Express 8,9).
  (See also variables
  :variable:`CMAKE_VS_MSBUILD_COMMAND` and
  :variable:`CMAKE_VS_DEVENV_COMMAND`.

  These generators prefer to lookup the build tool at build time
  rather than to store ``CMAKE_MAKE_PROGRAM`` in the CMake cache
  ahead of time.  This is because the tools are version-specific
  and can be located using the Windows Registry.  It is also
  necessary because the proper build tool may depend on the
  project content (e.g. the Intel Fortran plugin to VS 10 and 11
  requires ``devenv.com`` to build its ``.vfproj`` project files
  even though ``MSBuild.exe`` is normally preferred to support
  the :variable:`CMAKE_GENERATOR_TOOLSET`).

  For compatibility with versions of CMake prior to 3.0, if
  a user or project explicitly adds ``CMAKE_MAKE_PROGRAM`` to
  the CMake cache then CMake will use the specified value if
  possible.

* The :generator:`Green Hills MULTI` generator sets this to the full
  path to ``gbuild.exe(Windows)`` or ``gbuild(Linux)`` based upon
  the toolset being used.

  Once the generator has initialized a particular value for this
  variable, changing the value has undefined behavior.

The ``CMAKE_MAKE_PROGRAM`` variable is set for use by project code.
The value is also used by the :option:`cmake --build` and
:option:`ctest --build-and-test` tools to launch the native
build process.


code:
CMAKE_MAP_IMPORTED_CONFIG_<CONFIG>
----------------------------------

Default value for :prop_tgt:`MAP_IMPORTED_CONFIG_<CONFIG>` of targets.

This variable is used to initialize the
:prop_tgt:`MAP_IMPORTED_CONFIG_<CONFIG>` property on all the targets.  See
that target property for additional information.


code:
CMAKE_MATCH_COUNT
-----------------

.. versionadded:: 3.2

The number of matches with the last regular expression.

When a regular expression match is used, CMake fills in
:variable:`CMAKE_MATCH_<n>` variables with the match contents.
The ``CMAKE_MATCH_COUNT`` variable holds the number of match
expressions when these are filled.


code:
CMAKE_MATCH_<n>
---------------

Capture group ``<n>`` matched by the last regular expression, for groups
0 through 9.  Group 0 is the entire match.  Groups 1 through 9 are the
subexpressions captured by ``()`` syntax.

When a regular expression match is used, CMake fills in ``CMAKE_MATCH_<n>``
variables with the match contents.  The :variable:`CMAKE_MATCH_COUNT`
variable holds the number of match expressions when these are filled.


code:
CMAKE_MAXIMUM_RECURSION_DEPTH
-----------------------------

.. versionadded:: 3.14

Maximum recursion depth for CMake scripts. It is intended to be set on the
command line with ``-DCMAKE_MAXIMUM_RECURSION_DEPTH=<x>``, or within
``CMakeLists.txt`` by projects that require a large recursion depth. Projects
that set this variable should provide the user with a way to override it. For
example:

.. code-block:: cmake

  # About to perform deeply recursive actions
  if(NOT CMAKE_MAXIMUM_RECURSION_DEPTH)
    set(CMAKE_MAXIMUM_RECURSION_DEPTH 2000)
  endif()

If it is not set, or is set to a non-integer value, a sensible default limit is
used. If the recursion limit is reached, the script terminates immediately with
a fatal error.

Calling any of the following commands increases the recursion depth:

* :command:`include`
* :command:`find_package`
* :command:`add_subdirectory`
* :command:`try_compile`
* :command:`ctest_read_custom_files`
* :command:`ctest_run_script` (unless ``NEW_PROCESS`` is specified)
* User-defined :command:`function`'s and :command:`macro`'s (note that
  :command:`function` and :command:`macro` themselves don't increase recursion
  depth)
* Reading or writing variables that are being watched by a
  :command:`variable_watch`

See also the :envvar:`CMAKE_MAXIMUM_RECURSION_DEPTH` environment variable.


code:
CMAKE_MESSAGE_CONTEXT
---------------------

.. versionadded:: 3.17

When enabled by the :option:`cmake --log-context` command line
option or the :variable:`CMAKE_MESSAGE_CONTEXT_SHOW` variable, the
:command:`message` command converts the ``CMAKE_MESSAGE_CONTEXT`` list into a
dot-separated string surrounded by square brackets and prepends it to each line
for messages of log levels ``NOTICE`` and below.

For logging contexts to work effectively, projects should generally
``APPEND`` and ``POP_BACK`` an item to the current value of
``CMAKE_MESSAGE_CONTEXT`` rather than replace it.
Projects should not assume the message context at the top of the source tree
is empty, as there are scenarios where the context might have already been set
(e.g. hierarchical projects).

.. warning::

  Valid context names are restricted to anything that could be used
  as a CMake variable name.  All names that begin with an underscore
  or the string ``cmake_`` are also reserved for use by CMake and
  should not be used by projects.

Example:

.. code-block:: cmake

  function(bar)
    list(APPEND CMAKE_MESSAGE_CONTEXT "bar")
    message(VERBOSE "bar VERBOSE message")
  endfunction()

  function(baz)
    list(APPEND CMAKE_MESSAGE_CONTEXT "baz")
    message(DEBUG "baz DEBUG message")
  endfunction()

  function(foo)
    list(APPEND CMAKE_MESSAGE_CONTEXT "foo")
    bar()
    message(TRACE "foo TRACE message")
    baz()
  endfunction()

  list(APPEND CMAKE_MESSAGE_CONTEXT "top")

  message(VERBOSE "Before `foo`")
  foo()
  message(VERBOSE "After `foo`")

  list(POP_BACK CMAKE_MESSAGE_CONTEXT)

Which results in the following output:

.. code-block:: none

  -- [top] Before `foo`
  -- [top.foo.bar] bar VERBOSE message
  -- [top.foo] foo TRACE message
  -- [top.foo.baz] baz DEBUG message
  -- [top] After `foo`


code:
CMAKE_MESSAGE_CONTEXT_SHOW
--------------------------

.. versionadded:: 3.17

Setting this variable to true enables showing a context with each line
logged by the :command:`message` command (see :variable:`CMAKE_MESSAGE_CONTEXT`
for how the context itself is specified).

This variable is an alternative to providing the ``--log-context`` option
on the :manual:`cmake <cmake(1)>` command line.  Whereas the command line
option will apply only to that one CMake run, setting
``CMAKE_MESSAGE_CONTEXT_SHOW`` to true as a cache variable will ensure that
subsequent CMake runs will continue to show the message context.

Projects should not set ``CMAKE_MESSAGE_CONTEXT_SHOW``.  It is intended for
users so that they may control whether or not to include context with messages.


code:
CMAKE_MESSAGE_INDENT
--------------------

.. versionadded:: 3.16

The :command:`message` command joins the strings from this list and for
log levels of ``NOTICE`` and below, it prepends the resultant string to
each line of the message.

Example:

.. code-block:: cmake

  list(APPEND listVar one two three)

  message(VERBOSE [[Collected items in the "listVar":]])
  list(APPEND CMAKE_MESSAGE_INDENT "  ")

  foreach(item IN LISTS listVar)
    message(VERBOSE ${item})
  endforeach()

  list(POP_BACK CMAKE_MESSAGE_INDENT)
  message(VERBOSE "No more indent")

Which results in the following output:

.. code-block:: none

  -- Collected items in the "listVar":
  --   one
  --   two
  --   three
  -- No more indent


code:
CMAKE_MESSAGE_LOG_LEVEL
-----------------------

.. versionadded:: 3.17

When set, this variable specifies the logging level used by the
:command:`message` command.  Valid values are the same as those for the
:option:`--log-level <cmake --log-level>` command line option of the
:manual:`cmake(1)` program.  If this variable is set and the
:option:`--log-level <cmake --log-level>` command line option is
given, the command line option takes precedence.

The main advantage to using this variable is to make a log level persist
between CMake runs.  Setting it as a cache variable will ensure that
subsequent CMake runs will continue to use the chosen log level.

Projects should not set this variable, it is intended for users so that
they may control the log level according to their own needs.

.. versionadded:: 3.25
  See the :command:`cmake_language`
  :ref:`cmake_language <query_message_log_level>` command for a way to query
  the current message logging level.


code:
CMAKE_MFC_FLAG
--------------

Use the MFC library for an executable or dll.

Enables the use of the Microsoft Foundation Classes (MFC).
It should be set to ``1`` for the static MFC library, and
``2`` for the shared MFC library.  This is used in Visual Studio
project files.

Usage example:

.. code-block:: cmake

  add_definitions(-D_AFXDLL)
  set(CMAKE_MFC_FLAG 2)
  add_executable(CMakeSetup WIN32 ${SRCS})

Contents of ``CMAKE_MFC_FLAG`` may use
:manual:`generator expressions <cmake-generator-expressions(7)>`.


code:
CMAKE_MINIMUM_REQUIRED_VERSION
------------------------------

The ``<min>`` version of CMake given to the most recent call to the
:command:`cmake_minimum_required(VERSION)` command in the current
variable scope or any parent variable scope.


code:
CMAKE_MINOR_VERSION
-------------------

Second version number component of the :variable:`CMAKE_VERSION`
variable.


code:
CMAKE_MODULE_LINKER_FLAGS
-------------------------

Linker flags to be used to create modules.

These flags will be used by the linker when creating a module.


code:
CMAKE_MODULE_LINKER_FLAGS_<CONFIG>
----------------------------------

Flags to be used when linking a module.

Same as ``CMAKE_C_FLAGS_*`` but used by the linker when creating modules.


code:
CMAKE_MODULE_LINKER_FLAGS_<CONFIG>_INIT
---------------------------------------

.. versionadded:: 3.7

Value used to initialize the :variable:`CMAKE_MODULE_LINKER_FLAGS_<CONFIG>`
cache entry the first time a build tree is configured.
This variable is meant to be set by a :variable:`toolchain file
<CMAKE_TOOLCHAIN_FILE>`.  CMake may prepend or append content to
the value based on the environment and target platform.

See also :variable:`CMAKE_MODULE_LINKER_FLAGS_INIT`.


code:
CMAKE_MODULE_LINKER_FLAGS_INIT
------------------------------

.. versionadded:: 3.7

Value used to initialize the :variable:`CMAKE_MODULE_LINKER_FLAGS`
cache entry the first time a build tree is configured.
This variable is meant to be set by a :variable:`toolchain file
<CMAKE_TOOLCHAIN_FILE>`.  CMake may prepend or append content to
the value based on the environment and target platform.

See also the configuration-specific variable
:variable:`CMAKE_MODULE_LINKER_FLAGS_<CONFIG>_INIT`.


code:
CMAKE_MODULE_PATH
-----------------

:ref:`Semicolon-separated list <CMake Language Lists>` of directories,
represented using forward slashes, specifying a search path for CMake modules
to be loaded by the :command:`include` or :command:`find_package` commands
before checking the default modules that come with CMake. By default it is
empty.  It is intended to be set by the project.


code:
CMAKE_MSVCIDE_RUN_PATH
----------------------

.. versionadded:: 3.10

Extra PATH locations that should be used when executing
:command:`add_custom_command` or :command:`add_custom_target` when using the
:generator:`Visual Studio 9 2008` (or above) generator. This allows
for running commands and using dll's that the IDE environment is not aware of.

If not set explicitly the value is initialized by the ``CMAKE_MSVCIDE_RUN_PATH``
environment variable, if set, and otherwise left empty.


code:
CMAKE_MSVC_DEBUG_INFORMATION_FORMAT
-----------------------------------

.. versionadded:: 3.25

Select the MSVC debug information format targeting the MSVC ABI.
This variable is used to initialize the
:prop_tgt:`MSVC_DEBUG_INFORMATION_FORMAT` property on all targets as they are
created.  It is also propagated by calls to the :command:`try_compile` command
into the test project.

The allowed values are:

.. include:: ../prop_tgt/MSVC_DEBUG_INFORMATION_FORMAT-VALUES.txt

Use :manual:`generator expressions <cmake-generator-expressions(7)>` to
support per-configuration specification.  For example, the code:

.. code-block:: cmake

  set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>")

selects for all following targets the program database debug information format
for the Debug configuration.

If this variable is not set, the :prop_tgt:`MSVC_DEBUG_INFORMATION_FORMAT`
target property will not be set automatically.  If that property is not set,
CMake selects a debug information format using the default value
``$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>``, if supported by the
compiler, and otherwise ``$<$<CONFIG:Debug,RelWithDebInfo>:Embedded>``.

.. note::

  This variable has effect only when policy :policy:`CMP0141` is set to ``NEW``
  prior to the first :command:`project` or :command:`enable_language` command
  that enables a language using a compiler targeting the MSVC ABI.


code:
CMAKE_MSVC_RUNTIME_LIBRARY
--------------------------

.. versionadded:: 3.15

Select the MSVC runtime library for use by compilers targeting the MSVC ABI.
This variable is used to initialize the :prop_tgt:`MSVC_RUNTIME_LIBRARY`
property on all targets as they are created.  It is also propagated by
calls to the :command:`try_compile` command into the test project.

The allowed values are:

.. include:: ../prop_tgt/MSVC_RUNTIME_LIBRARY-VALUES.txt

Use :manual:`generator expressions <cmake-generator-expressions(7)>` to
support per-configuration specification.  For example, the code:

.. code-block:: cmake

  set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")

selects for all following targets a multi-threaded statically-linked runtime
library with or without debug information depending on the configuration.

If this variable is not set then the :prop_tgt:`MSVC_RUNTIME_LIBRARY` target
property will not be set automatically.  If that property is not set then
CMake uses the default value ``MultiThreaded$<$<CONFIG:Debug>:Debug>DLL``
to select a MSVC runtime library.

.. note::

  This variable has effect only when policy :policy:`CMP0091` is set to ``NEW``
  prior to the first :command:`project` or :command:`enable_language` command
  that enables a language using a compiler targeting the MSVC ABI.


code:
CMAKE_NETRC
-----------

.. versionadded:: 3.11

This variable is used to initialize the ``NETRC`` option for the
:command:`file(DOWNLOAD)` and :command:`file(UPLOAD)` commands.
See those commands for additional information.

This variable is also used by the :module:`ExternalProject` and
:module:`FetchContent` modules for internal calls to :command:`file(DOWNLOAD)`.

The local option takes precedence over this variable.


code:
CMAKE_NETRC_FILE
----------------

.. versionadded:: 3.11

This variable is used to initialize the ``NETRC_FILE`` option for the
:command:`file(DOWNLOAD)` and :command:`file(UPLOAD)` commands.
See those commands for additional information.

This variable is also used by the :module:`ExternalProject` and
:module:`FetchContent` modules for internal calls to :command:`file(DOWNLOAD)`.

The local option takes precedence over this variable.


code:
CMAKE_NINJA_OUTPUT_PATH_PREFIX
------------------------------

.. versionadded:: 3.6

Tell the :ref:`Ninja Generators` to add a prefix to every output path in
``build.ninja``.  A trailing slash is appended to the prefix, if missing.

This is useful when the generated ninja file is meant to be embedded as a
``subninja`` file into a *super* ninja project.  For example, the command:

.. code-block:: shell

  cd super-build-dir &&
  cmake -G Ninja -S /path/to/src -B sub -DCMAKE_NINJA_OUTPUT_PATH_PREFIX=sub/
  #                                 ^^^---------- these match -----------^^^

generates a build directory with its top-level (:variable:`CMAKE_BINARY_DIR`)
in ``super-build-dir/sub``.  The path to the build directory ends in the
output path prefix.  This makes it suitable for use in a separately-written
``super-build-dir/build.ninja`` file with a directive like this::

  subninja sub/build.ninja

The ``auto-regeneration`` rule in ``super-build-dir/build.ninja`` must
have an order-only dependency on ``sub/build.ninja``.

.. versionadded:: 3.27

  The :generator:`Ninja Multi-Config` generator supports this variable.

.. note::
  When ``CMAKE_NINJA_OUTPUT_PATH_PREFIX`` is set, the project generated
  by CMake cannot be used as a standalone project.  No default targets
  are specified.

  The value of ``CMAKE_NINJA_OUTPUT_PATH_PREFIX`` must match one or more
  path components at the *end* of :variable:`CMAKE_BINARY_DIR`, or the
  behavior is undefined.  However, this requirement is not checked
  automatically.


code:
CMAKE_NOT_USING_CONFIG_FLAGS
----------------------------

Skip ``_BUILD_TYPE`` flags if true.

This is an internal flag used by the generators in CMake to tell CMake
to skip the ``_BUILD_TYPE`` flags.


code:
CMAKE_NO_BUILTIN_CHRPATH
------------------------

Do not use the builtin binary editor to fix runtime library search
paths on installation.

When an ELF or XCOFF binary needs to have a different runtime library
search path after installation than it does in the build tree, CMake uses
a builtin editor to change the runtime search path in the installed copy.
If this variable is set to true then CMake will relink the binary before
installation instead of using its builtin editor.

For more information on RPATH handling see
the :prop_tgt:`INSTALL_RPATH` and :prop_tgt:`BUILD_RPATH` target properties.

.. versionadded:: 3.20

  This variable also applies to XCOFF binaries' LIBPATH.  Prior to the
  addition of the XCOFF editor in CMake 3.20, this variable applied only
  to ELF binaries' RPATH/RUNPATH.


code:
CMAKE_NO_SYSTEM_FROM_IMPORTED
-----------------------------

Default value for :prop_tgt:`NO_SYSTEM_FROM_IMPORTED` of targets.

This variable is used to initialize the :prop_tgt:`NO_SYSTEM_FROM_IMPORTED`
property on all the targets.  See that target property for additional
information.


code:
CMAKE_OBJCXX_EXTENSIONS
-----------------------

.. versionadded:: 3.16

Default value for :prop_tgt:`OBJCXX_EXTENSIONS` target property if set when a
target is created.

See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.


code:
CMAKE_OBJCXX_STANDARD
---------------------

.. versionadded:: 3.16

Default value for :prop_tgt:`OBJCXX_STANDARD` target property if set when a
target is created.

See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.


code:
CMAKE_OBJCXX_STANDARD_REQUIRED
------------------------------

.. versionadded:: 3.16

Default value for :prop_tgt:`OBJCXX_STANDARD_REQUIRED` target property if set
when a target is created.

See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.


code:
CMAKE_OBJC_EXTENSIONS
---------------------

.. versionadded:: 3.16

Default value for :prop_tgt:`OBJC_EXTENSIONS` target property if set when a
target is created.

See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.


code:
CMAKE_OBJC_STANDARD
-------------------

.. versionadded:: 3.16

Default value for :prop_tgt:`OBJC_STANDARD` target property if set when a
target is created.

See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.


code:
CMAKE_OBJC_STANDARD_REQUIRED
----------------------------

.. versionadded:: 3.16

Default value for :prop_tgt:`OBJC_STANDARD_REQUIRED` target property if set
when a target is created.

See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.


code:
CMAKE_OBJECT_PATH_MAX
---------------------

Maximum object file full-path length allowed by native build tools.

CMake computes for every source file an object file name that is
unique to the source file and deterministic with respect to the full
path to the source file.  This allows multiple source files in a
target to share the same name if they lie in different directories
without rebuilding when one is added or removed.  However, it can
produce long full paths in a few cases, so CMake shortens the path
using a hashing scheme when the full path to an object file exceeds a
limit.  CMake has a built-in limit for each platform that is
sufficient for common tools, but some native tools may have a lower
limit.  This variable may be set to specify the limit explicitly.  The
value must be an integer no less than 128.


code:
CMAKE_OPTIMIZE_DEPENDENCIES
---------------------------

.. versionadded:: 3.19

Initializes the :prop_tgt:`OPTIMIZE_DEPENDENCIES` target property.


code:
CMAKE_OSX_ARCHITECTURES
-----------------------

Target specific architectures for macOS and iOS.

This variable is used to initialize the :prop_tgt:`OSX_ARCHITECTURES`
property on each target as it is created.  See that target property
for additional information.

.. include:: CMAKE_OSX_VARIABLE.txt


code:
CMAKE_OSX_DEPLOYMENT_TARGET
---------------------------

Specify the minimum version of the target platform (e.g. macOS or iOS)
on which the target binaries are to be deployed.  CMake uses this
variable value for the ``-mmacosx-version-min`` flag or their respective
target platform equivalents.  For older Xcode versions that shipped
multiple macOS SDKs this variable also helps to choose the SDK in case
:variable:`CMAKE_OSX_SYSROOT` is unset.

If not set explicitly the value is initialized by the
``MACOSX_DEPLOYMENT_TARGET`` environment variable, if set,
and otherwise computed based on the host platform.

.. include:: CMAKE_OSX_VARIABLE.txt


code:
CMAKE_OSX_SYSROOT
-----------------

Specify the location or name of the macOS platform SDK to be used.
CMake uses this value to compute the value of the ``-isysroot`` flag
or equivalent and to help the ``find_*`` commands locate files in
the SDK.

If not set explicitly the value is initialized by the ``SDKROOT``
environment variable, if set, and otherwise computed based on the
:variable:`CMAKE_OSX_DEPLOYMENT_TARGET` or the host platform.

.. include:: CMAKE_OSX_VARIABLE.txt


code:
CMAKE_PARENT_LIST_FILE
----------------------

Full path to the CMake file that included the current one.

While processing a CMake file loaded by :command:`include` or
:command:`find_package` this variable contains the full path to the file
including it.  The top of the include stack is always the ``CMakeLists.txt``
for the current directory.  See also :variable:`CMAKE_CURRENT_LIST_FILE`.


code:
CMAKE_PATCH_VERSION
-------------------

Third version number component of the :variable:`CMAKE_VERSION`
variable.


code:
CMAKE_PCH_INSTANTIATE_TEMPLATES
-------------------------------

.. versionadded:: 3.19

This variable is used to initialize the :prop_tgt:`PCH_INSTANTIATE_TEMPLATES`
property of targets when they are created.


code:
CMAKE_PCH_WARN_INVALID
----------------------

.. versionadded:: 3.18

This variable is used to initialize the :prop_tgt:`PCH_WARN_INVALID`
property of targets when they are created.


code:
CMAKE_PDB_OUTPUT_DIRECTORY
--------------------------

Output directory for MS debug symbol ``.pdb`` files generated by the
linker for executable and shared library targets.

This variable is used to initialize the :prop_tgt:`PDB_OUTPUT_DIRECTORY`
property on all the targets.  See that target property for additional
information.


code:
CMAKE_PDB_OUTPUT_DIRECTORY_<CONFIG>
-----------------------------------

Per-configuration output directory for MS debug symbol ``.pdb`` files
generated by the linker for executable and shared library targets.

This is a per-configuration version of :variable:`CMAKE_PDB_OUTPUT_DIRECTORY`.
This variable is used to initialize the
:prop_tgt:`PDB_OUTPUT_DIRECTORY_<CONFIG>`
property on all the targets.  See that target property for additional
information.


code:
CMAKE_PLATFORM_NO_VERSIONED_SONAME
----------------------------------

.. versionadded:: 3.1

This variable is used to globally control whether the
:prop_tgt:`VERSION` and :prop_tgt:`SOVERSION` target
properties should be used for shared libraries.
When set to true, adding version information to each
shared library target is disabled.

By default this variable is set only on platforms where
CMake knows it is needed.   On other platforms, the
specified properties will be used for shared libraries.


code:
CMAKE_POLICY_DEFAULT_CMP<NNNN>
------------------------------

Default for CMake Policy ``CMP<NNNN>`` when it is otherwise left unset.

Commands :command:`cmake_minimum_required(VERSION)` and
:command:`cmake_policy(VERSION)` by default leave policies introduced after
the given version unset.  Set ``CMAKE_POLICY_DEFAULT_CMP<NNNN>`` to ``OLD``
or ``NEW`` to specify the default for policy ``CMP<NNNN>``, where ``<NNNN>``
is the policy number.

This variable should not be set by a project in CMake code as a way to
set its own policies; use :command:`cmake_policy(SET)` instead.  This
variable is meant to externally set policies for which a project has
not itself been updated:

* Users running CMake may set this variable in the cache
  (e.g. ``-DCMAKE_POLICY_DEFAULT_CMP<NNNN>=<OLD|NEW>``).  Set it to ``OLD``
  to quiet a policy warning while using old behavior or to ``NEW`` to
  try building the project with new behavior.

* Projects may set this variable before a call to :command:`add_subdirectory`
  that adds a third-party project in order to set its policies without
  modifying third-party code.


code:
CMAKE_POLICY_WARNING_CMP<NNNN>
------------------------------

Explicitly enable or disable the warning when CMake Policy ``CMP<NNNN>``
has not been set explicitly by :command:`cmake_policy` or implicitly
by :command:`cmake_minimum_required`. This is meaningful
only for the policies that do not warn by default:

* ``CMAKE_POLICY_WARNING_CMP0025`` controls the warning for
  policy :policy:`CMP0025`.
* ``CMAKE_POLICY_WARNING_CMP0047`` controls the warning for
  policy :policy:`CMP0047`.
* ``CMAKE_POLICY_WARNING_CMP0056`` controls the warning for
  policy :policy:`CMP0056`.
* ``CMAKE_POLICY_WARNING_CMP0060`` controls the warning for
  policy :policy:`CMP0060`.
* ``CMAKE_POLICY_WARNING_CMP0065`` controls the warning for
  policy :policy:`CMP0065`.
* ``CMAKE_POLICY_WARNING_CMP0066`` controls the warning for
  policy :policy:`CMP0066`.
* ``CMAKE_POLICY_WARNING_CMP0067`` controls the warning for
  policy :policy:`CMP0067`.
* ``CMAKE_POLICY_WARNING_CMP0082`` controls the warning for
  policy :policy:`CMP0082`.
* ``CMAKE_POLICY_WARNING_CMP0089`` controls the warning for
  policy :policy:`CMP0089`.
* ``CMAKE_POLICY_WARNING_CMP0102`` controls the warning for
  policy :policy:`CMP0102`.
* ``CMAKE_POLICY_WARNING_CMP0112`` controls the warning for
  policy :policy:`CMP0112`.
* ``CMAKE_POLICY_WARNING_CMP0116`` controls the warning for
  policy :policy:`CMP0116`.
* ``CMAKE_POLICY_WARNING_CMP0126`` controls the warning for
  policy :policy:`CMP0126`.
* ``CMAKE_POLICY_WARNING_CMP0128`` controls the warning for
  policy :policy:`CMP0128`.
* ``CMAKE_POLICY_WARNING_CMP0129`` controls the warning for
  policy :policy:`CMP0129`.
* ``CMAKE_POLICY_WARNING_CMP0133`` controls the warning for
  policy :policy:`CMP0133`.

This variable should not be set by a project in CMake code.  Project
developers running CMake may set this variable in their cache to
enable the warning (e.g. ``-DCMAKE_POLICY_WARNING_CMP<NNNN>=ON``).
Alternatively, running :manual:`cmake(1)` with the
:option:`--debug-output <cmake --debug-output>`,
:option:`--trace <cmake --trace>`, or
:option:`--trace-expand <cmake --trace-expand>` option will also
enable the warning.


code:
CMAKE_POSITION_INDEPENDENT_CODE
-------------------------------

Default value for :prop_tgt:`POSITION_INDEPENDENT_CODE` of targets.

This variable is used to initialize the
:prop_tgt:`POSITION_INDEPENDENT_CODE` property on all the targets.
See that target property for additional information.  If set, its
value is also used by the :command:`try_compile` command.


code:
CMAKE_PREFIX_PATH
-----------------

:ref:`Semicolon-separated list <CMake Language Lists>` of directories specifying installation
*prefixes* to be searched by the :command:`find_package`,
:command:`find_program`, :command:`find_library`, :command:`find_file`, and
:command:`find_path` commands.  Each command will add appropriate
subdirectories (like ``bin``, ``lib``, or ``include``) as specified in its own
documentation.

By default this is empty.  It is intended to be set by the project.

There is also an environment variable :envvar:`CMAKE_PREFIX_PATH`, which is used
as an additional list of search prefixes.

See also :variable:`CMAKE_SYSTEM_PREFIX_PATH`, :variable:`CMAKE_INCLUDE_PATH`,
:variable:`CMAKE_LIBRARY_PATH`, :variable:`CMAKE_PROGRAM_PATH`, and
:variable:`CMAKE_IGNORE_PATH`.


code:
CMAKE_PROGRAM_PATH
------------------

:ref:`Semicolon-separated list <CMake Language Lists>` of directories specifying a search path
for the :command:`find_program` command.  By default it is empty, it is
intended to be set by the project.

There is also an environment variable :envvar:`CMAKE_PROGRAM_PATH`, which is used
as an additional list of search directories.

See also :variable:`CMAKE_SYSTEM_PROGRAM_PATH` and :variable:`CMAKE_PREFIX_PATH`.


code:
CMAKE_PROJECT_DESCRIPTION
-------------------------

.. versionadded:: 3.9

The description of the top level project.

This variable holds the description of the project as specified in the top
level CMakeLists.txt file by a :command:`project` command.  In the event that
the top level CMakeLists.txt contains multiple :command:`project` calls,
the most recently called one from that top level CMakeLists.txt will determine
the value that ``CMAKE_PROJECT_DESCRIPTION`` contains.  For example, consider
the following top level CMakeLists.txt:

.. code-block:: cmake

  cmake_minimum_required(VERSION 3.0)
  project(First DESCRIPTION "I am First")
  project(Second DESCRIPTION "I am Second")
  add_subdirectory(sub)
  project(Third DESCRIPTION "I am Third")

And ``sub/CMakeLists.txt`` with the following contents:

.. code-block:: cmake

  project(SubProj DESCRIPTION "I am SubProj")
  message("CMAKE_PROJECT_DESCRIPTION = ${CMAKE_PROJECT_DESCRIPTION}")

The most recently seen :command:`project` command from the top level
CMakeLists.txt would be ``project(Second ...)``, so this will print::

  CMAKE_PROJECT_DESCRIPTION = I am Second

To obtain the description from the most recent call to :command:`project` in
the current directory scope or above, see the :variable:`PROJECT_DESCRIPTION`
variable.


code:
CMAKE_PROJECT_HOMEPAGE_URL
--------------------------

.. versionadded:: 3.12

The homepage URL of the top level project.

This variable holds the homepage URL of the project as specified in the top
level CMakeLists.txt file by a :command:`project` command.  In the event that
the top level CMakeLists.txt contains multiple :command:`project` calls,
the most recently called one from that top level CMakeLists.txt will determine
the value that ``CMAKE_PROJECT_HOMEPAGE_URL`` contains.  For example, consider
the following top level CMakeLists.txt:

.. code-block:: cmake

  cmake_minimum_required(VERSION 3.0)
  project(First HOMEPAGE_URL "http://first.example.com")
  project(Second HOMEPAGE_URL "http://second.example.com")
  add_subdirectory(sub)
  project(Third HOMEPAGE_URL "http://third.example.com")

And ``sub/CMakeLists.txt`` with the following contents:

.. code-block:: cmake

  project(SubProj HOMEPAGE_URL "http://subproj.example.com")
  message("CMAKE_PROJECT_HOMEPAGE_URL = ${CMAKE_PROJECT_HOMEPAGE_URL}")

The most recently seen :command:`project` command from the top level
CMakeLists.txt would be ``project(Second ...)``, so this will print::

  CMAKE_PROJECT_HOMEPAGE_URL = http://second.example.com

To obtain the homepage URL from the most recent call to :command:`project` in
the current directory scope or above, see the :variable:`PROJECT_HOMEPAGE_URL`
variable.


code:
CMAKE_PROJECT_INCLUDE
---------------------

.. versionadded:: 3.15

A CMake language file to be included as the last step of all
:command:`project` command calls.  This is intended for injecting custom code
into project builds without modifying their source.  See :ref:`Code Injection`
for a more detailed discussion of files potentially included during a
:command:`project` call.

.. versionadded:: 3.29
  This variable can be a :ref:`semicolon-separated list <CMake Language Lists>`
  of CMake language files to be included sequentially. It can also now refer to
  module names to be found in :variable:`CMAKE_MODULE_PATH` or builtin to CMake.

See also the :variable:`CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE`,
:variable:`CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE_BEFORE`,
:variable:`CMAKE_PROJECT_INCLUDE_BEFORE`, and
:variable:`CMAKE_PROJECT_TOP_LEVEL_INCLUDES` variables.


code:
CMAKE_PROJECT_INCLUDE_BEFORE
----------------------------

.. versionadded:: 3.15

A CMake language file to be included as the first step of all
:command:`project` command calls.  This is intended for injecting custom code
into project builds without modifying their source.  See :ref:`Code Injection`
for a more detailed discussion of files potentially included during a
:command:`project` call.

.. versionadded:: 3.29
  This variable can be a :ref:`semicolon-separated list <CMake Language Lists>`
  of CMake language files to be included sequentially. It can also now refer to
  module names to be found in :variable:`CMAKE_MODULE_PATH` or builtin to CMake.

See also the :variable:`CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE`,
:variable:`CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE_BEFORE`,
:variable:`CMAKE_PROJECT_INCLUDE`, and
:variable:`CMAKE_PROJECT_TOP_LEVEL_INCLUDES` variables.


code:
CMAKE_PROJECT_NAME
------------------

The name of the top level project.

This variable holds the name of the project as specified in the top
level CMakeLists.txt file by a :command:`project` command.  In the event that
the top level CMakeLists.txt contains multiple :command:`project` calls,
the most recently called one from that top level CMakeLists.txt will determine
the name that ``CMAKE_PROJECT_NAME`` contains.  For example, consider
the following top level CMakeLists.txt:

.. code-block:: cmake

  cmake_minimum_required(VERSION 3.0)
  project(First)
  project(Second)
  add_subdirectory(sub)
  project(Third)

And ``sub/CMakeLists.txt`` with the following contents:

.. code-block:: cmake

  project(SubProj)
  message("CMAKE_PROJECT_NAME = ${CMAKE_PROJECT_NAME}")

The most recently seen :command:`project` command from the top level
CMakeLists.txt would be ``project(Second)``, so this will print::

  CMAKE_PROJECT_NAME = Second

To obtain the name from the most recent call to :command:`project` in
the current directory scope or above, see the :variable:`PROJECT_NAME`
variable.


code:
CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE
------------------------------------

A CMake language file to be included as the last step of any
:command:`project` command calls that specify ``<PROJECT-NAME>`` as the project
name.  This is intended for injecting custom code into project builds without
modifying their source.  See :ref:`Code Injection` for a more detailed
discussion of files potentially included during a :command:`project` call.

.. versionadded:: 3.29
  This variable can be a :ref:`semicolon-separated list <CMake Language Lists>`
  of CMake language files to be included sequentially. It can also now refer to
  module names to be found in :variable:`CMAKE_MODULE_PATH` or builtin to CMake.

See also the :variable:`CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE_BEFORE`,
:variable:`CMAKE_PROJECT_INCLUDE`, :variable:`CMAKE_PROJECT_INCLUDE_BEFORE`,
and :variable:`CMAKE_PROJECT_TOP_LEVEL_INCLUDES` variables.


code:
CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE_BEFORE
-------------------------------------------

.. versionadded:: 3.17

A CMake language file to be included as the first step of any
:command:`project` command calls that specify ``<PROJECT-NAME>`` as the project
name.  This is intended for injecting custom code into project builds without
modifying their source.  See :ref:`Code Injection` for a more detailed
discussion of files potentially included during a :command:`project` call.

.. versionadded:: 3.29
  This variable can be a :ref:`semicolon-separated list <CMake Language Lists>`
  of CMake language files to be included sequentially. It can also now refer to
  module names to be found in :variable:`CMAKE_MODULE_PATH` or builtin to CMake.

See also the :variable:`CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE`,
:variable:`CMAKE_PROJECT_INCLUDE`, :variable:`CMAKE_PROJECT_INCLUDE_BEFORE`,
and :variable:`CMAKE_PROJECT_TOP_LEVEL_INCLUDES` variables.


code:
CMAKE_PROJECT_TOP_LEVEL_INCLUDES
--------------------------------

.. versionadded:: 3.24

:ref:`Semicolon-separated list <CMake Language Lists>` of CMake language
files to include as part of the very first :command:`project` call.
The files will be included immediately after the toolchain file has been read
(if one is specified) and platform variables have been set, but before any
languages have been enabled. Therefore, language-specific variables,
including things like :variable:`CMAKE_<LANG>_COMPILER`, might not be set.
See :ref:`Code Injection` for a more detailed discussion of files potentially
included during a :command:`project` call.

.. versionadded:: 3.29
  This variable can also now refer to module names to be found in
  :variable:`CMAKE_MODULE_PATH` or builtin to CMake.

This variable is intended for specifying files that perform one-time setup
for the build. It provides an injection point for things like configuring
package managers, adding logic the user shares between projects (e.g. defining
their own custom build types), and so on. It is primarily for users to add
things specific to their environment, but not for specifying the toolchain
details (use :variable:`CMAKE_TOOLCHAIN_FILE` for that).

By default, this variable is empty.  It is intended to be set by the user.

See also the :variable:`CMAKE_PROJECT_INCLUDE`,
:variable:`CMAKE_PROJECT_INCLUDE_BEFORE`,
:variable:`CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE`, and
:variable:`CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE_BEFORE` variables.


code:
CMAKE_PROJECT_VERSION
---------------------

.. versionadded:: 3.12

The version of the top level project.

This variable holds the version of the project as specified in the top
level CMakeLists.txt file by a :command:`project` command.  In the event that
the top level CMakeLists.txt contains multiple :command:`project` calls,
the most recently called one from that top level CMakeLists.txt will determine
the value that ``CMAKE_PROJECT_VERSION`` contains.  For example, consider
the following top level CMakeLists.txt:

.. code-block:: cmake

  cmake_minimum_required(VERSION 3.0)
  project(First VERSION 1.2.3)
  project(Second VERSION 3.4.5)
  add_subdirectory(sub)
  project(Third VERSION 6.7.8)

And ``sub/CMakeLists.txt`` with the following contents:

.. code-block:: cmake

  project(SubProj VERSION 1)
  message("CMAKE_PROJECT_VERSION = ${CMAKE_PROJECT_VERSION}")

The most recently seen :command:`project` command from the top level
CMakeLists.txt would be ``project(Second ...)``, so this will print::

  CMAKE_PROJECT_VERSION = 3.4.5

To obtain the version from the most recent call to :command:`project` in
the current directory scope or above, see the :variable:`PROJECT_VERSION`
variable.


code:
CMAKE_PROJECT_VERSION_MAJOR
---------------------------

.. versionadded:: 3.12

The major version of the top level project.

This variable holds the major version of the project as specified in the top
level CMakeLists.txt file by a :command:`project` command. Please see
:variable:`CMAKE_PROJECT_VERSION` documentation for the behavior when
multiple :command:`project` commands are used in the sources.


code:
CMAKE_PROJECT_VERSION_MINOR
---------------------------

.. versionadded:: 3.12

The minor version of the top level project.

This variable holds the minor version of the project as specified in the top
level CMakeLists.txt file by a :command:`project` command. Please see
:variable:`CMAKE_PROJECT_VERSION` documentation for the behavior when
multiple :command:`project` commands are used in the sources.


code:
CMAKE_PROJECT_VERSION_PATCH
---------------------------

.. versionadded:: 3.12

The patch version of the top level project.

This variable holds the patch version of the project as specified in the top
level CMakeLists.txt file by a :command:`project` command. Please see
:variable:`CMAKE_PROJECT_VERSION` documentation for the behavior when
multiple :command:`project` commands are used in the sources.


code:
CMAKE_PROJECT_VERSION_TWEAK
---------------------------

.. versionadded:: 3.12

The tweak version of the top level project.

This variable holds the tweak version of the project as specified in the top
level CMakeLists.txt file by a :command:`project` command. Please see
:variable:`CMAKE_PROJECT_VERSION` documentation for the behavior when
multiple :command:`project` commands are used in the sources.


code:
CMAKE_RANLIB
------------

Name of randomizing tool for static libraries.

This specifies name of the program that randomizes libraries on UNIX,
not used on Windows, but may be present.


code:
CMAKE_REQUIRE_FIND_PACKAGE_<PackageName>
----------------------------------------

.. versionadded:: 3.22

Variable for making :command:`find_package` call ``REQUIRED``.

Every non-``REQUIRED`` :command:`find_package` call in a project can be
turned into ``REQUIRED`` by setting the variable
``CMAKE_REQUIRE_FIND_PACKAGE_<PackageName>`` to ``TRUE``.
This can be used to assert assumptions about build environment and to
ensure the build will fail early if they do not hold.

Note that setting this variable to true breaks some commonly used patterns.
Multiple calls to :command:`find_package` are sometimes used to obtain a
different search order to the default.
For example, projects can force checking a known path for a particular
package first before searching any of the other default search paths:

.. code:: cmake

  find_package(something PATHS /some/local/path NO_DEFAULT_PATH)
  find_package(something)

In the above, the first call looks for the ``something`` package in a specific
directory.  If ``CMAKE_REQUIRE_FIND_PACKAGE_something`` is set to true, then
this first call must succeed, otherwise a fatal error occurs.  The second call
never gets a chance to provide a fall-back to using the default search
locations.

A similar pattern is used even by some of CMake's own Find modules to search
for a config package first:

.. code:: cmake

  find_package(something CONFIG QUIET)
  if(NOT something_FOUND)
    # Fall back to searching using typical Find module logic...
  endif()

Again, if ``CMAKE_REQUIRE_FIND_PACKAGE_something`` is true, the first call
must succeed.  It effectively means a config package must be found for the
dependency, and the Find module logic is never used.

See also the :variable:`CMAKE_DISABLE_FIND_PACKAGE_<PackageName>` variable.


code:
CMAKE_ROOT
----------

Install directory for running cmake.

This is the install root for the running CMake and the ``Modules``
directory can be found here.  This is commonly used in this format:
``${CMAKE_ROOT}/Modules``


code:
CMAKE_RULE_MESSAGES
-------------------

.. versionadded:: 3.13

Specify whether to report a message for each make rule.

If set in the cache it is used to initialize the value of the :prop_gbl:`RULE_MESSAGES` property.
Users may disable the option in their local build tree to disable granular messages
and report only as each target completes in Makefile builds.


code:
CMAKE_RUNTIME_OUTPUT_DIRECTORY
------------------------------

Where to put all the :ref:`RUNTIME <Runtime Output Artifacts>`
target files when built.

This variable is used to initialize the :prop_tgt:`RUNTIME_OUTPUT_DIRECTORY`
property on all the targets.  See that target property for additional
information.


code:
CMAKE_RUNTIME_OUTPUT_DIRECTORY_<CONFIG>
---------------------------------------

.. versionadded:: 3.3

Where to put all the :ref:`RUNTIME <Runtime Output Artifacts>`
target files when built for a specific configuration.

This variable is used to initialize the
:prop_tgt:`RUNTIME_OUTPUT_DIRECTORY_<CONFIG>` property on all the targets.
See that target property for additional information.


code:
CMAKE_SCRIPT_MODE_FILE
----------------------

Full path to the :option:`cmake -P` script file currently being
processed.

When run in :option:`cmake -P` script mode, CMake sets this variable to
the full path of the script file.  When run to configure a ``CMakeLists.txt``
file, this variable is not set.


code:
CMAKE_SHARED_LIBRARY_ENABLE_EXPORTS
-----------------------------------

.. versionadded:: 3.27

Specify whether shared library generates an import file.

This variable is used to initialize the :prop_tgt:`ENABLE_EXPORTS` target
property for shared library targets when they are created by calls to the
:command:`add_library` command.  See the property documentation for details.


code:
CMAKE_SHARED_LIBRARY_PREFIX
---------------------------

The prefix for shared libraries that you link to.

The prefix to use for the name of a shared library, ``lib`` on UNIX.

``CMAKE_SHARED_LIBRARY_PREFIX_<LANG>`` overrides this for language ``<LANG>``.


code:
CMAKE_SHARED_LIBRARY_SUFFIX
---------------------------

The suffix for shared libraries that you link to.

The suffix to use for the end of a shared library filename, ``.dll`` on
Windows.

``CMAKE_SHARED_LIBRARY_SUFFIX_<LANG>`` overrides this for language ``<LANG>``.


code:
CMAKE_SHARED_LINKER_FLAGS
-------------------------

Linker flags to be used to create shared libraries.

These flags will be used by the linker when creating a shared library.


code:
CMAKE_SHARED_LINKER_FLAGS_<CONFIG>
----------------------------------

Flags to be used when linking a shared library.

Same as ``CMAKE_C_FLAGS_*`` but used by the linker when creating shared
libraries.


code:
CMAKE_SHARED_LINKER_FLAGS_<CONFIG>_INIT
---------------------------------------

.. versionadded:: 3.7

Value used to initialize the :variable:`CMAKE_SHARED_LINKER_FLAGS_<CONFIG>`
cache entry the first time a build tree is configured.
This variable is meant to be set by a :variable:`toolchain file
<CMAKE_TOOLCHAIN_FILE>`.  CMake may prepend or append content to
the value based on the environment and target platform.

See also :variable:`CMAKE_SHARED_LINKER_FLAGS_INIT`.


code:
CMAKE_SHARED_LINKER_FLAGS_INIT
------------------------------

.. versionadded:: 3.7

Value used to initialize the :variable:`CMAKE_SHARED_LINKER_FLAGS`
cache entry the first time a build tree is configured.
This variable is meant to be set by a :variable:`toolchain file
<CMAKE_TOOLCHAIN_FILE>`.  CMake may prepend or append content to
the value based on the environment and target platform.

See also the configuration-specific variable
:variable:`CMAKE_SHARED_LINKER_FLAGS_<CONFIG>_INIT`.


code:
CMAKE_SHARED_MODULE_PREFIX
--------------------------

The prefix for loadable modules that you link to.

The prefix to use for the name of a loadable module on this platform.

``CMAKE_SHARED_MODULE_PREFIX_<LANG>`` overrides this for language ``<LANG>``.


code:
CMAKE_SHARED_MODULE_SUFFIX
--------------------------

The suffix for shared libraries that you link to.

The suffix to use for the end of a loadable module filename on this
platform

``CMAKE_SHARED_MODULE_SUFFIX_<LANG>`` overrides this for language ``<LANG>``.


code:
CMAKE_SIZEOF_VOID_P
-------------------

Size of a ``void`` pointer.

This is set to the size of a pointer on the target machine, and is determined
when a compiled language is enabled.  If a 64-bit size is found, then the
library search path is modified to look for 64-bit libraries first.


code:
CMAKE_SKIP_BUILD_RPATH
----------------------

Do not include RPATHs in the build tree.

Normally CMake uses the build tree for the RPATH when building
executables etc on systems that use RPATH.  When the software is
installed the executables etc are relinked by CMake to have the
install RPATH.  If this variable is set to ``TRUE`` then the software is
always built with no RPATH.

This is used to initialize the :prop_tgt:`SKIP_BUILD_RPATH` target property
for all targets. For more information on RPATH handling see
the :prop_tgt:`INSTALL_RPATH` and :prop_tgt:`BUILD_RPATH` target properties.

See also the :variable:`CMAKE_SKIP_INSTALL_RPATH` variable.
To omit RPATH in both the build and install steps, use
:variable:`CMAKE_SKIP_RPATH` instead.


code:
CMAKE_SKIP_INSTALL_ALL_DEPENDENCY
---------------------------------

Don't make the ``install`` target depend on the ``all`` target.

By default, the ``install`` target depends on the ``all`` target.  This
has the effect, that when ``make install`` is invoked or ``INSTALL`` is
built, first the ``all`` target is built, then the installation starts.
If ``CMAKE_SKIP_INSTALL_ALL_DEPENDENCY`` is set to ``TRUE``, this
dependency is not created, so the installation process will start immediately,
independent from whether the project has been completely built or not.

See also :variable:`CMAKE_SKIP_TEST_ALL_DEPENDENCY`.


code:
CMAKE_SKIP_INSTALL_RPATH
------------------------

Do not include RPATHs in the install tree.

Normally CMake uses the build tree for the RPATH when building
executables etc on systems that use RPATH.  When the software is
installed the executables etc are relinked by CMake to have the
install RPATH.  If this variable is set to true then the software is
always installed without RPATH, even if RPATH is enabled when
building.  This can be useful for example to allow running tests from
the build directory with RPATH enabled before the installation step.

See also the :variable:`CMAKE_SKIP_BUILD_RPATH` variable.
To omit RPATH in both the build and install steps, use
:variable:`CMAKE_SKIP_RPATH` instead.

For more information on RPATH handling see the :prop_tgt:`INSTALL_RPATH`
and :prop_tgt:`BUILD_RPATH` target properties.


code:
CMAKE_SKIP_INSTALL_RULES
------------------------

Whether to disable generation of installation rules.

If ``TRUE``, CMake will neither generate installation rules nor
will it generate ``cmake_install.cmake`` files. This variable is ``FALSE`` by
default.


code:
CMAKE_SKIP_RPATH
----------------

If true, do not add run time path information.

If this is set to ``TRUE``, then the rpath information is not added to
compiled executables.  The default is to add rpath information if the
platform supports it.  This allows for easy running from the build
tree.  To omit RPATH in the install step, but not the build step, use
:variable:`CMAKE_SKIP_INSTALL_RPATH` instead. To omit RPATH in the build step,
use :variable:`CMAKE_SKIP_BUILD_RPATH`.

For more information on RPATH handling see the :prop_tgt:`INSTALL_RPATH`
and :prop_tgt:`BUILD_RPATH` target properties.


code:
CMAKE_SKIP_TEST_ALL_DEPENDENCY
------------------------------

.. versionadded:: 3.29

Control whether the ``test`` target depends on the ``all`` target.

If this variable is not defined, or is set to ``TRUE``, then the
``test`` (or ``RUN_TESTS``) target does not depend on the
``all`` (or ``ALL_BUILD``) target.  When the ``test`` target is built,
e.g., via ``make test``, the test process will start immediately,
regardless of whether the project has been completely built or not.

If ``CMAKE_SKIP_TEST_ALL_DEPENDENCY`` is explicitly set to ``FALSE``,
then the ``test`` target will depend on the ``all`` target.  When the
``test`` target is built, e.g., via ``make test``, the ``all`` target
will be built first, and then the tests will run.

See also :variable:`CMAKE_SKIP_INSTALL_ALL_DEPENDENCY`.


code:
CMAKE_SOURCE_DIR
----------------

The path to the top level of the source tree.

This is the full path to the top level of the current CMake source
tree.  For an in-source build, this would be the same as
:variable:`CMAKE_BINARY_DIR`.

When run in :option:`cmake -P` script mode, CMake sets the variables
:variable:`CMAKE_BINARY_DIR`, ``CMAKE_SOURCE_DIR``,
:variable:`CMAKE_CURRENT_BINARY_DIR` and
:variable:`CMAKE_CURRENT_SOURCE_DIR` to the current working directory.


code:
CMAKE_STAGING_PREFIX
--------------------

This variable may be set to a path to install to when cross-compiling. This can
be useful if the path in :variable:`CMAKE_SYSROOT` is read-only, or otherwise
should remain pristine.

The ``CMAKE_STAGING_PREFIX`` location is also used as a search prefix
by the ``find_*`` commands. This can be controlled by setting the
:variable:`CMAKE_FIND_NO_INSTALL_PREFIX` variable.

If any ``RPATH``/``RUNPATH`` entries passed to the linker contain the
``CMAKE_STAGING_PREFIX``, the matching path fragments are replaced
with the :variable:`CMAKE_INSTALL_PREFIX`.


code:
CMAKE_STATIC_LIBRARY_PREFIX
---------------------------

The prefix for static libraries that you link to.

The prefix to use for the name of a static library, ``lib`` on UNIX.

``CMAKE_STATIC_LIBRARY_PREFIX_<LANG>`` overrides this for language ``<LANG>``.


code:
CMAKE_STATIC_LIBRARY_SUFFIX
---------------------------

The suffix for static libraries that you link to.

The suffix to use for the end of a static library filename, ``.lib`` on
Windows.

``CMAKE_STATIC_LIBRARY_SUFFIX_<LANG>`` overrides this for language ``<LANG>``.


code:
CMAKE_STATIC_LINKER_FLAGS
-------------------------

Flags to be used to create static libraries.  These flags will be passed
to the archiver when creating a static library.

See also :variable:`CMAKE_STATIC_LINKER_FLAGS_<CONFIG>`.

.. note::
  Static libraries do not actually link.  They are essentially archives
  of object files.  The use of the name "linker" in the name of this
  variable is kept for compatibility.


code:
CMAKE_STATIC_LINKER_FLAGS_<CONFIG>
----------------------------------

Flags to be used to create static libraries.  These flags will be passed
to the archiver when creating a static library in the ``<CONFIG>``
configuration.

See also :variable:`CMAKE_STATIC_LINKER_FLAGS`.

.. note::
  Static libraries do not actually link.  They are essentially archives
  of object files.  The use of the name "linker" in the name of this
  variable is kept for compatibility.


code:
CMAKE_STATIC_LINKER_FLAGS_<CONFIG>_INIT
---------------------------------------

.. versionadded:: 3.7

Value used to initialize the :variable:`CMAKE_STATIC_LINKER_FLAGS_<CONFIG>`
cache entry the first time a build tree is configured.
This variable is meant to be set by a :variable:`toolchain file
<CMAKE_TOOLCHAIN_FILE>`.  CMake may prepend or append content to
the value based on the environment and target platform.

See also :variable:`CMAKE_STATIC_LINKER_FLAGS_INIT`.


code:
CMAKE_STATIC_LINKER_FLAGS_INIT
------------------------------

.. versionadded:: 3.7

Value used to initialize the :variable:`CMAKE_STATIC_LINKER_FLAGS`
cache entry the first time a build tree is configured.
This variable is meant to be set by a :variable:`toolchain file
<CMAKE_TOOLCHAIN_FILE>`.  CMake may prepend or append content to
the value based on the environment and target platform.

See also the configuration-specific variable
:variable:`CMAKE_STATIC_LINKER_FLAGS_<CONFIG>_INIT`.


code:
CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS
---------------------------------

.. versionadded:: 3.8

This variable contains a list of env vars as a list of tokens with the
syntax ``var=value``.

Example:

.. code-block:: cmake

  set(CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS
     "FOO=FOO1\;FOO2\;FOON"
     "BAR=BAR1\;BAR2\;BARN"
     "BAZ=BAZ1\;BAZ2\;BAZN"
     "FOOBAR=FOOBAR1\;FOOBAR2\;FOOBARN"
     "VALID="
     )

In case of malformed variables CMake will fail:

.. code-block:: cmake

  set(CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS
      "THIS_IS_NOT_VALID"
      )


code:
CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE
---------------------------------------

.. versionadded:: 3.8

If this variable evaluates to ``ON`` at the end of the top-level
``CMakeLists.txt`` file, the :generator:`Sublime Text 2` extra generator
excludes the build tree from the ``.sublime-project`` if it is inside the
source tree.


code:
CMAKE_SUPPRESS_REGENERATION
---------------------------

.. versionadded:: 3.12

If ``CMAKE_SUPPRESS_REGENERATION`` is ``OFF``, which is default, then CMake
adds a special target on which all other targets depend that checks the build
system and optionally re-runs CMake to regenerate the build system when
the target specification source changes.

If this variable evaluates to ``ON`` at the end of the top-level
``CMakeLists.txt`` file, CMake will not add the regeneration target to the
build system or perform any build system checks.


code:
CMAKE_SYSROOT
-------------

Path to pass to the compiler in the ``--sysroot`` flag.

The ``CMAKE_SYSROOT`` content is passed to the compiler in the ``--sysroot``
flag, if supported.  The path is also stripped from the ``RPATH``/``RUNPATH``
if necessary on installation.  The ``CMAKE_SYSROOT`` is also used to prefix
paths searched by the ``find_*`` commands.

This variable may only be set in a toolchain file specified by
the :variable:`CMAKE_TOOLCHAIN_FILE` variable.

See also the :variable:`CMAKE_SYSROOT_COMPILE` and
:variable:`CMAKE_SYSROOT_LINK` variables.


code:
CMAKE_SYSROOT_COMPILE
---------------------

.. versionadded:: 3.9

Path to pass to the compiler in the ``--sysroot`` flag when compiling source
files.  This is the same as :variable:`CMAKE_SYSROOT` but is used only for
compiling sources and not linking.

This variable may only be set in a toolchain file specified by
the :variable:`CMAKE_TOOLCHAIN_FILE` variable.


code:
CMAKE_SYSROOT_LINK
------------------

.. versionadded:: 3.9

Path to pass to the compiler in the ``--sysroot`` flag when linking.  This is
the same as :variable:`CMAKE_SYSROOT` but is used only for linking and not
compiling sources.

This variable may only be set in a toolchain file specified by
the :variable:`CMAKE_TOOLCHAIN_FILE` variable.


code:
CMAKE_SYSTEM
------------

Composite name of operating system CMake is compiling for.

This variable is the composite of :variable:`CMAKE_SYSTEM_NAME` and
:variable:`CMAKE_SYSTEM_VERSION`, e.g.
``${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_VERSION}``.  If
:variable:`CMAKE_SYSTEM_VERSION` is not set, then this variable is
the same as :variable:`CMAKE_SYSTEM_NAME`.


code:
CMAKE_SYSTEM_APPBUNDLE_PATH
---------------------------

.. versionadded:: 3.4

Search path for macOS application bundles used by the :command:`find_program`,
and :command:`find_package` commands.  By default it contains the standard
directories for the current system.  It is *not* intended to be modified by
the project, use :variable:`CMAKE_APPBUNDLE_PATH` for this.


code:
CMAKE_SYSTEM_FRAMEWORK_PATH
---------------------------

.. versionadded:: 3.4

Search path for macOS frameworks used by the :command:`find_library`,
:command:`find_package`, :command:`find_path`, and :command:`find_file`
commands.  By default it contains the standard directories for the
current system.  It is *not* intended to be modified by the project,
use :variable:`CMAKE_FRAMEWORK_PATH` for this.


code:
CMAKE_SYSTEM_IGNORE_PATH
------------------------

.. |CMAKE_IGNORE_VAR| replace:: ``CMAKE_SYSTEM_IGNORE_PATH``
.. |CMAKE_IGNORE_PREFIX_VAR| replace:: :variable:`CMAKE_SYSTEM_IGNORE_PREFIX_PATH`
.. |CMAKE_IGNORE_NONSYSTEM_VAR| replace:: :variable:`CMAKE_IGNORE_PATH`

.. include:: IGNORE_SEARCH_PATH.txt
.. include:: IGNORE_SEARCH_LOCATIONS.txt
.. include:: IGNORE_SEARCH_SYSTEM.txt

See also the following variables:

- :variable:`CMAKE_SYSTEM_IGNORE_PREFIX_PATH`
- :variable:`CMAKE_SYSTEM_PREFIX_PATH`
- :variable:`CMAKE_SYSTEM_LIBRARY_PATH`
- :variable:`CMAKE_SYSTEM_INCLUDE_PATH`
- :variable:`CMAKE_SYSTEM_PROGRAM_PATH`


code:
CMAKE_SYSTEM_IGNORE_PREFIX_PATH
-------------------------------

.. versionadded:: 3.23

.. |CMAKE_IGNORE_VAR| replace:: ``CMAKE_SYSTEM_IGNORE_PREFIX_PATH``
.. |CMAKE_IGNORE_NONPREFIX_VAR| replace:: :variable:`CMAKE_SYSTEM_IGNORE_PATH`
.. |CMAKE_IGNORE_NONSYSTEM_VAR| replace:: :variable:`CMAKE_IGNORE_PREFIX_PATH`

.. include:: IGNORE_SEARCH_PREFIX.txt
.. include:: IGNORE_SEARCH_LOCATIONS.txt
.. include:: IGNORE_SEARCH_SYSTEM.txt

See also the following variables:

- :variable:`CMAKE_SYSTEM_IGNORE_PATH`
- :variable:`CMAKE_SYSTEM_PREFIX_PATH`
- :variable:`CMAKE_SYSTEM_LIBRARY_PATH`
- :variable:`CMAKE_SYSTEM_INCLUDE_PATH`
- :variable:`CMAKE_SYSTEM_PROGRAM_PATH`


code:
CMAKE_SYSTEM_INCLUDE_PATH
-------------------------

:ref:`Semicolon-separated list <CMake Language Lists>` of directories specifying a search path
for the :command:`find_file` and :command:`find_path` commands.  By default
this contains the standard directories for the current system.  It is *not*
intended to be modified by the project; use :variable:`CMAKE_INCLUDE_PATH` for
this.  See also :variable:`CMAKE_SYSTEM_PREFIX_PATH`.


code:
CMAKE_SYSTEM_LIBRARY_PATH
-------------------------

:ref:`Semicolon-separated list <CMake Language Lists>` of directories specifying a search path
for the :command:`find_library` command.  By default this contains the
standard directories for the current system.  It is *not* intended to be
modified by the project; use :variable:`CMAKE_LIBRARY_PATH` for this.
See also :variable:`CMAKE_SYSTEM_PREFIX_PATH`.


code:
CMAKE_SYSTEM_NAME
-----------------

The name of the operating system for which CMake is to build.
See the :variable:`CMAKE_SYSTEM_VERSION` variable for the OS version.

Note that ``CMAKE_SYSTEM_NAME`` is not set to anything by default when running
in script mode, since it's not building anything.

System Name for Host Builds
^^^^^^^^^^^^^^^^^^^^^^^^^^^

``CMAKE_SYSTEM_NAME`` is by default set to the same value as the
:variable:`CMAKE_HOST_SYSTEM_NAME` variable so that the build
targets the host system.

System Name for Cross Compiling
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

``CMAKE_SYSTEM_NAME`` may be set explicitly when first configuring a new build
tree in order to enable :ref:`cross compiling <Cross Compiling Toolchain>`.
In this case the :variable:`CMAKE_SYSTEM_VERSION` variable must also be
set explicitly.

System Names Known to CMake
^^^^^^^^^^^^^^^^^^^^^^^^^^^

The following is a list of possible values, each associated with corresponding
operating systems or environments.

========================= ======================================================
Value                     Name
========================= ======================================================
``ADSP``                  Analog Devices Audio Digital Signal Processing
``AIX``                   IBM Unix operating system
``Android``               Android operating system
``ARTOS``                 Operating system for microcontrollers
``BeOS``                  Operating system for personal computers (discontinued)
``BlueGeneL``             Blue Gene/L static environment
``BlueGeneP-dynamic``     Blue Gene/P dynamic environment
``BlueGeneP-static``      Blue Gene/P static environment
``BlueGeneQ-dynamic``     Blue Gene/Q dynamic environment
``BlueGeneQ-static``      Blue Gene/Q static environment
``BSDOS``                 BSD operating system (discontinued)
``Catamount``             Operating system for Cray XT series
``CrayLinuxEnvironment``  Cray Linux Environment
``CYGWIN``                Cygwin environment for Windows
``Darwin``                Apple stationary operating systems (macOS, OS X, etc.)
``DOS``                   MS-DOS or compatible
``DragonFly``             BSD-derived operating system
``eCos``                  Real-time embedded operating system
``Emscripten``            Compiler toolchain to WebAssembly
``Euros``                 Real-time operating system for embedded devices
``FreeBSD``               FreeBSD operating system
``Fuchsia``               Operating system by Google based on the Zircon kernel
``Generic-ADSP``          Generic ADSP (Audio DSP) environment
``Generic-ELF``           Generic ELF (Executable and Linkable Format) environment
``Generic``               Some platforms, e.g. bare metal embedded devices
``GHS-MULTI``             Green Hills Software MULTI environment
``GNU``                   GNU/Hurd-based operating system
``Haiku``                 Unix operating system inspired by BeOS
``HP-UX``                 Hewlett Packard Unix
``iOS``                   Apple mobile phone operating system
``kFreeBSD``              FreeBSD kernel with a GNU userland
``Linux``                 All Linux-based distributions
``Midipix``               POSIX-compatible layer for Windows
``MirBSD``                MirOS BSD operating system
``MP-RAS``                MP-RAS UNIX operating system
``MSYS``                  MSYS environment (MSYSTEM=MSYS)
``NetBSD``                NetBSD operating systems
``OpenBSD``               OpenBSD operating systems
``OpenVMS``               OpenVMS operating system by HP
``OS2``                   OS/2 operating system
``OSF1``                  Compaq Tru64 UNIX (formerly DEC OSF/1, Digital Unix) (discontinued)
``QNX``                   Unix-like operating system by BlackBerry
``RISCos``                RISC OS operating system
``SCO_SV``                SCO OpenServer 5
``SerenityOS``            Unix-like operating system
``SINIX``                 SINIX operating system
``SunOS``                 Oracle Solaris and all illumos operating systems
``syllable``              Syllable operating system
``Tru64``                 Compaq Tru64 UNIX (formerly DEC OSF/1) operating system
``tvOS``                  Apple TV operating system
``ULTRIX``                Unix operating system (discontinued)
``UNIX_SV``               SCO UnixWare (pre release 7)
``UnixWare``              SCO UnixWare 7
``visionOS``              Apple mixed reality operating system
``watchOS``               Apple watch operating system
``Windows``               Windows stationary operating systems
``WindowsCE``             Windows Embedded Compact
``WindowsPhone``          Windows mobile phone operating system
``WindowsStore``          Universal Windows Platform applications
``Xenix``                 SCO Xenix Unix operating system (discontinued)
========================= ======================================================

Platform-specific notes:

* MSYS2's ``msys/cmake`` package (``/usr/bin/cmake``) works only under
  ``MSYSTEM=MSYS`` environments, with system name ``MSYS``.  Under other
  environments like ``MSYSTEM=MINGW64``, use another package such
  as ``mingw64/mingw-w64-x86_64-cmake`` (``/mingw64/bin/cmake``),
  which targets ``MSYSTEM=MINGW64`` with system name ``Windows``.

* Cygwin's ``cmake`` package (``/usr/bin/cmake``) uses system name ``CYGWIN``.
  A non-cygwin CMake on Windows (e.g. ``$PROGRAMFILES/CMake/bin/cmake``)
  uses system name ``Windows`` even when it runs under a Cygwin environment.


code:
CMAKE_SYSTEM_PREFIX_PATH
------------------------

:ref:`Semicolon-separated list <CMake Language Lists>` of directories specifying installation
*prefixes* to be searched by the :command:`find_package`,
:command:`find_program`, :command:`find_library`, :command:`find_file`, and
:command:`find_path` commands.  Each command will add appropriate
subdirectories (like ``bin``, ``lib``, or ``include``) as specified in its own
documentation.

By default this contains the system directories for the current system, the
:variable:`CMAKE_INSTALL_PREFIX`, and the :variable:`CMAKE_STAGING_PREFIX`.
The installation and staging prefixes may be excluded by setting
the :variable:`CMAKE_FIND_NO_INSTALL_PREFIX` variable before the
first :command:`project` invocation.

The system directories that are contained in ``CMAKE_SYSTEM_PREFIX_PATH`` are
locations that typically include installed software. An example being
``/usr/local`` for UNIX based platforms. In addition to standard platform
locations, CMake will also add values to ``CMAKE_SYSTEM_PREFIX_PATH`` based on
environment variables. The environment variables and search locations that
CMake uses may evolve over time, as platforms and their conventions also
evolve. The following provides an indicative list of environment variables
and locations that CMake searches, but they are subject to change:

CrayLinuxEnvironment:
  * ``ENV{SYSROOT_DIR}/``
  * ``ENV{SYSROOT_DIR}/usr``
  * ``ENV{SYSROOT_DIR}/usr/local``

Darwin:
  * ``ENV{SDKROOT}/usr`` When ``CMAKE_OSX_SYSROOT`` is not explicitly specified.

OpenBSD:
  * ``ENV{LOCALBASE}``

Unix:
  * ``ENV{CONDA_PREFIX}`` when using a conda compiler

MSYSTEM environment with MinGW toolchain:
  .. versionadded:: 3.28

  * ``ENV{MSYSTEM_PREFIX}/local``
  * ``ENV{MSYSTEM_PREFIX}``

Windows:
  * ``ENV{ProgramW6432}``
  * ``ENV{ProgramFiles}``
  * ``ENV{ProgramFiles(x86)}``
  * ``ENV{SystemDrive}/Program Files``
  * ``ENV{SystemDrive}/Program Files (x86)``

``CMAKE_SYSTEM_PREFIX_PATH`` is *not* intended to be modified by the project;
use :variable:`CMAKE_PREFIX_PATH` for this.

See also :variable:`CMAKE_SYSTEM_INCLUDE_PATH`,
:variable:`CMAKE_SYSTEM_LIBRARY_PATH`, :variable:`CMAKE_SYSTEM_PROGRAM_PATH`,
and :variable:`CMAKE_SYSTEM_IGNORE_PATH`.


code:
CMAKE_SYSTEM_PROCESSOR
----------------------

When not cross-compiling, this variable has the same value as the
:variable:`CMAKE_HOST_SYSTEM_PROCESSOR` variable.  In many cases,
this will correspond to the target architecture for the build, but
this is not guaranteed.  (E.g. on Windows, the host may be ``AMD64``
even when using a MSVC ``cl`` compiler with a 32-bit target.)

When cross-compiling, a :variable:`CMAKE_TOOLCHAIN_FILE` should set
the ``CMAKE_SYSTEM_PROCESSOR`` variable to match target architecture
that it specifies (via :variable:`CMAKE_<LANG>_COMPILER` and perhaps
:variable:`CMAKE_<LANG>_COMPILER_TARGET`).


code:
CMAKE_SYSTEM_PROGRAM_PATH
-------------------------

:ref:`Semicolon-separated list <CMake Language Lists>` of directories specifying a search path
for the :command:`find_program` command.  By default this contains the
standard directories for the current system.  It is *not* intended to be
modified by the project; use :variable:`CMAKE_PROGRAM_PATH` for this.
See also :variable:`CMAKE_SYSTEM_PREFIX_PATH`.


code:
CMAKE_SYSTEM_VERSION
--------------------

The version of the operating system for which CMake is to build.
See the :variable:`CMAKE_SYSTEM_NAME` variable for the OS name.

System Version for Host Builds
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

When the :variable:`CMAKE_SYSTEM_NAME` variable takes its default value
then ``CMAKE_SYSTEM_VERSION`` is by default set to the same value as the
:variable:`CMAKE_HOST_SYSTEM_VERSION` variable so that the build targets
the host system version.

In the case of a host build then ``CMAKE_SYSTEM_VERSION`` may be set
explicitly when first configuring a new build tree in order to enable
targeting the build for a different version of the host operating system
than is actually running on the host.  This is allowed and not considered
cross compiling so long as the binaries built for the specified OS version
can still run on the host.

System Version for Cross Compiling
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

When the :variable:`CMAKE_SYSTEM_NAME` variable is set explicitly to
enable :ref:`cross compiling <Cross Compiling Toolchain>` then the
value of ``CMAKE_SYSTEM_VERSION`` must also be set explicitly to specify
the target system version.


code:
CMAKE_Swift_COMPILATION_MODE
----------------------------

.. versionadded:: 3.29

Specify how Swift compiles a target. This variable is used to initialize the
:prop_tgt:`Swift_COMPILATION_MODE` property on targets as they are created.

The allowed values are:

.. include:: ../prop_tgt/Swift_COMPILATION_MODE-VALUES.txt

Use :manual:`generator expressions <cmake-generator-expressions(7)>` to support
per-configuration specification. For example, the code:

.. code-block:: cmake

   set(CMAKE_Swift_COMPILATION_MODE
     "$<IF:$<CONFIG:Release>,wholemodule,incremental>")

sets the default Swift compilation mode to wholemodule mode when building a
release configuration and to incremental mode in other configurations.

If this variable is not set then the :prop_tgt:`Swift_COMPILATION_MODE` target
property will not be set automatically. If that property is unset then CMake
uses the default value ``incremental`` to build the Swift source files.

.. note::

   This property only has effect when policy :policy:`CMP0157` is set to ``NEW``
   prior to the first :command:`project` or :command:`enable_language` command
   that enables the Swift language.


code:
CMAKE_Swift_LANGUAGE_VERSION
----------------------------

.. versionadded:: 3.7

Set to the Swift language version number.  If not set, the oldest legacy
version known to be available in the host Xcode version is assumed:

* Swift ``4.0`` for Xcode 10.2 and above.
* Swift ``3.0`` for Xcode 8.3 and above.
* Swift ``2.3`` for Xcode 8.2 and below.


code:
CMAKE_Swift_MODULE_DIRECTORY
----------------------------

.. versionadded:: 3.15

Swift module output directory.

This variable is used to initialize the :prop_tgt:`Swift_MODULE_DIRECTORY`
property on all the targets.  See the target property for additional
information.


code:
CMAKE_Swift_NUM_THREADS
-----------------------

.. versionadded:: 3.15.1

Number of threads for parallel compilation for Swift targets.

This variable controls the number of parallel jobs that the swift driver creates
for building targets.  If not specified, it will default to the number of
logical CPUs on the host.


code:
CMAKE_TASKING_TOOLSET
---------------------

.. versionadded:: 3.25

Select the Tasking toolset which provides the compiler

Architecture compilers are provided by different toolchains with
incompatible versioning schemes.  Set this variable in a
:variable:`toolchain file <CMAKE_TOOLCHAIN_FILE>` so CMake can detect
the compiler features correctly. If no toolset is specified,
``Standalone`` is assumed.

Due to the different versioning schemes, the compiler version
(:variable:`CMAKE_<LANG>_COMPILER_VERSION`) depends on the toolset and
architecture in use. If projects can be built with multiple toolsets or
architectures, the specified ``CMAKE_TASKING_TOOLSET`` and the
automatically determined :variable:`CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID`
must be taken into account when comparing against the
:variable:`CMAKE_<LANG>_COMPILER_VERSION`.

``TriCore``
  Compilers are provided by the TriCore toolset.

``SmartCode``
  Compilers are provided by the SmartCode toolset.

``Standalone``
  Compilers are provided by the standalone toolsets.

  .. note::

    For the TriCore architecture, the compiler from the TriCore toolset is
    selected as standalone compiler.


code:
CMAKE_TEST_LAUNCHER
-------------------

.. versionadded:: 3.29

This variable is used to initialize the :prop_tgt:`TEST_LAUNCHER` target
property of executable targets as they are created.  It is used to specify
a launcher for running tests, added by the :command:`add_test` command,
that run an executable target.

If this variable contains a :ref:`semicolon-separated list <CMake Language
Lists>`, then the first value is the command and remaining values are its
arguments.

This variable can be initialized via an
:envvar:`CMAKE_TEST_LAUNCHER` environment variable.


code:
CMAKE_TLS_CAINFO
----------------

Specify the default value for the :command:`file(DOWNLOAD)` and
:command:`file(UPLOAD)` commands' ``TLS_CAINFO`` options.
It is unset by default.

This variable is also used by the :module:`ExternalProject` and
:module:`FetchContent` modules for internal calls to :command:`file(DOWNLOAD)`.


code:
CMAKE_TLS_VERIFY
----------------

Specify the default value for the :command:`file(DOWNLOAD)` and
:command:`file(UPLOAD)` commands' ``TLS_VERIFY`` options.
If not set, the default is *off*.

This variable is also used by the :module:`ExternalProject` and
:module:`FetchContent` modules for internal calls to :command:`file(DOWNLOAD)`.

TLS verification can help provide confidence that one is connecting
to the desired server.  When downloading known content, one should
also use file hashes to verify it.

.. code-block:: cmake

  set(CMAKE_TLS_VERIFY TRUE)


code:
CMAKE_TOOLCHAIN_FILE
--------------------

Path to toolchain file supplied to :manual:`cmake(1)`.

This variable is specified on the command line when cross-compiling with CMake.
It is the path to a file which is read early in the CMake run and which
specifies locations for compilers and toolchain utilities, and other target
platform and compiler related information.

Relative paths are allowed and are interpreted first as relative to the
build directory, and if not found, relative to the source directory.

This is initialized by the :envvar:`CMAKE_TOOLCHAIN_FILE` environment
variable if it is set when a new build tree is first created.

See the :variable:`CMAKE_PROJECT_TOP_LEVEL_INCLUDES` variable for setting
other things not directly related to the toolchain.


code:
CMAKE_TRY_COMPILE_CONFIGURATION
-------------------------------

Build configuration used for :command:`try_compile` and :command:`try_run`
projects.

Projects built by :command:`try_compile` and :command:`try_run` are built
synchronously during the CMake configuration step.  Therefore a specific build
configuration must be chosen even if the generated build system
supports multiple configurations.


code:
CMAKE_TRY_COMPILE_NO_PLATFORM_VARIABLES
---------------------------------------

.. versionadded:: 3.24

Set to a true value to tell the :command:`try_compile` command not
to propagate any platform variables into the test project.

The :command:`try_compile` command normally passes some CMake variables
that configure the platform and toolchain behavior into test projects.
See policy :policy:`CMP0137`.  This variable may be set to disable
that behavior.