code:
.\" Man page generated from reStructuredText.
.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "CMAKE-VARIABLES" "7" "Mar 04, 2024" "3.29.0" "CMake"
.SH NAME
cmake-variables \- CMake Variables Reference
.sp
This page documents variables that are provided by CMake
or have meaning to CMake when set by project code.
.sp
For general information on variables, see the
\fI\%Variables\fP
section in the cmake\-language manual.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
CMake reserves identifiers that:
.INDENT 0.0
.IP \(bu 2
begin with \fBCMAKE_\fP (upper\-, lower\-, or mixed\-case), or
.IP \(bu 2
begin with \fB_CMAKE_\fP (upper\-, lower\-, or mixed\-case), or
.IP \(bu 2
begin with \fB_\fP followed by the name of any \fI\%CMake Command\fP\&.
.UNINDENT
.UNINDENT
.UNINDENT
.SH VARIABLES THAT PROVIDE INFORMATION
.SS CMAKE_AR
.sp
Name of archiving tool for static libraries.
.sp
This specifies the name of the program that creates archive or static
libraries.
.SS CMAKE_ARGC
.sp
Number of command line arguments passed to CMake in script mode.
.sp
When run in \fI\%\-P\fP script mode, CMake sets this
variable to the number of command line arguments.  See also
\fI\%CMAKE_ARGV0\fP, \fB1\fP, \fB2\fP ...
.SS CMAKE_ARGV0
.sp
Command line argument passed to CMake in script mode.
.sp
When run in \fI\%\-P\fP script mode, CMake sets this
variable to the first command line argument.  It then also sets \fBCMAKE_ARGV1\fP,
\fBCMAKE_ARGV2\fP, ... and so on, up to the number of command line arguments
given.  See also \fI\%CMAKE_ARGC\fP\&.
.SS CMAKE_BINARY_DIR
.sp
The path to the top level of the build tree.
.sp
This is the full path to the top level of the current CMake build
tree.  For an in\-source build, this would be the same as
\fI\%CMAKE_SOURCE_DIR\fP\&.
.sp
When run in \fI\%cmake \-P\fP script mode, CMake sets the variables
\fBCMAKE_BINARY_DIR\fP, \fI\%CMAKE_SOURCE_DIR\fP,
\fI\%CMAKE_CURRENT_BINARY_DIR\fP and
\fI\%CMAKE_CURRENT_SOURCE_DIR\fP to the current working directory.
.SS CMAKE_BUILD_TOOL
.sp
This variable exists only for backwards compatibility.
It contains the same value as \fI\%CMAKE_MAKE_PROGRAM\fP\&.
Use that variable instead.
.SS CMAKE_CACHE_MAJOR_VERSION
.sp
Major version of CMake used to create the \fBCMakeCache.txt\fP file
.sp
This stores the major version of CMake used to write a CMake cache
file.  It is only different when a different version of CMake is run
on a previously created cache file.
.SS CMAKE_CACHE_MINOR_VERSION
.sp
Minor version of CMake used to create the \fBCMakeCache.txt\fP file
.sp
This stores the minor version of CMake used to write a CMake cache
file.  It is only different when a different version of CMake is run
on a previously created cache file.
.SS CMAKE_CACHE_PATCH_VERSION
.sp
Patch version of CMake used to create the \fBCMakeCache.txt\fP file
.sp
This stores the patch version of CMake used to write a CMake cache
file.  It is only different when a different version of CMake is run
on a previously created cache file.
.SS CMAKE_CACHEFILE_DIR
.sp
This variable is used internally by CMake, and may not be set during
the first configuration of a build tree.  When it is set, it has the
same value as \fI\%CMAKE_BINARY_DIR\fP\&.  Use that variable instead.
.SS CMAKE_CFG_INTDIR
.sp
Deprecated since version 3.21: This variable has poor support on \fI\%Ninja Multi\-Config\fP, and
predates the existence of the \fI\%$<CONFIG>\fP generator expression. Use
\fB$<CONFIG>\fP instead.

.sp
Build\-time reference to per\-configuration output subdirectory.
.sp
For native build systems supporting multiple configurations in the
build tree (such as \fI\%Visual Studio Generators\fP and \fI\%Xcode\fP),
the value is a reference to a build\-time variable specifying the name
of the per\-configuration output subdirectory.  On \fI\%Makefile Generators\fP
this evaluates to \fI\&.\fP because there is only one configuration in a build tree.
Example values:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
$(ConfigurationName) = Visual Studio 9
$(Configuration)     = Visual Studio 12 and above
$(CONFIGURATION)     = Xcode
\&.                    = Make\-based tools
\&.                    = Ninja
${CONFIGURATION}     = Ninja Multi\-Config
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Since these values are evaluated by the native build system, this
variable is suitable only for use in command lines that will be
evaluated at build time.  Example of intended usage:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
add_executable(mytool mytool.c)
add_custom_command(
  OUTPUT out.txt
  COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/mytool
          ${CMAKE_CURRENT_SOURCE_DIR}/in.txt out.txt
  DEPENDS mytool in.txt
  )
add_custom_target(drive ALL DEPENDS out.txt)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Note that \fBCMAKE_CFG_INTDIR\fP is no longer necessary for this purpose but
has been left for compatibility with existing projects.  Instead
\fI\%add_custom_command()\fP recognizes executable target names in its
\fBCOMMAND\fP option, so
\fB${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/mytool\fP can be replaced
by just \fBmytool\fP\&.
.sp
This variable is read\-only.  Setting it is undefined behavior.  In
multi\-configuration build systems the value of this variable is passed
as the value of preprocessor symbol \fBCMAKE_INTDIR\fP to the compilation
of all source files.
.SS CMAKE_COMMAND
.sp
The full path to the \fI\%cmake(1)\fP executable.
.sp
This is the full path to the CMake executable \fI\%cmake(1)\fP which is
useful from custom commands that want to use the \fI\%cmake \-E\fP option for
portable system commands.  (e.g.  \fB/usr/local/bin/cmake\fP)
.SS CMAKE_CPACK_COMMAND
.sp
New in version 3.13.

.sp
Full path to \fI\%cpack(1)\fP command installed with CMake.
.sp
This is the full path to the CPack executable \fI\%cpack(1)\fP
that can be used for custom commands or tests to invoke
CPack commands.
.SS CMAKE_CROSSCOMPILING
.sp
This variable is set by CMake to indicate whether it is cross compiling,
but note limitations discussed below.
.sp
This variable will be set to true by CMake if the \fI\%CMAKE_SYSTEM_NAME\fP
variable has been set manually (i.e. in a toolchain file or as a cache entry
from the \fI\%cmake\fP command line). In most cases, manually
setting \fI\%CMAKE_SYSTEM_NAME\fP will only be done when cross compiling
since, if not manually set, it will be given the same value as
\fI\%CMAKE_HOST_SYSTEM_NAME\fP, which is correct for
the non\-cross\-compiling case. In the event that \fI\%CMAKE_SYSTEM_NAME\fP
is manually set to the same value as \fI\%CMAKE_HOST_SYSTEM_NAME\fP, then
\fBCMAKE_CROSSCOMPILING\fP will still be set to true.
.sp
Another case to be aware of is that builds targeting Apple platforms other than
macOS are handled differently to other cross compiling scenarios. Rather than
relying on \fI\%CMAKE_SYSTEM_NAME\fP to select the target platform, Apple
device builds use \fI\%CMAKE_OSX_SYSROOT\fP to select the appropriate SDK,
which indirectly determines the target platform. Furthermore, when using the
\fI\%Xcode\fP generator, developers can switch between device and
simulator builds at build time rather than having a single
choice at configure time, so the concept
of whether the build is cross compiling or not is more complex. Therefore, the
use of \fBCMAKE_CROSSCOMPILING\fP is not recommended for projects targeting Apple
devices.
.SS CMAKE_CROSSCOMPILING_EMULATOR
.sp
New in version 3.3.

.sp
This variable is only used when \fI\%CMAKE_CROSSCOMPILING\fP is on. It
should point to a command on the host system that can run executable built
for the target system.
.sp
New in version 3.15: If this variable contains a \fI\%semicolon\-separated list\fP, then the first value is the command and remaining values are its
arguments.

.sp
New in version 3.28: This variable can be initialized via an
\fI\%CMAKE_CROSSCOMPILING_EMULATOR\fP environment variable.

.sp
The command will be used to run \fI\%try_run()\fP generated executables,
which avoids manual population of the \fBTryRunResults.cmake\fP file.
.sp
This variable is also used as the default value for the
\fI\%CROSSCOMPILING_EMULATOR\fP target property of executables.  However,
while \fI\%generator expressions\fP are
supported by the target property (since CMake 3.29), they are \fInot\fP supported
by this variable\(aqs \fI\%try_run()\fP functionality.
.SS CMAKE_CTEST_COMMAND
.sp
Full path to \fI\%ctest(1)\fP command installed with CMake.
.sp
This is the full path to the CTest executable \fI\%ctest(1)\fP
that can be used for custom commands or tests to invoke
CTest commands.
.SS CMAKE_CURRENT_BINARY_DIR
.sp
The path to the binary directory currently being processed.
.sp
This is the full path to the build directory that is currently being
processed by cmake.  Each directory added by \fI\%add_subdirectory()\fP will
create a binary directory in the build tree, and as it is being
processed this variable will be set.  For in\-source builds this is the
current source directory being processed.
.sp
When run in \fI\%cmake \-P\fP script mode, CMake sets the variables
\fI\%CMAKE_BINARY_DIR\fP, \fI\%CMAKE_SOURCE_DIR\fP,
\fBCMAKE_CURRENT_BINARY_DIR\fP and
\fI\%CMAKE_CURRENT_SOURCE_DIR\fP to the current working directory.
.SS CMAKE_CURRENT_FUNCTION
.sp
New in version 3.17.

.sp
When executing code inside a \fI\%function()\fP, this variable
contains the name of the current function.  It can be useful for
diagnostic or debug messages.
.sp
See also \fI\%CMAKE_CURRENT_FUNCTION_LIST_DIR\fP,
\fI\%CMAKE_CURRENT_FUNCTION_LIST_FILE\fP and
\fI\%CMAKE_CURRENT_FUNCTION_LIST_LINE\fP\&.
.SS CMAKE_CURRENT_FUNCTION_LIST_DIR
.sp
New in version 3.17.

.sp
When executing code inside a \fI\%function()\fP, this variable
contains the full directory of the listfile that defined the current function.
.sp
It is quite common practice in CMake for modules to use some additional files,
such as templates to be copied in after substituting CMake variables.
In such cases, a function needs to know where to locate those files in a way
that doesn\(aqt depend on where the function is called.  Without
\fBCMAKE_CURRENT_FUNCTION_LIST_DIR\fP, the code to do that would typically use
the following pattern:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
set(_THIS_MODULE_BASE_DIR \(dq${CMAKE_CURRENT_LIST_DIR}\(dq)

function(foo)
  configure_file(
    \(dq${_THIS_MODULE_BASE_DIR}/some.template.in\(dq
    some.output
  )
endfunction()
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Using \fBCMAKE_CURRENT_FUNCTION_LIST_DIR\fP inside the function instead
eliminates the need for the extra variable which would otherwise be visible
outside the function\(aqs scope.
The above example can be written in the more concise and more robust form:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
function(foo)
  configure_file(
    \(dq${CMAKE_CURRENT_FUNCTION_LIST_DIR}/some.template.in\(dq
    some.output
  )
endfunction()
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
See also \fI\%CMAKE_CURRENT_FUNCTION\fP,
\fI\%CMAKE_CURRENT_FUNCTION_LIST_FILE\fP and
\fI\%CMAKE_CURRENT_FUNCTION_LIST_LINE\fP\&.
.SS CMAKE_CURRENT_FUNCTION_LIST_FILE
.sp
New in version 3.17.

.sp
When executing code inside a \fI\%function()\fP, this variable
contains the full path to the listfile that defined the current function.
.sp
See also \fI\%CMAKE_CURRENT_FUNCTION\fP,
\fI\%CMAKE_CURRENT_FUNCTION_LIST_DIR\fP and
\fI\%CMAKE_CURRENT_FUNCTION_LIST_LINE\fP\&.
.SS CMAKE_CURRENT_FUNCTION_LIST_LINE
.sp
New in version 3.17.

.sp
When executing code inside a \fI\%function()\fP, this variable
contains the line number in the listfile where the current function
was defined.
.sp
See also \fI\%CMAKE_CURRENT_FUNCTION\fP,
\fI\%CMAKE_CURRENT_FUNCTION_LIST_DIR\fP and
\fI\%CMAKE_CURRENT_FUNCTION_LIST_FILE\fP\&.
.SS CMAKE_CURRENT_LIST_DIR
.sp
Full directory of the listfile currently being processed.
.sp
As CMake processes the listfiles in your project this variable will
always be set to the directory where the listfile which is currently
being processed (\fI\%CMAKE_CURRENT_LIST_FILE\fP) is located.  The value
has dynamic scope.  When CMake starts processing commands in a source file
it sets this variable to the directory where this file is located.
When CMake finishes processing commands from the file it restores the
previous value.  Therefore the value of the variable inside a macro or
function is the directory of the file invoking the bottom\-most entry
on the call stack, not the directory of the file containing the macro
or function definition.
.sp
See also \fI\%CMAKE_CURRENT_LIST_FILE\fP\&.
.SS CMAKE_CURRENT_LIST_FILE
.sp
Full path to the listfile currently being processed.
.sp
As CMake processes the listfiles in your project this variable will
always be set to the one currently being processed.  The value has
dynamic scope.  When CMake starts processing commands in a source file
it sets this variable to the location of the file.  When CMake
finishes processing commands from the file it restores the previous
value.  Therefore the value of the variable inside a macro or function
is the file invoking the bottom\-most entry on the call stack, not the
file containing the macro or function definition.
.sp
See also \fI\%CMAKE_PARENT_LIST_FILE\fP\&.
.SS CMAKE_CURRENT_LIST_LINE
.sp
The line number of the current file being processed.
.sp
This is the line number of the file currently being processed by
cmake.
.sp
If CMake is currently processing deferred calls scheduled by
the \fI\%cmake_language(DEFER)\fP command, this variable
evaluates to \fBDEFERRED\fP instead of a specific line number.
.SS CMAKE_CURRENT_SOURCE_DIR
.sp
The path to the source directory currently being processed.
.sp
This is the full path to the source directory that is currently being
processed by cmake.
.sp
When run in \fI\%cmake \-P\fP script mode, CMake sets the variables
\fI\%CMAKE_BINARY_DIR\fP, \fI\%CMAKE_SOURCE_DIR\fP,
\fI\%CMAKE_CURRENT_BINARY_DIR\fP and
\fBCMAKE_CURRENT_SOURCE_DIR\fP to the current working directory.
.SS CMAKE_DEBUG_TARGET_PROPERTIES
.sp
Enables tracing output for target properties.
.sp
This variable can be populated with a list of properties to generate
debug output for when evaluating target properties.  Currently it can
only be used when evaluating:
.INDENT 0.0
.IP \(bu 2
\fI\%AUTOUIC_OPTIONS\fP
.IP \(bu 2
\fI\%COMPILE_DEFINITIONS\fP
.IP \(bu 2
\fI\%COMPILE_FEATURES\fP
.IP \(bu 2
\fI\%COMPILE_OPTIONS\fP
.IP \(bu 2
\fI\%INCLUDE_DIRECTORIES\fP
.IP \(bu 2
\fI\%LINK_DIRECTORIES\fP
.IP \(bu 2
\fI\%LINK_OPTIONS\fP
.IP \(bu 2
\fI\%POSITION_INDEPENDENT_CODE\fP
.IP \(bu 2
\fI\%SOURCES\fP
.UNINDENT
.sp
target properties and any other property listed in
\fI\%COMPATIBLE_INTERFACE_STRING\fP and other
\fBCOMPATIBLE_INTERFACE_\fP properties.  It outputs an origin for each entry
in the target property.  Default is unset.
.SS CMAKE_DIRECTORY_LABELS
.sp
New in version 3.10.

.sp
Specify labels for the current directory.
.sp
This is used to initialize the \fI\%LABELS\fP directory property.
.SS CMAKE_DL_LIBS
.sp
Name of library containing \fBdlopen\fP and \fBdlclose\fP\&.
.sp
The name of the library that has \fBdlopen\fP and \fBdlclose\fP in it, usually
\fB\-ldl\fP on most UNIX machines.
.SS CMAKE_DOTNET_SDK
.sp
New in version 3.23.

.sp
Default value for \fI\%DOTNET_SDK\fP property of targets.
.sp
This variable is used to initialize the \fI\%DOTNET_SDK\fP
property on all targets. See that target property for additional information.
.SS CMAKE_DOTNET_TARGET_FRAMEWORK
.sp
New in version 3.17.

.sp
Default value for \fI\%DOTNET_TARGET_FRAMEWORK\fP property  of
targets.
.sp
This variable is used to initialize the
\fI\%DOTNET_TARGET_FRAMEWORK\fP property on all targets. See that
target property for additional information.
.sp
Setting \fBCMAKE_DOTNET_TARGET_FRAMEWORK\fP may be necessary
when working with \fBC#\fP and newer .NET framework versions to
avoid referencing errors with the \fBALL_BUILD\fP CMake target.
.sp
This variable is only evaluated for \fI\%Visual Studio Generators\fP
VS 2010 and above.
.SS CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION
.sp
New in version 3.12.

.sp
Default value for \fI\%DOTNET_TARGET_FRAMEWORK_VERSION\fP
property of targets.
.sp
This variable is used to initialize the
\fI\%DOTNET_TARGET_FRAMEWORK_VERSION\fP property on all
targets. See that target property for additional information. When set,
\fI\%CMAKE_DOTNET_TARGET_FRAMEWORK\fP takes precednece over this
variable. See that variable or the associated target property
\fI\%DOTNET_TARGET_FRAMEWORK\fP for additional information.
.sp
Setting \fBCMAKE_DOTNET_TARGET_FRAMEWORK_VERSION\fP may be necessary
when working with \fBC#\fP and newer .NET framework versions to
avoid referencing errors with the \fBALL_BUILD\fP CMake target.
.sp
This variable is only evaluated for \fI\%Visual Studio Generators\fP
VS 2010 and above.
.SS CMAKE_EDIT_COMMAND
.sp
Full path to \fI\%cmake\-gui(1)\fP or \fI\%ccmake(1)\fP\&.  Defined only for
\fI\%Makefile Generators\fP and \fI\%Ninja Generators\fP when not using any
\fI\%Extra Generators\fP\&.
.sp
This is the full path to the CMake executable that can graphically
edit the cache.  For example, \fI\%cmake\-gui(1)\fP or \fI\%ccmake(1)\fP\&.
.SS CMAKE_EXECUTABLE_SUFFIX
.sp
The suffix for executables on this platform.
.sp
The suffix to use for the end of an executable filename if any, \fB\&.exe\fP
on Windows.
.sp
\fI\%CMAKE_EXECUTABLE_SUFFIX_<LANG>\fP overrides this for
language \fB<LANG>\fP\&.
.SS CMAKE_EXECUTABLE_SUFFIX_<LANG>
.sp
The suffix to use for the end of an executable filename of \fB<LANG>\fP
compiler target architecture, if any.
.sp
It overrides \fI\%CMAKE_EXECUTABLE_SUFFIX\fP for language \fB<LANG>\fP\&.
.SS CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES
.sp
Additional suffixes for shared libraries.
.sp
Extensions for shared libraries other than that specified by
\fI\%CMAKE_SHARED_LIBRARY_SUFFIX\fP, if any.  CMake uses this to recognize
external shared library files during analysis of libraries linked by a
target.
.SS CMAKE_FIND_DEBUG_MODE
.sp
New in version 3.17.

.sp
Print extra find call information for the following commands to standard
error:
.INDENT 0.0
.IP \(bu 2
\fI\%find_program()\fP
.IP \(bu 2
\fI\%find_library()\fP
.IP \(bu 2
\fI\%find_file()\fP
.IP \(bu 2
\fI\%find_path()\fP
.IP \(bu 2
\fI\%find_package()\fP
.UNINDENT
.sp
Output is designed for human consumption and not for parsing.
Enabling this variable is equivalent to using \fI\%cmake \-\-debug\-find\fP
with the added ability to enable debugging for a subset of find calls.
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
set(CMAKE_FIND_DEBUG_MODE TRUE)
find_program(...)
set(CMAKE_FIND_DEBUG_MODE FALSE)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Default is unset.
.SS CMAKE_FIND_PACKAGE_NAME
.sp
New in version 3.1.1.

.sp
Defined by the \fI\%find_package()\fP command while loading
a find module to record the caller\-specified package name.
See command documentation for details.
.SS CMAKE_FIND_PACKAGE_REDIRECTS_DIR
.sp
New in version 3.24.

.sp
This read\-only variable specifies a directory that the \fI\%find_package()\fP
command will check first before searching anywhere else for a module or config
package file.  A config package file in this directory will always be found in
preference to any other Find module file or config package file.
.sp
The primary purpose of this variable is to facilitate integration between
\fI\%find_package()\fP and \fI\%FetchContent_MakeAvailable()\fP\&.  The latter
command may create files in the \fBCMAKE_FIND_PACKAGE_REDIRECTS_DIR\fP directory
when it populates a dependency.  This allows subsequent calls to
\fI\%find_package()\fP for the same dependency to reuse the populated
contents instead of trying to satisfy the dependency from somewhere external
to the build.  Projects may also want to write files into this directory in
some situations (see \fI\%Integrating With find_package()\fP
for examples).
.sp
The directory that \fBCMAKE_FIND_PACKAGE_REDIRECTS_DIR\fP points to will always
be erased and recreated empty at the start of every CMake run.  Any files
written into this directory during the CMake run will be lost the next time
CMake configures the project.
.sp
\fBCMAKE_FIND_PACKAGE_REDIRECTS_DIR\fP is only set in CMake project mode.
It is not set when CMake is run in script mode
(i.e. \fI\%cmake \-P\fP).
.SS CMAKE_FIND_PACKAGE_SORT_DIRECTION
.sp
New in version 3.7.

.sp
The sorting direction used by \fI\%CMAKE_FIND_PACKAGE_SORT_ORDER\fP\&.
It can assume one of the following values:
.INDENT 0.0
.TP
.B \fBDEC\fP
Default.  Ordering is done in descending mode.
The highest folder found will be tested first.
.TP
.B \fBASC\fP
Ordering is done in ascending mode.
The lowest folder found will be tested first.
.UNINDENT
.sp
If \fI\%CMAKE_FIND_PACKAGE_SORT_ORDER\fP is not set or is set to \fBNONE\fP
this variable has no effect.
.SS CMAKE_FIND_PACKAGE_SORT_ORDER
.sp
New in version 3.7.

.sp
The default order for sorting packages found using \fI\%find_package()\fP\&.
It can assume one of the following values:
.INDENT 0.0
.TP
.B \fBNONE\fP
Default.  No attempt is done to sort packages.
The first valid package found will be selected.
.TP
.B \fBNAME\fP
Sort packages lexicographically before selecting one.
.TP
.B \fBNATURAL\fP
Sort packages using natural order (see \fBstrverscmp(3)\fP manual),
i.e. such that contiguous digits are compared as whole numbers.
.UNINDENT
.sp
Natural sorting can be employed to return the highest version when multiple
versions of the same library are found by \fI\%find_package()\fP\&.  For
example suppose that the following libraries have been found:
.INDENT 0.0
.IP \(bu 2
libX\-1.1.0
.IP \(bu 2
libX\-1.2.9
.IP \(bu 2
libX\-1.2.10
.UNINDENT
.sp
By setting \fBNATURAL\fP order we can select the one with the highest
version number \fBlibX\-1.2.10\fP\&.
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
set(CMAKE_FIND_PACKAGE_SORT_ORDER NATURAL)
find_package(libX CONFIG)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
The sort direction can be controlled using the
\fI\%CMAKE_FIND_PACKAGE_SORT_DIRECTION\fP variable
(by default decrescent, e.g. lib\-B will be tested before lib\-A).
.SS CMAKE_GENERATOR
.sp
The generator used to build the project.  See \fI\%cmake\-generators(7)\fP\&.
.sp
The name of the generator that is being used to generate the build
files.  (e.g.  \fBUnix Makefiles\fP, \fBNinja\fP, etc.)
.sp
The value of this variable should never be modified by project code.
A generator may be selected via the \fI\%cmake \-G\fP option,
interactively in \fI\%cmake\-gui(1)\fP, or via the \fI\%CMAKE_GENERATOR\fP
environment variable.
.SS CMAKE_GENERATOR_INSTANCE
.sp
New in version 3.11.

.sp
Generator\-specific instance specification provided by user.
.sp
Some CMake generators support selection of an instance of the native build
system when multiple instances are available.  If the user specifies an
instance (e.g. by setting this cache entry or via the
\fI\%CMAKE_GENERATOR_INSTANCE\fP environment variable), or after a default
instance is chosen when a build tree is first configured, the value will be
available in this variable.
.sp
The value of this variable should never be modified by project code.
A toolchain file specified by the \fI\%CMAKE_TOOLCHAIN_FILE\fP
variable may initialize \fBCMAKE_GENERATOR_INSTANCE\fP as a cache entry.
Once a given build tree has been initialized with a particular value
for this variable, changing the value has undefined behavior.
.sp
Instance specification is supported only on specific generators.
.SS Visual Studio Instance Selection
.sp
\fI\%Visual Studio Generators\fP support instance specification for
Visual Studio 2017 and above.  The \fBCMAKE_GENERATOR_INSTANCE\fP variable
may be set as a cache entry selecting an instance of Visual Studio
via one of the following forms:
.INDENT 0.0
.IP \(bu 2
\fBlocation\fP
.IP \(bu 2
\fBlocation[,key=value]*\fP
.IP \(bu 2
\fBkey=value[,key=value]*\fP
.UNINDENT
.sp
The \fBlocation\fP specifies the absolute path to the top\-level directory
of the VS installation.
.sp
The \fBkey=value\fP pairs form a comma\-separated list of options to
specify details of the instance selection.
Supported pairs are:
.INDENT 0.0
.TP
.B \fBversion=<major>.<minor>.<date>.<build>\fP
New in version 3.23.

.sp
Specify the 4\-component VS Build Version, a.k.a. Build Number.
.sp
The components are:
.sp
\fB<major>.<minor>\fP
.INDENT 7.0
.INDENT 3.5
The VS major and minor version numbers.
These are the same as the release version numbers.
.UNINDENT
.UNINDENT
.sp
\fB<date>\fP
.INDENT 7.0
.INDENT 3.5
A build date in the format \fBMMMDD\fP, where \fBMMM\fP is a month index
since an epoch used by Microsoft, and \fBDD\fP is a day in that month.
.UNINDENT
.UNINDENT
.sp
\fB<build>\fP
.INDENT 7.0
.INDENT 3.5
A build index on the day represented by \fB<date>\fP\&.
.UNINDENT
.UNINDENT
.sp
The build number is reported by \fBvswhere\fP as \fBinstallationVersion\fP\&.
For example, VS 16.11.10 has build number \fB16.11.32126.315\fP\&.
.UNINDENT
.sp
New in version 3.23: A portable VS instance, which is not known to the Visual Studio Installer,
may be specified by providing both \fBlocation\fP and \fBversion=\fP\&.

.sp
If the value of \fBCMAKE_GENERATOR_INSTANCE\fP is not specified explicitly
by the user or a toolchain file, CMake queries the Visual Studio Installer
to locate VS instances, chooses one, and sets the variable as a cache entry
to hold the value persistently.  If an environment variable of the form
\fBVS##0COMNTOOLS\fP, where \fB##\fP the Visual Studio major version number,
is set and points to the \fBCommon7/Tools\fP directory within one of the
VS instances, that instance will be used.  Otherwise, if more than one
VS instance is installed we do not define which one is chosen by default.
.sp
The VS version build number of the selected VS instance is provided in
the \fI\%CMAKE_VS_VERSION_BUILD_NUMBER\fP variable.
.SS CMAKE_GENERATOR_PLATFORM
.sp
New in version 3.1.

.sp
Generator\-specific target platform specification provided by user.
.sp
Some CMake generators support a target platform name to be given
to the native build system to choose a compiler toolchain.
If the user specifies a platform name (e.g. via the \fI\%cmake \-A\fP
option or via the \fI\%CMAKE_GENERATOR_PLATFORM\fP environment variable)
the value will be available in this variable.
.sp
The value of this variable should never be modified by project code.
A toolchain file specified by the \fI\%CMAKE_TOOLCHAIN_FILE\fP
variable may initialize \fBCMAKE_GENERATOR_PLATFORM\fP\&.  Once a given
build tree has been initialized with a particular value for this
variable, changing the value has undefined behavior.
.sp
Platform specification is supported only on specific generators:
.INDENT 0.0
.IP \(bu 2
For \fI\%Visual Studio Generators\fP with VS 2005 and above this
specifies the target architecture.
.IP \(bu 2
For \fI\%Green Hills MULTI\fP this specifies the target architecture.
.UNINDENT
.sp
See native build system documentation for allowed platform names.
.SS Visual Studio Platform Selection
.sp
The \fI\%Visual Studio Generators\fP support platform specification
using one of these forms:
.INDENT 0.0
.IP \(bu 2
\fBplatform\fP
.IP \(bu 2
\fBplatform[,key=value]*\fP
.IP \(bu 2
\fBkey=value[,key=value]*\fP
.UNINDENT
.sp
The \fBplatform\fP specifies the target platform (VS target architecture),
such as \fBx64\fP, \fBARM64\fP, or \fBWin32\fP\&.  The selected platform
name is provided in the \fI\%CMAKE_VS_PLATFORM_NAME\fP variable.
.sp
The \fBkey=value\fP pairs form a comma\-separated list of options to
specify generator\-specific details of the platform selection.
Supported pairs are:
.INDENT 0.0
.TP
.B \fBversion=<version>\fP
New in version 3.27.

.sp
Specify the Windows SDK version to use.  This is supported by VS 2015 and
above when targeting Windows or Windows Store.  CMake will set the
\fI\%CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION\fP variable to the
selected SDK version.
.sp
The \fB<version>\fP may be one of:
.INDENT 7.0
.TP
.B \fB10.0\fP
Specify that any 10.0 SDK version may be used, and let Visual Studio
pick one.  This is supported by VS 2019 and above.
.TP
.B \fB10.0.<build>.<increment>\fP
Specify the exact 4\-component SDK version, e.g., \fB10.0.19041.0\fP\&.
The specified version of the SDK must be installed.  It may not exceed
the value of \fI\%CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM\fP,
if that variable is set.
.TP
.B \fB8.1\fP
Specify the 8.1 SDK version.  This is always supported by VS 2015.
On VS 2017 and above the 8.1 SDK must be installed.
.UNINDENT
.sp
If the \fBversion\fP field is not specified, CMake selects a version as
described in the \fI\%CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION\fP
variable documentation.
.UNINDENT
.SS CMAKE_GENERATOR_TOOLSET
.sp
Native build system toolset specification provided by user.
.sp
Some CMake generators support a toolset specification to tell the
native build system how to choose a compiler.  If the user specifies
a toolset (e.g. via the \fI\%cmake \-T\fP option or via
the \fI\%CMAKE_GENERATOR_TOOLSET\fP environment variable) the value
will be available in this variable.
.sp
The value of this variable should never be modified by project code.
A toolchain file specified by the \fI\%CMAKE_TOOLCHAIN_FILE\fP
variable may initialize \fBCMAKE_GENERATOR_TOOLSET\fP\&.  Once a given
build tree has been initialized with a particular value for this
variable, changing the value has undefined behavior.
.sp
Toolset specification is supported only on specific generators:
.INDENT 0.0
.IP \(bu 2
\fI\%Visual Studio Generators\fP for VS 2010 and above
.IP \(bu 2
The \fI\%Xcode\fP generator for Xcode 3.0 and above
.IP \(bu 2
The \fI\%Green Hills MULTI\fP generator
.UNINDENT
.sp
See native build system documentation for allowed toolset names.
.SS Visual Studio Toolset Selection
.sp
The \fI\%Visual Studio Generators\fP support toolset specification
using one of these forms:
.INDENT 0.0
.IP \(bu 2
\fBtoolset\fP
.IP \(bu 2
\fBtoolset[,key=value]*\fP
.IP \(bu 2
\fBkey=value[,key=value]*\fP
.UNINDENT
.sp
The \fBtoolset\fP specifies the toolset name.  The selected toolset name
is provided in the \fI\%CMAKE_VS_PLATFORM_TOOLSET\fP variable.
.sp
The \fBkey=value\fP pairs form a comma\-separated list of options to
specify generator\-specific details of the toolset selection.
Supported pairs are:
.INDENT 0.0
.TP
.B \fBcuda=<version>|<path>\fP
Specify the CUDA toolkit version to use or the path to a
standalone CUDA toolkit directory.  Supported by VS 2010
and above. The version can only be used with the CUDA
toolkit VS integration globally installed.
See the \fI\%CMAKE_VS_PLATFORM_TOOLSET_CUDA\fP and
\fI\%CMAKE_VS_PLATFORM_TOOLSET_CUDA_CUSTOM_DIR\fP variables.
.TP
.B \fBfortran=<compiler>\fP
New in version 3.29.

.sp
Specify the Fortran compiler to use, among those that integrate with VS.
The value may be one of:
.INDENT 7.0
.TP
.B \fBifort\fP
Intel classic Fortran compiler.
.TP
.B \fBifx\fP
Intel oneAPI Fortran compiler.
.UNINDENT
.sp
See the \fI\%CMAKE_VS_PLATFORM_TOOLSET_FORTRAN\fP variable.
.TP
.B \fBhost=<arch>\fP
Specify the host tools architecture as \fBx64\fP or \fBx86\fP\&.
Supported by VS 2013 and above.
See the \fI\%CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE\fP
variable.
.TP
.B \fBversion=<version>\fP
Specify the toolset version to use.  Supported by VS 2017
and above with the specified toolset installed.
See the \fI\%CMAKE_VS_PLATFORM_TOOLSET_VERSION\fP variable.
.TP
.B \fBVCTargetsPath=<path>\fP
Specify an alternative \fBVCTargetsPath\fP value for Visual Studio
project files.  This allows use of VS platform extension configuration
files (\fB\&.props\fP and \fB\&.targets\fP) that are not installed with VS.
.UNINDENT
.SS Visual Studio Toolset Customization
.sp
\fBThese are unstable interfaces with no compatibility guarantees\fP
because they hook into undocumented internal CMake implementation details.
Institutions may use these to internally maintain support for non\-public
Visual Studio platforms and toolsets, but must accept responsibility to
make updates as changes are made to CMake.
.sp
Additional \fBkey=value\fP pairs are available:
.INDENT 0.0
.TP
.B \fBcustomFlagTableDir=<path>\fP
New in version 3.21.

.sp
Specify the absolute path to a directory from which to load custom
flag tables stored as JSON documents with file names of the form
\fB<platform>_<toolset>_<tool>.json\fP or \fB<platform>_<tool>.json\fP,
where \fB<platform>\fP is the \fI\%CMAKE_VS_PLATFORM_NAME\fP,
\fB<toolset>\fP is the \fI\%CMAKE_VS_PLATFORM_TOOLSET\fP,
and \fB<tool>\fP is the tool for which the flag table is meant.
\fBThis naming pattern is an internal CMake implementation detail.\fP
The \fB<tool>\fP names are undocumented.  The format of the \fB\&.json\fP
flag table files is undocumented.
.UNINDENT
.SS CMAKE_IMPORT_LIBRARY_PREFIX
.sp
The prefix for import libraries that you link to.
.sp
The prefix to use for the name of an import library if used on this
platform.
.sp
\fBCMAKE_IMPORT_LIBRARY_PREFIX_<LANG>\fP overrides this for language \fB<LANG>\fP\&.
.SS CMAKE_IMPORT_LIBRARY_SUFFIX
.sp
The suffix for import libraries that you link to.
.sp
The suffix to use for the end of an import library filename if used on
this platform.
.sp
\fBCMAKE_IMPORT_LIBRARY_SUFFIX_<LANG>\fP overrides this for language \fB<LANG>\fP\&.
.SS CMAKE_JOB_POOL_COMPILE
.sp
This variable is used to initialize the \fI\%JOB_POOL_COMPILE\fP
property on all the targets. See \fI\%JOB_POOL_COMPILE\fP
for additional information.
.SS CMAKE_JOB_POOL_LINK
.sp
This variable is used to initialize the \fI\%JOB_POOL_LINK\fP
property on all the targets. See \fI\%JOB_POOL_LINK\fP
for additional information.
.SS CMAKE_JOB_POOL_PRECOMPILE_HEADER
.sp
New in version 3.17.

.sp
This variable is used to initialize the \fI\%JOB_POOL_PRECOMPILE_HEADER\fP
property on all the targets. See \fI\%JOB_POOL_PRECOMPILE_HEADER\fP
for additional information.
.SS CMAKE_JOB_POOLS
.sp
New in version 3.11.

.sp
If the \fI\%JOB_POOLS\fP global property is not set, the value
of this variable is used in its place.  See \fI\%JOB_POOLS\fP
for additional information.
.SS CMAKE_<LANG>_COMPILER_AR
.sp
New in version 3.9.

.sp
A wrapper around \fBar\fP adding the appropriate \fB\-\-plugin\fP option for the
compiler.
.sp
See also \fI\%CMAKE_AR\fP\&.
.SS CMAKE_<LANG>_COMPILER_FRONTEND_VARIANT
.sp
New in version 3.14.

.sp
Identification string of the compiler frontend variant.
.sp
Some compilers have multiple, different frontends for accepting command
line options.  (For example \fBClang\fP originally only had a frontend
compatible with the \fBGNU\fP compiler but since its port to Windows
(\fBClang\-Cl\fP) it now also supports a frontend compatible with \fBMSVC\fP\&.)
When CMake detects such a compiler it sets this
variable to what would have been the \fI\%CMAKE_<LANG>_COMPILER_ID\fP for
the compiler whose frontend it resembles.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
In other words, this variable describes what command line options
and language extensions the compiler frontend expects.
.UNINDENT
.UNINDENT
.sp
Changed in version 3.26: This variable is set for \fBGNU\fP, \fBMSVC\fP, and \fBAppleClang\fP
compilers that have only one frontend variant.

.SS CMAKE_<LANG>_COMPILER_LINKER
.sp
New in version 3.29.

.sp
The full path to the linker for \fBLANG\fP\&.
.sp
This is the command that will be used as the \fB<LANG>\fP linker.
.sp
This variable is not guaranteed to be defined for all linkers or languages.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
This variable is read\-only. It must not be set by the user. To select a
specific linker, use the \fI\%CMAKE_LINKER_TYPE\fP variable or the
\fI\%LINKER_TYPE\fP target property.
.UNINDENT
.UNINDENT
.SS CMAKE_<LANG>_COMPILER_LINKER_FRONTEND_VARIANT
.sp
New in version 3.29.

.sp
Identification string of the linker frontend variant.
.sp
Some linkers have multiple, different frontends for accepting command
line options.  (For example \fBLLCM LLD\fP originally only had a frontend
compatible with the \fBGNU\fP compiler but since its port to Windows
(\fBlld\-link\fP) it now also supports a frontend compatible with \fBMSVC\fP\&.)
When CMake detects such a linker it sets this variable to what would have been
the \fI\%CMAKE_<LANG>_COMPILER_LINKER_ID\fP for the linker whose frontend
it resembles.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
In other words, this variable describes what command line options
and language extensions the linker frontend expects.
.sp
This variable is set for \fBGNU\fP, \fBMSVC\fP, \fBMOLD\fP and \fBAppleClang\fP
linkers that have only one frontend variant.
.UNINDENT
.UNINDENT
.SS CMAKE_<LANG>_COMPILER_LINKER_ID
.sp
New in version 3.29.

.sp
Linker identification string.
.sp
A short string unique to the linker vendor.  Possible values
include:
.TS
center;
|l|l|.
_
T{
Value
T}	T{
Name
T}
_
T{
\fBAppleClang\fP
T}	T{
Apple Clang
T}
_
T{
\fBLLD\fP
T}	T{
\fI\%LLVM LLD\fP
T}
_
T{
\fBGNU\fP
T}	T{
\fI\%GNU Binutils \- ld linker\fP (also known as
\fBbfd\fP)
T}
_
T{
\fBGNUgold\fP
T}	T{
\fI\%GNU Binutils \- gold linker\fP
T}
_
T{
\fBMSVC\fP
T}	T{
\fI\%Microsoft Visual Studio\fP
T}
_
T{
\fBMOLD\fP
T}	T{
\fI\%mold: A Modern Linker\fP or, on Apple, \fI\%sold\fP
linker
T}
_
T{
\fBAIX\fP
T}	T{
AIX system linker
T}
_
T{
\fBSolaris\fP
T}	T{
SunOS system linker
T}
_
.TE
.sp
This variable is not guaranteed to be defined for all linkers or languages.
.SS CMAKE_<LANG>_COMPILER_LINKER_VERSION
.sp
New in version 3.29.

.sp
Linker version string.
.sp
Linker version in major[.minor[.patch[.tweak]]] format.  This
variable is not guaranteed to be defined for all linkers or
languages.
.SS CMAKE_<LANG>_COMPILER_RANLIB
.sp
New in version 3.9.

.sp
A wrapper around \fBranlib\fP adding the appropriate \fB\-\-plugin\fP option for the
compiler.
.sp
See also \fI\%CMAKE_RANLIB\fP\&.
.SS CMAKE_<LANG>_LINK_LIBRARY_SUFFIX
.sp
New in version 3.16.

.sp
Language\-specific suffix for libraries that you link to.
.sp
The suffix to use for the end of a library filename, \fB\&.lib\fP on Windows.
.SS CMAKE_LINK_LIBRARY_SUFFIX
.sp
The suffix for libraries that you link to.
.sp
The suffix to use for the end of a library filename, \fB\&.lib\fP on Windows.
.SS CMAKE_LINK_SEARCH_END_STATIC
.sp
New in version 3.4.

.sp
End a link line such that static system libraries are used.
.sp
Some linkers support switches such as \fB\-Bstatic\fP and \fB\-Bdynamic\fP to
determine whether to use static or shared libraries for \fB\-lXXX\fP 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 \fB\-Bstatic\fP regardless of how it started.
.sp
This variable is used to initialize the target property
\fI\%LINK_SEARCH_END_STATIC\fP for all targets. If set, its
value is also used by the \fI\%try_compile()\fP command.
.sp
See also \fI\%CMAKE_LINK_SEARCH_START_STATIC\fP\&.
.SS CMAKE_LINK_SEARCH_START_STATIC
.sp
New in version 3.4.

.sp
Assume the linker looks for static libraries by default.
.sp
Some linkers support switches such as \fB\-Bstatic\fP and \fB\-Bdynamic\fP to
determine whether to use static or shared libraries for \fB\-lXXX\fP 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 \fB\-Bdynamic\fP at the beginning of the library list.  This
property switches the assumption to \fB\-Bstatic\fP\&.  It is intended for use
when linking an executable statically (e.g.  with the GNU \fB\-static\fP
option).
.sp
This variable is used to initialize the target property
\fI\%LINK_SEARCH_START_STATIC\fP for all targets.  If set, its
value is also used by the \fI\%try_compile()\fP command.
.sp
See also \fI\%CMAKE_LINK_SEARCH_END_STATIC\fP\&.
.SS CMAKE_MAJOR_VERSION
.sp
First version number component of the \fI\%CMAKE_VERSION\fP
variable.
.SS CMAKE_MAKE_PROGRAM
.sp
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 \fBPATH\fP\&.
.sp
The tool selected depends on the \fI\%CMAKE_GENERATOR\fP used
to configure the project:
.INDENT 0.0
.IP \(bu 2
The \fI\%Makefile Generators\fP set this to \fBmake\fP, \fBgmake\fP, or
a generator\-specific tool (e.g. \fBnmake\fP for \fI\%NMake Makefiles\fP).
.sp
These generators store \fBCMAKE_MAKE_PROGRAM\fP in the CMake cache
so that it may be edited by the user.
.IP \(bu 2
The \fI\%Ninja\fP generator sets this to \fBninja\fP\&.
.sp
This generator stores \fBCMAKE_MAKE_PROGRAM\fP in the CMake cache
so that it may be edited by the user.
.IP \(bu 2
The \fI\%Xcode\fP generator sets this to \fBxcodebuild\fP\&.
.sp
This generator prefers to lookup the build tool at build time
rather than to store \fBCMAKE_MAKE_PROGRAM\fP in the CMake cache
ahead of time.  This is because \fBxcodebuild\fP is easy to find.
.sp
For compatibility with versions of CMake prior to 3.2, if
a user or project explicitly adds \fBCMAKE_MAKE_PROGRAM\fP to
the CMake cache then CMake will use the specified value.
.IP \(bu 2
The \fI\%Visual Studio Generators\fP set this to the full path to
\fBMSBuild.exe\fP (VS >= 10), \fBdevenv.com\fP (VS 7,8,9), or
\fBVCExpress.exe\fP (VS Express 8,9).
(See also variables
\fI\%CMAKE_VS_MSBUILD_COMMAND\fP and
\fI\%CMAKE_VS_DEVENV_COMMAND\fP\&.
.sp
These generators prefer to lookup the build tool at build time
rather than to store \fBCMAKE_MAKE_PROGRAM\fP 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 \fBdevenv.com\fP to build its \fB\&.vfproj\fP project files
even though \fBMSBuild.exe\fP is normally preferred to support
the \fI\%CMAKE_GENERATOR_TOOLSET\fP).
.sp
For compatibility with versions of CMake prior to 3.0, if
a user or project explicitly adds \fBCMAKE_MAKE_PROGRAM\fP to
the CMake cache then CMake will use the specified value if
possible.
.IP \(bu 2
The \fI\%Green Hills MULTI\fP generator sets this to the full
path to \fBgbuild.exe(Windows)\fP or \fBgbuild(Linux)\fP based upon
the toolset being used.
.sp
Once the generator has initialized a particular value for this
variable, changing the value has undefined behavior.
.UNINDENT
.sp
The \fBCMAKE_MAKE_PROGRAM\fP variable is set for use by project code.
The value is also used by the \fI\%cmake \-\-build\fP and
\fI\%ctest \-\-build\-and\-test\fP tools to launch the native
build process.
.SS CMAKE_MATCH_COUNT
.sp
New in version 3.2.

.sp
The number of matches with the last regular expression.
.sp
When a regular expression match is used, CMake fills in
\fI\%CMAKE_MATCH_<n>\fP variables with the match contents.
The \fBCMAKE_MATCH_COUNT\fP variable holds the number of match
expressions when these are filled.
.SS CMAKE_MATCH_<n>
.sp
Capture group \fB<n>\fP 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 \fB()\fP syntax.
.sp
When a regular expression match is used, CMake fills in \fBCMAKE_MATCH_<n>\fP
variables with the match contents.  The \fI\%CMAKE_MATCH_COUNT\fP
variable holds the number of match expressions when these are filled.
.SS CMAKE_MINIMUM_REQUIRED_VERSION
.sp
The \fB<min>\fP version of CMake given to the most recent call to the
\fI\%cmake_minimum_required(VERSION)\fP command in the current
variable scope or any parent variable scope.
.SS CMAKE_MINOR_VERSION
.sp
Second version number component of the \fI\%CMAKE_VERSION\fP
variable.
.SS CMAKE_NETRC
.sp
New in version 3.11.

.sp
This variable is used to initialize the \fBNETRC\fP option for the
\fI\%file(DOWNLOAD)\fP and \fI\%file(UPLOAD)\fP commands.
See those commands for additional information.
.sp
This variable is also used by the \fI\%ExternalProject\fP and
\fI\%FetchContent\fP modules for internal calls to \fI\%file(DOWNLOAD)\fP\&.
.sp
The local option takes precedence over this variable.
.SS CMAKE_NETRC_FILE
.sp
New in version 3.11.

.sp
This variable is used to initialize the \fBNETRC_FILE\fP option for the
\fI\%file(DOWNLOAD)\fP and \fI\%file(UPLOAD)\fP commands.
See those commands for additional information.
.sp
This variable is also used by the \fI\%ExternalProject\fP and
\fI\%FetchContent\fP modules for internal calls to \fI\%file(DOWNLOAD)\fP\&.
.sp
The local option takes precedence over this variable.
.SS CMAKE_PARENT_LIST_FILE
.sp
Full path to the CMake file that included the current one.
.sp
While processing a CMake file loaded by \fI\%include()\fP or
\fI\%find_package()\fP this variable contains the full path to the file
including it.  The top of the include stack is always the \fBCMakeLists.txt\fP
for the current directory.  See also \fI\%CMAKE_CURRENT_LIST_FILE\fP\&.
.SS CMAKE_PATCH_VERSION
.sp
Third version number component of the \fI\%CMAKE_VERSION\fP
variable.
.SS CMAKE_PROJECT_DESCRIPTION
.sp
New in version 3.9.

.sp
The description of the top level project.
.sp
This variable holds the description of the project as specified in the top
level CMakeLists.txt file by a \fI\%project()\fP command.  In the event that
the top level CMakeLists.txt contains multiple \fI\%project()\fP calls,
the most recently called one from that top level CMakeLists.txt will determine
the value that \fBCMAKE_PROJECT_DESCRIPTION\fP contains.  For example, consider
the following top level CMakeLists.txt:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
cmake_minimum_required(VERSION 3.0)
project(First DESCRIPTION \(dqI am First\(dq)
project(Second DESCRIPTION \(dqI am Second\(dq)
add_subdirectory(sub)
project(Third DESCRIPTION \(dqI am Third\(dq)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
And \fBsub/CMakeLists.txt\fP with the following contents:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
project(SubProj DESCRIPTION \(dqI am SubProj\(dq)
message(\(dqCMAKE_PROJECT_DESCRIPTION = ${CMAKE_PROJECT_DESCRIPTION}\(dq)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
The most recently seen \fI\%project()\fP command from the top level
CMakeLists.txt would be \fBproject(Second ...)\fP, so this will print:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
CMAKE_PROJECT_DESCRIPTION = I am Second
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
To obtain the description from the most recent call to \fI\%project()\fP in
the current directory scope or above, see the \fI\%PROJECT_DESCRIPTION\fP
variable.
.SS CMAKE_PROJECT_HOMEPAGE_URL
.sp
New in version 3.12.

.sp
The homepage URL of the top level project.
.sp
This variable holds the homepage URL of the project as specified in the top
level CMakeLists.txt file by a \fI\%project()\fP command.  In the event that
the top level CMakeLists.txt contains multiple \fI\%project()\fP calls,
the most recently called one from that top level CMakeLists.txt will determine
the value that \fBCMAKE_PROJECT_HOMEPAGE_URL\fP contains.  For example, consider
the following top level CMakeLists.txt:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
cmake_minimum_required(VERSION 3.0)
project(First HOMEPAGE_URL \(dqhttp://first.example.com\(dq)
project(Second HOMEPAGE_URL \(dqhttp://second.example.com\(dq)
add_subdirectory(sub)
project(Third HOMEPAGE_URL \(dqhttp://third.example.com\(dq)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
And \fBsub/CMakeLists.txt\fP with the following contents:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
project(SubProj HOMEPAGE_URL \(dqhttp://subproj.example.com\(dq)
message(\(dqCMAKE_PROJECT_HOMEPAGE_URL = ${CMAKE_PROJECT_HOMEPAGE_URL}\(dq)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
The most recently seen \fI\%project()\fP command from the top level
CMakeLists.txt would be \fBproject(Second ...)\fP, so this will print:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
CMAKE_PROJECT_HOMEPAGE_URL = http://second.example.com
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
To obtain the homepage URL from the most recent call to \fI\%project()\fP in
the current directory scope or above, see the \fI\%PROJECT_HOMEPAGE_URL\fP
variable.
.SS CMAKE_PROJECT_NAME
.sp
The name of the top level project.
.sp
This variable holds the name of the project as specified in the top
level CMakeLists.txt file by a \fI\%project()\fP command.  In the event that
the top level CMakeLists.txt contains multiple \fI\%project()\fP calls,
the most recently called one from that top level CMakeLists.txt will determine
the name that \fBCMAKE_PROJECT_NAME\fP contains.  For example, consider
the following top level CMakeLists.txt:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
cmake_minimum_required(VERSION 3.0)
project(First)
project(Second)
add_subdirectory(sub)
project(Third)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
And \fBsub/CMakeLists.txt\fP with the following contents:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
project(SubProj)
message(\(dqCMAKE_PROJECT_NAME = ${CMAKE_PROJECT_NAME}\(dq)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
The most recently seen \fI\%project()\fP command from the top level
CMakeLists.txt would be \fBproject(Second)\fP, so this will print:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
CMAKE_PROJECT_NAME = Second
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
To obtain the name from the most recent call to \fI\%project()\fP in
the current directory scope or above, see the \fI\%PROJECT_NAME\fP
variable.
.SS CMAKE_PROJECT_VERSION
.sp
New in version 3.12.

.sp
The version of the top level project.
.sp
This variable holds the version of the project as specified in the top
level CMakeLists.txt file by a \fI\%project()\fP command.  In the event that
the top level CMakeLists.txt contains multiple \fI\%project()\fP calls,
the most recently called one from that top level CMakeLists.txt will determine
the value that \fBCMAKE_PROJECT_VERSION\fP contains.  For example, consider
the following top level CMakeLists.txt:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
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)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
And \fBsub/CMakeLists.txt\fP with the following contents:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
project(SubProj VERSION 1)
message(\(dqCMAKE_PROJECT_VERSION = ${CMAKE_PROJECT_VERSION}\(dq)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
The most recently seen \fI\%project()\fP command from the top level
CMakeLists.txt would be \fBproject(Second ...)\fP, so this will print:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
CMAKE_PROJECT_VERSION = 3.4.5
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
To obtain the version from the most recent call to \fI\%project()\fP in
the current directory scope or above, see the \fI\%PROJECT_VERSION\fP
variable.
.SS CMAKE_PROJECT_VERSION_MAJOR
.sp
New in version 3.12.

.sp
The major version of the top level project.
.sp
This variable holds the major version of the project as specified in the top
level CMakeLists.txt file by a \fI\%project()\fP command. Please see
\fI\%CMAKE_PROJECT_VERSION\fP documentation for the behavior when
multiple \fI\%project()\fP commands are used in the sources.
.SS CMAKE_PROJECT_VERSION_MINOR
.sp
New in version 3.12.

.sp
The minor version of the top level project.
.sp
This variable holds the minor version of the project as specified in the top
level CMakeLists.txt file by a \fI\%project()\fP command. Please see
\fI\%CMAKE_PROJECT_VERSION\fP documentation for the behavior when
multiple \fI\%project()\fP commands are used in the sources.
.SS CMAKE_PROJECT_VERSION_PATCH
.sp
New in version 3.12.

.sp
The patch version of the top level project.
.sp
This variable holds the patch version of the project as specified in the top
level CMakeLists.txt file by a \fI\%project()\fP command. Please see
\fI\%CMAKE_PROJECT_VERSION\fP documentation for the behavior when
multiple \fI\%project()\fP commands are used in the sources.
.SS CMAKE_PROJECT_VERSION_TWEAK
.sp
New in version 3.12.

.sp
The tweak version of the top level project.
.sp
This variable holds the tweak version of the project as specified in the top
level CMakeLists.txt file by a \fI\%project()\fP command. Please see
\fI\%CMAKE_PROJECT_VERSION\fP documentation for the behavior when
multiple \fI\%project()\fP commands are used in the sources.
.SS CMAKE_RANLIB
.sp
Name of randomizing tool for static libraries.
.sp
This specifies name of the program that randomizes libraries on UNIX,
not used on Windows, but may be present.
.SS CMAKE_ROOT
.sp
Install directory for running cmake.
.sp
This is the install root for the running CMake and the \fBModules\fP
directory can be found here.  This is commonly used in this format:
\fB${CMAKE_ROOT}/Modules\fP
.SS CMAKE_RULE_MESSAGES
.sp
New in version 3.13.

.sp
Specify whether to report a message for each make rule.
.sp
If set in the cache it is used to initialize the value of the \fI\%RULE_MESSAGES\fP 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.
.SS CMAKE_SCRIPT_MODE_FILE
.sp
Full path to the \fI\%cmake \-P\fP script file currently being
processed.
.sp
When run in \fI\%cmake \-P\fP script mode, CMake sets this variable to
the full path of the script file.  When run to configure a \fBCMakeLists.txt\fP
file, this variable is not set.
.SS CMAKE_SHARED_LIBRARY_PREFIX
.sp
The prefix for shared libraries that you link to.
.sp
The prefix to use for the name of a shared library, \fBlib\fP on UNIX.
.sp
\fBCMAKE_SHARED_LIBRARY_PREFIX_<LANG>\fP overrides this for language \fB<LANG>\fP\&.
.SS CMAKE_SHARED_LIBRARY_SUFFIX
.sp
The suffix for shared libraries that you link to.
.sp
The suffix to use for the end of a shared library filename, \fB\&.dll\fP on
Windows.
.sp
\fBCMAKE_SHARED_LIBRARY_SUFFIX_<LANG>\fP overrides this for language \fB<LANG>\fP\&.
.SS CMAKE_SHARED_MODULE_PREFIX
.sp
The prefix for loadable modules that you link to.
.sp
The prefix to use for the name of a loadable module on this platform.
.sp
\fBCMAKE_SHARED_MODULE_PREFIX_<LANG>\fP overrides this for language \fB<LANG>\fP\&.
.SS CMAKE_SHARED_MODULE_SUFFIX
.sp
The suffix for shared libraries that you link to.
.sp
The suffix to use for the end of a loadable module filename on this
platform
.sp
\fBCMAKE_SHARED_MODULE_SUFFIX_<LANG>\fP overrides this for language \fB<LANG>\fP\&.
.SS CMAKE_SIZEOF_VOID_P
.sp
Size of a \fBvoid\fP pointer.
.sp
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.
.SS CMAKE_SKIP_INSTALL_RULES
.sp
Whether to disable generation of installation rules.
.sp
If \fBTRUE\fP, CMake will neither generate installation rules nor
will it generate \fBcmake_install.cmake\fP files. This variable is \fBFALSE\fP by
default.
.SS CMAKE_SKIP_RPATH
.sp
If true, do not add run time path information.
.sp
If this is set to \fBTRUE\fP, 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
\fI\%CMAKE_SKIP_INSTALL_RPATH\fP instead. To omit RPATH in the build step,
use \fI\%CMAKE_SKIP_BUILD_RPATH\fP\&.
.sp
For more information on RPATH handling see the \fI\%INSTALL_RPATH\fP
and \fI\%BUILD_RPATH\fP target properties.
.SS CMAKE_SOURCE_DIR
.sp
The path to the top level of the source tree.
.sp
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
\fI\%CMAKE_BINARY_DIR\fP\&.
.sp
When run in \fI\%cmake \-P\fP script mode, CMake sets the variables
\fI\%CMAKE_BINARY_DIR\fP, \fBCMAKE_SOURCE_DIR\fP,
\fI\%CMAKE_CURRENT_BINARY_DIR\fP and
\fI\%CMAKE_CURRENT_SOURCE_DIR\fP to the current working directory.
.SS CMAKE_STATIC_LIBRARY_PREFIX
.sp
The prefix for static libraries that you link to.
.sp
The prefix to use for the name of a static library, \fBlib\fP on UNIX.
.sp
\fBCMAKE_STATIC_LIBRARY_PREFIX_<LANG>\fP overrides this for language \fB<LANG>\fP\&.
.SS CMAKE_STATIC_LIBRARY_SUFFIX
.sp
The suffix for static libraries that you link to.
.sp
The suffix to use for the end of a static library filename, \fB\&.lib\fP on
Windows.
.sp
\fBCMAKE_STATIC_LIBRARY_SUFFIX_<LANG>\fP overrides this for language \fB<LANG>\fP\&.
.SS CMAKE_Swift_COMPILATION_MODE
.sp
New in version 3.29.

.sp
Specify how Swift compiles a target. This variable is used to initialize the
\fI\%Swift_COMPILATION_MODE\fP property on targets as they are created.
.sp
The allowed values are:
.INDENT 0.0
.TP
.B \fBincremental\fP
Compiles each Swift source in the module separately, resulting in better
parallelism in the build. The compiler emits additional information into
the build directory improving rebuild performance when small changes are made
to the source between rebuilds. This is the best option to use while
iterating on changes in a project.
.TP
.B \fBwholemodule\fP
Whole\-module optimizations are slowest to compile, but results in the most
optimized library. The entire context is loaded into once instance of the
compiler, so there is no parallelism across source files in the module.
.TP
.B \fBsinglefile\fP
Compiles each source in a Swift modules separately, resulting in better
parallelism. Unlike the \fBincremental\fP build mode, no additional information
is emitted by the compiler during the build, so rebuilding after making small
changes to the source file will not run faster. This option should be used
sparingly, preferring \fBincremental\fP builds, unless working around a compiler
bug.
.UNINDENT
.sp
Use \fI\%generator expressions\fP to support
per\-configuration specification. For example, the code:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
set(CMAKE_Swift_COMPILATION_MODE
  \(dq$<IF:$<CONFIG:Release>,wholemodule,incremental>\(dq)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
sets the default Swift compilation mode to wholemodule mode when building a
release configuration and to incremental mode in other configurations.
.sp
If this variable is not set then the \fI\%Swift_COMPILATION_MODE\fP target
property will not be set automatically. If that property is unset then CMake
uses the default value \fBincremental\fP to build the Swift source files.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
This property only has effect when policy \fI\%CMP0157\fP is set to \fBNEW\fP
prior to the first \fI\%project()\fP or \fI\%enable_language()\fP command
that enables the Swift language.
.UNINDENT
.UNINDENT
.SS CMAKE_Swift_MODULE_DIRECTORY
.sp
New in version 3.15.

.sp
Swift module output directory.
.sp
This variable is used to initialize the \fI\%Swift_MODULE_DIRECTORY\fP
property on all the targets.  See the target property for additional
information.
.SS CMAKE_Swift_NUM_THREADS
.sp
New in version 3.15.1.

.sp
Number of threads for parallel compilation for Swift targets.
.sp
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.
.SS CMAKE_TEST_LAUNCHER
.sp
New in version 3.29.

.sp
This variable is used to initialize the \fI\%TEST_LAUNCHER\fP target
property of executable targets as they are created.  It is used to specify
a launcher for running tests, added by the \fI\%add_test()\fP command,
that run an executable target.
.sp
If this variable contains a \fI\%semicolon\-separated list\fP, then the first value is the command and remaining values are its
arguments.
.sp
This variable can be initialized via an
\fI\%CMAKE_TEST_LAUNCHER\fP environment variable.
.SS CMAKE_TOOLCHAIN_FILE
.sp
Path to toolchain file supplied to \fI\%cmake(1)\fP\&.
.sp
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.
.sp
Relative paths are allowed and are interpreted first as relative to the
build directory, and if not found, relative to the source directory.
.sp
This is initialized by the \fI\%CMAKE_TOOLCHAIN_FILE\fP environment
variable if it is set when a new build tree is first created.
.sp
See the \fI\%CMAKE_PROJECT_TOP_LEVEL_INCLUDES\fP variable for setting
other things not directly related to the toolchain.
.SS CMAKE_TWEAK_VERSION
.sp
Defined to \fB0\fP for compatibility with code written for older
CMake versions that may have defined higher values.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
In CMake versions 2.8.2 through 2.8.12, this variable holds
the fourth version number component of the
\fI\%CMAKE_VERSION\fP variable.
.UNINDENT
.UNINDENT
.SS CMAKE_VERBOSE_MAKEFILE
.sp
Enable verbose output from Makefile builds.
.sp
This variable is a cache entry initialized (to \fBFALSE\fP) by
the \fI\%project()\fP command.  Users may enable the option
in their local build tree to get more verbose output from
Makefile builds and show each command line as it is launched.
.SS CMAKE_VERSION
.sp
The CMake version string as three non\-negative integer components
separated by \fB\&.\fP and possibly followed by \fB\-\fP and other information.
The first two components represent the feature level and the third
component represents either a bug\-fix level or development date.
.sp
Release versions and release candidate versions of CMake use the format:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
<major>.<minor>.<patch>[\-rc<n>]
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
where the \fB<patch>\fP component is less than \fB20000000\fP\&.  Development
versions of CMake use the format:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
<major>.<minor>.<date>[\-<id>]
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
where the \fB<date>\fP component is of format \fBCCYYMMDD\fP and \fB<id>\fP
may contain arbitrary text.  This represents development as of a
particular date following the \fB<major>.<minor>\fP feature release.
.sp
Individual component values are also available in variables:
.INDENT 0.0
.IP \(bu 2
\fI\%CMAKE_MAJOR_VERSION\fP
.IP \(bu 2
\fI\%CMAKE_MINOR_VERSION\fP
.IP \(bu 2
\fI\%CMAKE_PATCH_VERSION\fP
.IP \(bu 2
\fI\%CMAKE_TWEAK_VERSION\fP
.UNINDENT
.sp
Use the \fI\%if()\fP command \fBVERSION_LESS\fP, \fBVERSION_GREATER\fP,
\fBVERSION_EQUAL\fP, \fBVERSION_LESS_EQUAL\fP, or \fBVERSION_GREATER_EQUAL\fP
operators to compare version string values against \fBCMAKE_VERSION\fP using a
component\-wise test.  Version component values may be 10 or larger so do not
attempt to compare version strings as floating\-point numbers.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
CMake versions 2.8.2 through 2.8.12 used three components for the
feature level.  Release versions represented the bug\-fix level in a
fourth component, i.e. \fB<major>.<minor>.<patch>[.<tweak>][\-rc<n>]\fP\&.
Development versions represented the development date in the fourth
component, i.e. \fB<major>.<minor>.<patch>.<date>[\-<id>]\fP\&.
.sp
CMake versions prior to 2.8.2 used three components for the
feature level and had no bug\-fix component.  Release versions
used an even\-valued second component, i.e.
\fB<major>.<even\-minor>.<patch>[\-rc<n>]\fP\&.  Development versions
used an odd\-valued second component with the development date as
the third component, i.e. \fB<major>.<odd\-minor>.<date>\fP\&.
.sp
The \fBCMAKE_VERSION\fP variable is defined by CMake 2.6.3 and higher.
Earlier versions defined only the individual component variables.
.UNINDENT
.UNINDENT
.SS CMAKE_VS_DEVENV_COMMAND
.sp
The generators for \fI\%Visual Studio 9 2008\fP and above set this
variable to the \fBdevenv.com\fP command installed with the corresponding
Visual Studio version.  Note that this variable may be empty on
Visual Studio Express editions because they do not provide this tool.
.sp
This variable is not defined by other generators even if \fBdevenv.com\fP
is installed on the computer.
.sp
The \fI\%CMAKE_VS_MSBUILD_COMMAND\fP is also provided for
\fI\%Visual Studio 12 2013\fP and above.
See also the \fI\%CMAKE_MAKE_PROGRAM\fP variable.
.SS CMAKE_VS_MSBUILD_COMMAND
.sp
The generators for \fI\%Visual Studio 12 2013\fP and above set this
variable to the \fBMSBuild.exe\fP command installed with the corresponding
Visual Studio version.
.sp
This variable is not defined by other generators even if \fBMSBuild.exe\fP
is installed on the computer.
.sp
The \fI\%CMAKE_VS_DEVENV_COMMAND\fP is also provided for the
non\-Express editions of Visual Studio.
See also the \fI\%CMAKE_MAKE_PROGRAM\fP variable.
.SS CMAKE_VS_NsightTegra_VERSION
.sp
New in version 3.1.

.sp
When using a Visual Studio generator with the
\fI\%CMAKE_SYSTEM_NAME\fP variable set to \fBAndroid\fP,
this variable contains the version number of the
installed NVIDIA Nsight Tegra Visual Studio Edition.
.SS CMAKE_VS_NUGET_PACKAGE_RESTORE
.sp
New in version 3.23.

.sp
When using a Visual Studio generator, this cache variable controls
if msbuild should automatically attempt to restore NuGet packages
prior to a build. NuGet packages can be defined using the
\fI\%VS_PACKAGE_REFERENCES\fP property on a target. If no
package references are defined, this setting will do nothing.
.sp
The command line option \fB\-\-resolve\-package\-references\fP can be used
alternatively to control the resolve behavior globally. This option
will take precedence over the cache variable.
.sp
Targets that use the \fI\%DOTNET_SDK\fP are required to run a
restore before building. Disabling this option may cause the build
to fail in such projects.
.sp
This setting is stored as a cache entry. Default value is \fBON\fP\&.
.sp
See also the \fI\%VS_PACKAGE_REFERENCES\fP property.
.SS CMAKE_VS_PLATFORM_NAME
.sp
New in version 3.1.

.sp
Visual Studio target platform name used by the current generator.
.sp
VS 8 and above allow project files to specify a target platform.
CMake provides the name of the chosen platform in this variable.
See the \fI\%CMAKE_GENERATOR_PLATFORM\fP variable for details.
.sp
See also the \fI\%CMAKE_VS_PLATFORM_NAME_DEFAULT\fP variable.
.SS CMAKE_VS_PLATFORM_NAME_DEFAULT
.sp
New in version 3.14.3.

.sp
Default for the Visual Studio target platform name for the current generator
without considering the value of the \fI\%CMAKE_GENERATOR_PLATFORM\fP
variable.  For \fI\%Visual Studio Generators\fP for VS 2017 and below this is
always \fBWin32\fP\&.  For VS 2019 and above this is based on the host platform.
.sp
See also the \fI\%CMAKE_VS_PLATFORM_NAME\fP variable.
.SS CMAKE_VS_PLATFORM_TOOLSET
.sp
Visual Studio Platform Toolset name.
.sp
VS 10 and above use MSBuild under the hood and support multiple
compiler toolchains.  CMake may specify a toolset explicitly, such as
\fBv110\fP for VS 11 or \fBWindows7.1SDK\fP for 64\-bit support in VS 10
Express.  CMake provides the name of the chosen toolset in this
variable.
.sp
See the \fI\%CMAKE_GENERATOR_TOOLSET\fP variable for details.
.SS CMAKE_VS_PLATFORM_TOOLSET_CUDA
.sp
New in version 3.9.

.sp
NVIDIA CUDA Toolkit version whose Visual Studio toolset to use.
.sp
The \fI\%Visual Studio Generators\fP for VS 2010 and above support using
a CUDA toolset provided by a CUDA Toolkit.  The toolset version number
may be specified by a field in \fI\%CMAKE_GENERATOR_TOOLSET\fP of
the form \fBcuda=8.0\fP\&. Or it is automatically detected if a path to
a standalone CUDA directory is specified in the form \fBcuda=C:\epath\eto\ecuda\fP\&.
If none is specified CMake will choose a default version.
CMake provides the selected CUDA toolset version in this variable.
The value may be empty if no CUDA Toolkit with Visual Studio integration
is installed.
.SS CMAKE_VS_PLATFORM_TOOLSET_CUDA_CUSTOM_DIR
.sp
New in version 3.16.

.sp
Path to standalone NVIDIA CUDA Toolkit (eg. extracted from installer).
.sp
The \fI\%Visual Studio Generators\fP for VS 2010 and above support using
a standalone (non\-installed) NVIDIA CUDA toolkit.  The path
may be specified by a field in \fI\%CMAKE_GENERATOR_TOOLSET\fP of
the form \fBcuda=C:\epath\eto\ecuda\fP\&.  The given directory must at least
contain the nvcc compiler in path \fB\&.\ebin\fP and must provide Visual Studio
integration files in path \fB\&.\eextras\evisual_studio_integration\e
MSBuildExtensions\e\fP\&. One can create a standalone CUDA toolkit directory by
either opening a installer with 7zip or copying the files that are extracted
by the running installer. The value may be empty if no path to a standalone
CUDA Toolkit was specified.
.SS CMAKE_VS_PLATFORM_TOOLSET_FORTRAN
.sp
New in version 3.29.

.sp
Fortran compiler to be used by Visual Studio projects.
.sp
\fI\%Visual Studio Generators\fP support selecting among Fortran compilers
whose Visual Studio Integration is installed.  The compiler may be specified
by a field in \fI\%CMAKE_GENERATOR_TOOLSET\fP of the form \fBfortran=...\fP\&.
CMake provides the selected Fortran compiler in this variable.
The value may be empty if the field was not specified.
.SS CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE
.sp
New in version 3.8.

.sp
Visual Studio preferred tool architecture.
.sp
The \fI\%Visual Studio Generators\fP for VS 2013 and above support using
either the 32\-bit or 64\-bit host toolchains by specifying a \fBhost=x86\fP
or \fBhost=x64\fP value in the \fI\%CMAKE_GENERATOR_TOOLSET\fP option.
CMake provides the selected toolchain architecture preference in this
variable (\fBx86\fP, \fBx64\fP, \fBARM64\fP or empty).
.SS CMAKE_VS_PLATFORM_TOOLSET_VERSION
.sp
New in version 3.12.

.sp
Visual Studio Platform Toolset version.
.sp
The \fI\%Visual Studio Generators\fP for VS 2017 and above allow to
select minor versions of the same toolset. The toolset version number
may be specified by a field in \fI\%CMAKE_GENERATOR_TOOLSET\fP of
the form \fBversion=14.11\fP\&. If none is specified CMake will choose a default
toolset. The value may be empty if no minor version was selected and the
default is used.
.sp
If the value is not empty, it is the version number that MSBuild uses in
its \fBMicrosoft.VCToolsVersion.*.props\fP file names.
.sp
New in version 3.19.7: VS 16.9\(aqs toolset may also be specified as \fB14.28.16.9\fP because
VS 16.10 uses the file name \fBMicrosoft.VCToolsVersion.14.28.16.9.props\fP\&.

.SS Three\-Component MSVC Toolset Versions
.sp
New in version 3.19.7.

.sp
The \fBversion=\fP field may be given a three\-component toolset version
such as \fB14.28.29910\fP, and CMake will convert it to the name used by
MSBuild \fBMicrosoft.VCToolsVersion.*.props\fP files.  This is useful
to distinguish between VS 16.8\(aqs \fB14.28.29333\fP toolset and VS 16.9\(aqs
\fB14.28.29910\fP toolset.  It also matches \fBvcvarsall\fP\(aqs \fB\-vcvars_ver=\fP
behavior.
.SS CMAKE_VS_TARGET_FRAMEWORK_IDENTIFIER
.sp
New in version 3.22.

.sp
Visual Studio target framework identifier.
.sp
In some cases, the \fI\%Visual Studio Generators\fP may use an explicit value
for the MSBuild \fBTargetFrameworkIdentifier\fP setting in \fB\&.csproj\fP files.
CMake provides the chosen value in this variable.
.sp
See also \fI\%CMAKE_VS_TARGET_FRAMEWORK_VERSION\fP and
\fI\%CMAKE_VS_TARGET_FRAMEWORK_TARGETS_VERSION\fP\&.
.SS CMAKE_VS_TARGET_FRAMEWORK_TARGETS_VERSION
.sp
New in version 3.22.

.sp
Visual Studio target framework targets version.
.sp
In some cases, the \fI\%Visual Studio Generators\fP may use an explicit value
for the MSBuild \fBTargetFrameworkTargetsVersion\fP setting in \fB\&.csproj\fP files.
CMake provides the chosen value in this variable.
.sp
See also \fI\%CMAKE_VS_TARGET_FRAMEWORK_VERSION\fP and
\fI\%CMAKE_VS_TARGET_FRAMEWORK_IDENTIFIER\fP\&.
.SS CMAKE_VS_TARGET_FRAMEWORK_VERSION
.sp
New in version 3.22.

.sp
Visual Studio target framework version.
.sp
In some cases, the \fI\%Visual Studio Generators\fP may use an explicit value
for the MSBuild \fBTargetFrameworkVersion\fP setting in \fB\&.csproj\fP files.
CMake provides the chosen value in this variable.
.sp
See the \fI\%CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION\fP variable
and \fI\%DOTNET_TARGET_FRAMEWORK_VERSION\fP target property to
specify custom \fBTargetFrameworkVersion\fP values for project targets.
.sp
See also \fI\%CMAKE_VS_TARGET_FRAMEWORK_IDENTIFIER\fP and
\fI\%CMAKE_VS_TARGET_FRAMEWORK_TARGETS_VERSION\fP\&.
.SS CMAKE_VS_VERSION_BUILD_NUMBER
.sp
New in version 3.26.

.sp
Visual Studio version.
.sp
\fI\%Visual Studio Generators\fP for VS 2017 and above set this
variable to the Visual Studio version build number in the format
\fB<major>.<minor>.<date>.<build>\fP\&.
.sp
The components are:
.sp
\fB<major>.<minor>\fP
.INDENT 0.0
.INDENT 3.5
The VS major and minor version numbers.
These are the same as the release version numbers.
.UNINDENT
.UNINDENT
.sp
\fB<date>\fP
.INDENT 0.0
.INDENT 3.5
A build date in the format \fBMMMDD\fP, where \fBMMM\fP is a month index
since an epoch used by Microsoft, and \fBDD\fP is a day in that month.
.UNINDENT
.UNINDENT
.sp
\fB<build>\fP
.INDENT 0.0
.INDENT 3.5
A build index on the day represented by \fB<date>\fP\&.
.UNINDENT
.UNINDENT
.sp
The build number is reported by \fBvswhere\fP as \fBinstallationVersion\fP\&.
For example, VS 16.11.10 has build number \fB16.11.32126.315\fP\&.
.sp
See also the \fI\%CMAKE_GENERATOR_INSTANCE\fP variable.
.SS CMAKE_VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION
.sp
New in version 3.27.

.sp
Tell \fI\%Visual Studio Generators\fP to use the given
Windows Target Platform Minimum Version.
.sp
This variable is used to initialize the
\fI\%VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION\fP property on all
targets when they are created.  See that target property for
additional information.
.SS CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION
.sp
New in version 3.4.

.sp
Visual Studio Windows Target Platform Version.
.sp
When targeting Windows 10 and above, \fI\%Visual Studio Generators\fP for
VS 2015 and above support specification of a Windows SDK version:
.INDENT 0.0
.IP \(bu 2
If \fI\%CMAKE_GENERATOR_PLATFORM\fP specifies a \fBversion=\fP field,
as documented by \fI\%Visual Studio Platform Selection\fP, that SDK
version is selected.
.IP \(bu 2
Otherwise, if the \fBWindowsSDKVersion\fP environment variable
is set to an available SDK version, that version is selected.
This is intended for use in environments established by \fBvcvarsall.bat\fP
or similar scripts.
.sp
New in version 3.27: This is enabled by policy \fI\%CMP0149\fP\&.

.IP \(bu 2
Otherwise, if \fI\%CMAKE_SYSTEM_VERSION\fP is set to an available
SDK version, that version is selected.
.sp
Changed in version 3.27: This is disabled by policy \fI\%CMP0149\fP\&.

.IP \(bu 2
Otherwise, CMake uses the latest Windows SDK version available.
.UNINDENT
.sp
The chosen Windows target version number is provided
in \fBCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION\fP\&.  If no Windows 10 SDK
is available this value will be empty.
.sp
One may set a \fBCMAKE_WINDOWS_KITS_10_DIR\fP \fIenvironment variable\fP
to an absolute path to tell CMake to look for Windows 10 SDKs in
a custom location.  The specified directory is expected to contain
\fBInclude/10.0.*\fP directories.
.sp
See also \fI\%CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM\fP\&.
.SS CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM
.sp
New in version 3.19.

.sp
Override the \fI\%Windows 10 SDK Maximum Version for VS 2015\fP and beyond.
.sp
The \fBCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM\fP variable may
be set to a false value (e.g. \fBOFF\fP, \fBFALSE\fP, or \fB0\fP) or the SDK version
to use as the maximum (e.g. \fB10.0.14393.0\fP).  If unset, the default depends
on which version of Visual Studio is targeted by the current generator.
.sp
This can be used to exclude Windows SDK versions from consideration for
\fI\%CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION\fP\&.
.SS CMAKE_XCODE_BUILD_SYSTEM
.sp
New in version 3.19.

.sp
Xcode build system selection.
.sp
The \fI\%Xcode\fP generator defines this variable to indicate which
variant of the Xcode build system will be used.  The value is the
version of Xcode in which the corresponding build system first became
mature enough for use by CMake.  The possible values are:
.INDENT 0.0
.TP
.B \fB1\fP
The original Xcode build system.
This is the default when using Xcode 11.x or below and supported
up to Xcode 13.x.
.TP
.B \fB12\fP
The Xcode \(dqnew build system\(dq introduced by Xcode 10.
It became mature enough for use by CMake in Xcode 12.
This is the default when using Xcode 12.x or above.
.UNINDENT
.sp
The \fBCMAKE_XCODE_BUILD_SYSTEM\fP variable is informational and should not
be modified by project code.  See the \fI\%Toolset and Build System Selection\fP
documentation section to select the Xcode build system.
.SS CMAKE_XCODE_PLATFORM_TOOLSET
.sp
Xcode compiler selection.
.sp
\fI\%Xcode\fP supports selection of a compiler from one of the installed
toolsets.  CMake provides the name of the chosen toolset in this
variable, if any is explicitly selected (e.g.  via the \fI\%cmake \-T\fP
option).
.SS <PROJECT\-NAME>_BINARY_DIR
.sp
Top level binary directory for the named project.
.sp
A variable is created with the name used in the \fI\%project()\fP command,
and is the binary directory for the project.  This can be useful when
\fI\%add_subdirectory()\fP is used to connect several projects.
.SS <PROJECT\-NAME>_DESCRIPTION
.sp
New in version 3.12.

.sp
Value given to the \fBDESCRIPTION\fP option of the most recent call to the
\fI\%project()\fP command with project name \fB<PROJECT\-NAME>\fP, if any.
.SS <PROJECT\-NAME>_HOMEPAGE_URL
.sp
New in version 3.12.

.sp
Value given to the \fBHOMEPAGE_URL\fP option of the most recent call to the
\fI\%project()\fP command with project name \fB<PROJECT\-NAME>\fP, if any.
.SS <PROJECT\-NAME>_IS_TOP_LEVEL
.sp
New in version 3.21.

.sp
A boolean variable indicating whether the named project was called in a top
level \fBCMakeLists.txt\fP file.
.sp
To obtain the value from the most recent call to \fI\%project()\fP in
the current directory scope or above, see the
\fI\%PROJECT_IS_TOP_LEVEL\fP variable.
.sp
The variable value will be true in:
.INDENT 0.0
.IP \(bu 2
the top\-level directory of the project
.IP \(bu 2
the top\-level directory of an external project added by
\fI\%ExternalProject\fP
.IP \(bu 2
a directory added by \fI\%add_subdirectory()\fP that does not also contain
a \fI\%project()\fP call
.IP \(bu 2
a directory added by \fI\%FetchContent_MakeAvailable()\fP,
if the fetched content does not contain a \fI\%project()\fP call
.UNINDENT
.sp
The variable value will be false in:
.INDENT 0.0
.IP \(bu 2
a directory added by \fI\%add_subdirectory()\fP that also contains
a \fI\%project()\fP call
.IP \(bu 2
a directory added by \fI\%FetchContent_MakeAvailable()\fP,
if the fetched content contains a \fI\%project()\fP call
.UNINDENT
.SS <PROJECT\-NAME>_SOURCE_DIR
.sp
Top level source directory for the named project.
.sp
A variable is created with the name used in the \fI\%project()\fP command,
and is the source directory for the project.  This can be useful when
\fI\%add_subdirectory()\fP is used to connect several projects.
.SS <PROJECT\-NAME>_VERSION
.sp
Value given to the \fBVERSION\fP option of the most recent call to the
\fI\%project()\fP command with project name \fB<PROJECT\-NAME>\fP, if any.
.sp
See also the component\-wise version variables
\fI\%<PROJECT\-NAME>_VERSION_MAJOR\fP,
\fI\%<PROJECT\-NAME>_VERSION_MINOR\fP,
\fI\%<PROJECT\-NAME>_VERSION_PATCH\fP, and
\fI\%<PROJECT\-NAME>_VERSION_TWEAK\fP\&.
.SS <PROJECT\-NAME>_VERSION_MAJOR
.sp
First version number component of the \fI\%<PROJECT\-NAME>_VERSION\fP
variable as set by the \fI\%project()\fP command.
.SS <PROJECT\-NAME>_VERSION_MINOR
.sp
Second version number component of the \fI\%<PROJECT\-NAME>_VERSION\fP
variable as set by the \fI\%project()\fP command.
.SS <PROJECT\-NAME>_VERSION_PATCH
.sp
Third version number component of the \fI\%<PROJECT\-NAME>_VERSION\fP
variable as set by the \fI\%project()\fP command.
.SS <PROJECT\-NAME>_VERSION_TWEAK
.sp
Fourth version number component of the \fI\%<PROJECT\-NAME>_VERSION\fP
variable as set by the \fI\%project()\fP command.
.SS PROJECT_BINARY_DIR
.sp
Full path to build directory for project.
.sp
This is the binary directory of the most recent \fI\%project()\fP command.
.SS PROJECT_DESCRIPTION
.sp
New in version 3.9.

.sp
Short project description given to the project command.
.sp
This is the description given to the most recently called \fI\%project()\fP
command in the current directory scope or above.  To obtain the description
of the top level project, see the \fI\%CMAKE_PROJECT_DESCRIPTION\fP
variable.
.SS PROJECT_HOMEPAGE_URL
.sp
New in version 3.12.

.sp
The homepage URL of the project.
.sp
This is the homepage URL given to the most recently called \fI\%project()\fP
command in the current directory scope or above.  To obtain the homepage URL
of the top level project, see the \fI\%CMAKE_PROJECT_HOMEPAGE_URL\fP
variable.
.SS PROJECT_IS_TOP_LEVEL
.sp
New in version 3.21.

.sp
A boolean variable indicating whether the most recently called
\fI\%project()\fP command in the current scope or above was in the top
level \fBCMakeLists.txt\fP file.
.sp
Some modules should only be included as part of the top level
\fBCMakeLists.txt\fP file to not cause unintended side effects in the build
tree, and this variable can be used to conditionally execute such code. For
example, consider the \fI\%CTest\fP module, which creates targets and
options:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
project(MyProject)
\&...
if(PROJECT_IS_TOP_LEVEL)
  include(CTest)
endif()
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
The variable value will be true in:
.INDENT 0.0
.IP \(bu 2
the top\-level directory of the project
.IP \(bu 2
the top\-level directory of an external project added by
\fI\%ExternalProject\fP
.IP \(bu 2
a directory added by \fI\%add_subdirectory()\fP that does not also contain
a \fI\%project()\fP call
.IP \(bu 2
a directory added by \fI\%FetchContent_MakeAvailable()\fP,
if the fetched content does not contain a \fI\%project()\fP call
.UNINDENT
.sp
The variable value will be false in:
.INDENT 0.0
.IP \(bu 2
a directory added by \fI\%add_subdirectory()\fP that also contains
a \fI\%project()\fP call
.IP \(bu 2
a directory added by \fI\%FetchContent_MakeAvailable()\fP,
if the fetched content contains a \fI\%project()\fP call
.UNINDENT
.SS PROJECT_NAME
.sp
Name of the project given to the project command.
.sp
This is the name given to the most recently called \fI\%project()\fP
command in the current directory scope or above.  To obtain the name of
the top level project, see the \fI\%CMAKE_PROJECT_NAME\fP variable.
.SS PROJECT_SOURCE_DIR
.sp
This is the source directory of the last call to the
\fI\%project()\fP command made in the current directory scope or one
of its parents. Note, it is not affected by calls to
\fI\%project()\fP made within a child directory scope (i.e. from
within a call to \fI\%add_subdirectory()\fP from the current scope).
.SS PROJECT_VERSION
.sp
Value given to the \fBVERSION\fP option of the most recent call to the
\fI\%project()\fP command, if any.
.sp
See also the component\-wise version variables
\fI\%PROJECT_VERSION_MAJOR\fP,
\fI\%PROJECT_VERSION_MINOR\fP,
\fI\%PROJECT_VERSION_PATCH\fP, and
\fI\%PROJECT_VERSION_TWEAK\fP\&.
.SS PROJECT_VERSION_MAJOR
.sp
First version number component of the \fI\%PROJECT_VERSION\fP
variable as set by the \fI\%project()\fP command.
.SS PROJECT_VERSION_MINOR
.sp
Second version number component of the \fI\%PROJECT_VERSION\fP
variable as set by the \fI\%project()\fP command.
.SS PROJECT_VERSION_PATCH
.sp
Third version number component of the \fI\%PROJECT_VERSION\fP
variable as set by the \fI\%project()\fP command.
.SS PROJECT_VERSION_TWEAK
.sp
Fourth version number component of the \fI\%PROJECT_VERSION\fP
variable as set by the \fI\%project()\fP command.
.SH VARIABLES THAT CHANGE BEHAVIOR
.SS BUILD_SHARED_LIBS
.sp
Tell \fI\%add_library()\fP to default to \fBSHARED\fP libraries,
instead of \fBSTATIC\fP libraries, when called with no explicit library type.
.sp
Calls to \fI\%add_library()\fP without any explicit library type check
the current \fBBUILD_SHARED_LIBS\fP variable value.  If it is true, then the
default library type is \fBSHARED\fP\&.  Otherwise, the default is \fBSTATIC\fP\&.
.sp
For example, the code:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
add_library(example ${sources})
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
behaves as if written
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
if(BUILD_SHARED_LIBS)
  add_library(example SHARED ${sources})
else()
  add_library(example STATIC ${sources})
endif()
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
CMake does not define \fBBUILD_SHARED_LIBS\fP by default, but projects
often create a cache entry for it using the \fI\%option()\fP command:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
option(BUILD_SHARED_LIBS \(dqBuild using shared libraries\(dq ON)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
This provides a switch that users can control, e.g., with \fI\%cmake \-D\fP\&.
If adding such an option to the project, do so in the top level
\fBCMakeLists.txt\fP file, before any \fI\%add_library()\fP calls.
Note that if bringing external dependencies directly into the build, such as
with \fI\%FetchContent\fP or a direct call to \fI\%add_subdirectory()\fP,
and one of those dependencies has such a call to
\fI\%option(BUILD_SHARED_LIBS ...)\fP, the top level project must
also call \fI\%option(BUILD_SHARED_LIBS ...)\fP before bringing in
its dependencies.  Failure to do so can lead to different behavior between the
first and subsequent CMake runs.
.SS CMAKE_ABSOLUTE_DESTINATION_FILES
.sp
List of files which have been installed using an \fBABSOLUTE DESTINATION\fP path.
.sp
This variable is defined by CMake\-generated \fBcmake_install.cmake\fP
scripts.  It can be used (read\-only) by programs or scripts that
source those install scripts.  This is used by some CPack generators
(e.g.  RPM).
.SS CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY
.sp
New in version 3.27.

.sp
Whether to enable the \fBDEPENDS_EXPLICIT_ONLY\fP option by default in
\fI\%add_custom_command()\fP\&.
.sp
This variable affects the default behavior of the \fI\%add_custom_command()\fP
command.  Setting this variable to \fBON\fP is equivalent to using the
\fBDEPENDS_EXPLICIT_ONLY\fP option in all uses of that command.
.sp
See also \fI\%CMAKE_OPTIMIZE_DEPENDENCIES\fP\&.
.SS CMAKE_APPBUNDLE_PATH
.sp
\fI\%Semicolon\-separated list\fP of directories specifying a search path
for macOS application bundles used by the \fI\%find_program()\fP, and
\fI\%find_package()\fP commands.
.sp
There is also an environment variable \fI\%CMAKE_APPBUNDLE_PATH\fP, which is used
as an additional list of search directories.
.SS CMAKE_BUILD_TYPE
.sp
Specifies the build type on single\-configuration generators (e.g.
\fI\%Makefile Generators\fP or \fI\%Ninja\fP).  Typical values include
\fBDebug\fP, \fBRelease\fP, \fBRelWithDebInfo\fP and \fBMinSizeRel\fP, but custom
build types can also be defined.
.sp
This variable is initialized by the first \fI\%project()\fP or
\fI\%enable_language()\fP command called in a project when a new build
tree is first created.  If the \fI\%CMAKE_BUILD_TYPE\fP environment
variable is set, its value is used.  Otherwise, a toolchain\-specific
default is chosen when a language is enabled.  The default value is often
an empty string, but this is usually not desirable and one of the other
standard build types is usually more appropriate.
.sp
Depending on the situation, the value of this variable may be treated
case\-sensitively or case\-insensitively.  See \fI\%Build Configurations\fP
for discussion of this and other related topics.
.sp
For multi\-config generators, see \fI\%CMAKE_CONFIGURATION_TYPES\fP\&.
.SS CMAKE_CLANG_VFS_OVERLAY
.sp
New in version 3.19.

.sp
When cross compiling for windows with clang\-cl, this variable can be an
absolute path pointing to a clang virtual file system yaml file, which
will enable clang\-cl to resolve windows header names on a case sensitive
file system.
.SS CMAKE_CODEBLOCKS_COMPILER_ID
.sp
New in version 3.11.

.sp
Change the compiler id in the generated CodeBlocks project files.
.sp
CodeBlocks uses its own compiler id string which differs from
\fI\%CMAKE_<LANG>_COMPILER_ID\fP\&.  If this variable is left empty,
CMake tries to recognize the CodeBlocks compiler id automatically.
Otherwise the specified string is used in the CodeBlocks project file.
See the CodeBlocks documentation for valid compiler id strings.
.sp
Other IDEs like QtCreator that also use the CodeBlocks generator may ignore
this setting.
.SS CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES
.sp
New in version 3.10.

.sp
Change the way the CodeBlocks generator creates project files.
.sp
If this variable evaluates to \fBON\fP the generator excludes from
the project file any files that are located outside the project root.
.SS CMAKE_CODELITE_USE_TARGETS
.sp
New in version 3.7.

.sp
Change the way the CodeLite generator creates projectfiles.
.sp
If this variable evaluates to \fBON\fP at the end of the top\-level
\fBCMakeLists.txt\fP file, the generator creates projectfiles based on targets
rather than projects.
.SS CMAKE_COLOR_DIAGNOSTICS
.sp
New in version 3.24.

.sp
Enable color diagnostics throughout.
.sp
This variable uses three states: \fBON\fP, \fBOFF\fP and not defined.
.sp
When not defined:
.INDENT 0.0
.IP \(bu 2
\fI\%Makefile Generators\fP initialize the \fI\%CMAKE_COLOR_MAKEFILE\fP
variable to \fBON\fP\&.  It controls color buildsystem messages.
.IP \(bu 2
GNU/Clang compilers are not invoked with any color diagnostics flag.
.UNINDENT
.sp
When \fBON\fP:
.INDENT 0.0
.IP \(bu 2
\fI\%Makefile Generators\fP produce color buildsystem messages by default.
\fI\%CMAKE_COLOR_MAKEFILE\fP is not initialized, but may be
explicitly set to \fBOFF\fP to disable color buildsystem messages.
.IP \(bu 2
GNU/Clang compilers are invoked with a flag enabling color diagnostics
(\fB\-fcolor\-diagnostics\fP).
.UNINDENT
.sp
When \fBOFF\fP:
.INDENT 0.0
.IP \(bu 2
\fI\%Makefile Generators\fP do not produce color buildsystem messages by
default.  \fI\%CMAKE_COLOR_MAKEFILE\fP is not initialized, but may be
explicitly set to \fBON\fP to enable color buildsystem messages.
.IP \(bu 2
GNU/Clang compilers are invoked with a flag disabling color diagnostics
(\fB\-fno\-color\-diagnostics\fP).
.UNINDENT
.sp
If the \fI\%CMAKE_COLOR_DIAGNOSTICS\fP environment variable is set, its
value is used.  Otherwise, \fBCMAKE_COLOR_DIAGNOSTICS\fP is not defined by
default.
.SS CMAKE_COLOR_MAKEFILE
.sp
Enables color output when using the \fI\%Makefile Generators\fP\&.
.sp
When enabled, the generated Makefiles will produce colored output.
Default is \fBON\fP\&.
.SS CMAKE_CONFIGURATION_TYPES
.sp
Specifies the available build types (configurations) on multi\-config
generators (e.g. \fI\%Visual Studio\fP,
\fI\%Xcode\fP, or \fI\%Ninja Multi\-Config\fP) as a
\fI\%semicolon\-separated list\fP\&.  Typical entries
include \fBDebug\fP, \fBRelease\fP, \fBRelWithDebInfo\fP and \fBMinSizeRel\fP,
but custom build types can also be defined.
.sp
This variable is initialized by the first \fI\%project()\fP or
\fI\%enable_language()\fP command called in a project when a new build
tree is first created.  If the \fI\%CMAKE_CONFIGURATION_TYPES\fP
environment variable is set, its value is used.  Otherwise, the default
value is generator\-specific.
.sp
Depending on the situation, the values in this variable may be treated
case\-sensitively or case\-insensitively.  See \fI\%Build Configurations\fP
for discussion of this and other related topics.
.sp
For single\-config generators, see \fI\%CMAKE_BUILD_TYPE\fP\&.
.SS CMAKE_DEPENDS_IN_PROJECT_ONLY
.sp
New in version 3.6.

.sp
When set to \fBTRUE\fP in a directory, the build system produced by the
\fI\%Makefile Generators\fP is set up to only consider dependencies on source
files that appear either in the source or in the binary directories.  Changes
to source files outside of these directories will not cause rebuilds.
.sp
This should be used carefully in cases where some source files are picked up
through external headers during the build.
.SS CMAKE_DISABLE_FIND_PACKAGE_<PackageName>
.sp
Variable for disabling \fI\%find_package()\fP calls.
.sp
Every non\-\fBREQUIRED\fP \fI\%find_package()\fP call in a project can be
disabled by setting the variable
\fBCMAKE_DISABLE_FIND_PACKAGE_<PackageName>\fP to \fBTRUE\fP\&.
This can be used to build a project without an optional package,
although that package is installed.
.sp
This switch should be used during the initial CMake run.  Otherwise if
the package has already been found in a previous CMake run, the
variables which have been stored in the cache will still be there.  In
that case it is recommended to remove the cache variables for this
package from the cache using the cache editor or \fI\%cmake \-U\fP\&.
.sp
Note that this variable can lead to inconsistent results within the project.
Consider the case where a dependency is requested via \fI\%find_package()\fP
from two different places within the project.  If the first call does not
have the \fBREQUIRED\fP keyword, it will not find the dependency when
\fBCMAKE_DISABLE_FIND_PACKAGE_<PackageName>\fP is set to true for that
dependency.  The project will proceed under the assumption that the dependency
isn\(aqt available.  If the second call elsewhere in the project \fIdoes\fP have the
\fBREQUIRED\fP keyword, it can succeed.  Two different parts of the same project
have then seen opposite results for the same dependency.
.sp
See also the \fI\%CMAKE_REQUIRE_FIND_PACKAGE_<PackageName>\fP variable.
.SS CMAKE_ECLIPSE_GENERATE_LINKED_RESOURCES
.sp
New in version 3.6.

.sp
This cache variable is used by the Eclipse project generator.  See
\fI\%cmake\-generators(7)\fP\&.
.sp
The Eclipse project generator generates so\-called linked resources
e.g. to the subproject root dirs in the source tree or to the source files
of targets.
This can be disabled by setting this variable to FALSE.
.SS CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT
.sp
New in version 3.6.

.sp
This cache variable is used by the Eclipse project generator.  See
\fI\%cmake\-generators(7)\fP\&.
.sp
If this variable is set to TRUE, the Eclipse project generator will generate
an Eclipse project in \fI\%CMAKE_SOURCE_DIR\fP . This project can then
be used in Eclipse e.g. for the version control functionality.
\fBCMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT\fP defaults to \fBFALSE\fP; so
nothing is written into the source directory.
.SS CMAKE_ECLIPSE_MAKE_ARGUMENTS
.sp
New in version 3.6.

.sp
This cache variable is used by the Eclipse project generator.  See
\fI\%cmake\-generators(7)\fP\&.
.sp
This variable holds arguments which are used when Eclipse invokes the make
tool. By default it is initialized to hold flags to enable parallel builds
(using \-j typically).
.SS CMAKE_ECLIPSE_RESOURCE_ENCODING
.sp
New in version 3.16.

.sp
This cache variable tells the \fI\%Eclipse CDT4\fP project generator
to set the resource encoding to the given value in generated project files.
If no value is given, no encoding will be set.
.SS CMAKE_ECLIPSE_VERSION
.sp
New in version 3.6.

.sp
This cache variable is used by the Eclipse project generator.  See
\fI\%cmake\-generators(7)\fP\&.
.sp
When using the Eclipse project generator, CMake tries to find the Eclipse
executable and detect the version of it. Depending on the version it finds,
some features are enabled or disabled. If CMake doesn\(aqt find
Eclipse, it assumes the oldest supported version, Eclipse Callisto (3.2).
.SS CMAKE_ERROR_DEPRECATED
.sp
Whether to issue errors for deprecated functionality.
.sp
If \fBTRUE\fP, use of deprecated functionality will issue fatal errors.
If this variable is not set, CMake behaves as if it were set to \fBFALSE\fP\&.
.SS CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION
.sp
Ask \fBcmake_install.cmake\fP script to error out as soon as a file with
absolute \fBINSTALL DESTINATION\fP is encountered.
.sp
The fatal error is emitted before the installation of the offending
file takes place.  This variable is used by CMake\-generated
\fBcmake_install.cmake\fP scripts.  If one sets this variable to \fBON\fP while
running the script, it may get fatal error messages from the script.
.SS CMAKE_EXECUTE_PROCESS_COMMAND_ECHO
.sp
New in version 3.15.

.sp
If this variable is set to \fBSTDERR\fP, \fBSTDOUT\fP or \fBNONE\fP then commands
in \fI\%execute_process()\fP calls will be printed to either stderr or
stdout or not at all.
.SS CMAKE_EXPORT_COMPILE_COMMANDS
.sp
New in version 3.5.

.sp
Enable/Disable output of compile commands during generation.
.sp
If enabled, generates a \fBcompile_commands.json\fP file containing the exact
compiler calls for all translation units of the project in machine\-readable
form.  The format of the JSON file looks like:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
[
  {
    \(dqdirectory\(dq: \(dq/home/user/development/project\(dq,
    \(dqcommand\(dq: \(dq/usr/bin/c++ ... \-c ../foo/foo.cc\(dq,
    \(dqfile\(dq: \(dq../foo/foo.cc\(dq,
    \(dqoutput\(dq: \(dq../foo.dir/foo.cc.o\(dq
  },

  ...

  {
    \(dqdirectory\(dq: \(dq/home/user/development/project\(dq,
    \(dqcommand\(dq: \(dq/usr/bin/c++ ... \-c ../foo/bar.cc\(dq,
    \(dqfile\(dq: \(dq../foo/bar.cc\(dq,
    \(dqoutput\(dq: \(dq../foo.dir/bar.cc.o\(dq
  }
]
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
This is initialized by the \fI\%CMAKE_EXPORT_COMPILE_COMMANDS\fP environment
variable, and initializes the \fI\%EXPORT_COMPILE_COMMANDS\fP target
property for all targets.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
This option is implemented only by \fI\%Makefile Generators\fP
and \fI\%Ninja Generators\fP\&.  It is ignored on other generators.
.sp
This option currently does not work well in combination with
the \fI\%UNITY_BUILD\fP target property or the
\fI\%CMAKE_UNITY_BUILD\fP variable.
.UNINDENT
.UNINDENT
.SS CMAKE_EXPORT_PACKAGE_REGISTRY
.sp
New in version 3.15.

.sp
Enables the \fI\%export(PACKAGE)\fP command when \fI\%CMP0090\fP
is set to \fBNEW\fP\&.
.sp
The \fI\%export(PACKAGE)\fP command does nothing by default.  In some cases
it is desirable to write to the user package registry, so the
\fBCMAKE_EXPORT_PACKAGE_REGISTRY\fP variable may be set to enable it.
.sp
If \fI\%CMP0090\fP is \fInot\fP set to \fBNEW\fP this variable does nothing, and
the \fI\%CMAKE_EXPORT_NO_PACKAGE_REGISTRY\fP variable controls the behavior
instead.
.sp
See also \fI\%Disabling the Package Registry\fP\&.
.SS CMAKE_EXPORT_NO_PACKAGE_REGISTRY
.sp
New in version 3.1.

.sp
Disable the \fI\%export(PACKAGE)\fP command when \fI\%CMP0090\fP
is not set to \fBNEW\fP\&.
.sp
In some cases, for example for packaging and for system wide
installations, it is not desirable to write the user package registry.
If the \fBCMAKE_EXPORT_NO_PACKAGE_REGISTRY\fP variable is enabled,
the \fI\%export(PACKAGE)\fP command will do nothing.
.sp
If \fI\%CMP0090\fP is set to \fBNEW\fP this variable does nothing, and the
\fI\%CMAKE_EXPORT_PACKAGE_REGISTRY\fP variable controls the behavior
instead.
.sp
See also \fI\%Disabling the Package Registry\fP\&.
.SS CMAKE_FIND_APPBUNDLE
.sp
New in version 3.4.

.sp
This variable affects how \fBfind_*\fP commands choose between
macOS Application Bundles and unix\-style package components.
.sp
On Darwin or systems supporting macOS Application Bundles, the
\fBCMAKE_FIND_APPBUNDLE\fP variable can be set to empty or
one of the following:
.INDENT 0.0
.TP
.B \fBFIRST\fP
Try to find application bundles before standard programs.
This is the default on Darwin.
.TP
.B \fBLAST\fP
Try to find application bundles after standard programs.
.TP
.B \fBONLY\fP
Only try to find application bundles.
.TP
.B \fBNEVER\fP
Never try to find application bundles.
.UNINDENT
.SS CMAKE_FIND_FRAMEWORK
.sp
New in version 3.4.

.sp
This variable affects how \fBfind_*\fP commands choose between
macOS Frameworks and unix\-style package components.
.sp
On Darwin or systems supporting macOS Frameworks, the
\fBCMAKE_FIND_FRAMEWORK\fP variable can be set to empty or
one of the following:
.INDENT 0.0
.TP
.B \fBFIRST\fP
Try to find frameworks before standard libraries or headers.
This is the default on Darwin.
.TP
.B \fBLAST\fP
Try to find frameworks after standard libraries or headers.
.TP
.B \fBONLY\fP
Only try to find frameworks.
.TP
.B \fBNEVER\fP
Never try to find frameworks.
.UNINDENT
.SS CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX
.sp
New in version 3.9.

.sp
Specify a \fB<suffix>\fP to tell the \fI\%find_library()\fP command to
search in a \fBlib<suffix>\fP directory before each \fBlib\fP directory that
would normally be searched.
.sp
This overrides the behavior of related global properties:
.INDENT 0.0
.IP \(bu 2
\fI\%FIND_LIBRARY_USE_LIB32_PATHS\fP
.IP \(bu 2
\fI\%FIND_LIBRARY_USE_LIB64_PATHS\fP
.IP \(bu 2
\fI\%FIND_LIBRARY_USE_LIBX32_PATHS\fP
.UNINDENT
.SS CMAKE_FIND_LIBRARY_PREFIXES
.sp
Prefixes to prepend when looking for libraries.
.sp
This specifies what prefixes to add to library names when the
\fI\%find_library()\fP command looks for libraries.  On UNIX systems this is
typically \fBlib\fP, meaning that when trying to find the \fBfoo\fP library it
will look for \fBlibfoo\fP\&.
.SS CMAKE_FIND_LIBRARY_SUFFIXES
.sp
Suffixes to append when looking for libraries.
.sp
This specifies what suffixes to add to library names when the
\fI\%find_library()\fP command looks for libraries.  On Windows systems this
is typically \fB\&.lib\fP and, depending on the compiler, \fB\&.dll.lib\fP, \fB\&.dll.a\fP,
\fB\&.a\fP (e.g. rustc, GCC, or Clang), so when it tries to find the \fBfoo\fP
library, it will look for \fB[<prefix>]foo[.dll].lib\fP and/or
\fB[<prefix>]foo[.dll].a\fP, depending on the compiler used and the \fB<prefix>\fP
specified in the \fI\%CMAKE_FIND_LIBRARY_PREFIXES\fP\&.
.SS CMAKE_FIND_NO_INSTALL_PREFIX
.sp
Exclude the values of the \fI\%CMAKE_INSTALL_PREFIX\fP and
\fI\%CMAKE_STAGING_PREFIX\fP variables from
\fI\%CMAKE_SYSTEM_PREFIX_PATH\fP\&.  CMake adds these project\-destination
prefixes to \fI\%CMAKE_SYSTEM_PREFIX_PATH\fP by default in order to
support building a series of dependent packages and installing them into
a common prefix.  Set \fBCMAKE_FIND_NO_INSTALL_PREFIX\fP to \fBTRUE\fP
to suppress this behavior.
.sp
The \fI\%CMAKE_SYSTEM_PREFIX_PATH\fP is initialized on the first call to a
\fI\%project()\fP or \fI\%enable_language()\fP command.  Therefore one must
set \fBCMAKE_FIND_NO_INSTALL_PREFIX\fP before this in order to take effect.  A
user may set the variable as a cache entry on the command line to achieve this.
.sp
Note that the prefix(es) may still be searched for other reasons, such as being
the same prefix as the CMake installation, or for being a built\-in system
prefix.
.SS CMAKE_FIND_PACKAGE_PREFER_CONFIG
.sp
New in version 3.15.

.sp
Tell \fI\%find_package()\fP to try \(dqConfig\(dq mode before \(dqModule\(dq mode if no
mode was specified.
.sp
The command \fI\%find_package()\fP operates without an explicit mode when
the reduced signature is used without the \fBMODULE\fP option. In this case,
by default, CMake first tries Module mode by searching for a
\fBFind<pkg>.cmake\fP module.  If it fails, CMake then searches for the package
using Config mode.
.sp
Set \fBCMAKE_FIND_PACKAGE_PREFER_CONFIG\fP to \fBTRUE\fP to tell
\fI\%find_package()\fP to first search using Config mode before falling back
to Module mode.
.sp
This variable may be useful when a developer has compiled a custom version of
a common library and wishes to link it to a dependent project.  If this
variable is set to \fBTRUE\fP, it would prevent a dependent project\(aqs call
to \fI\%find_package()\fP from selecting the default library located by the
system\(aqs \fBFind<pkg>.cmake\fP module before finding the developer\(aqs custom
built library.
.sp
Once this variable is set, it is the responsibility of the exported
\fB<pkg>Config.cmake\fP files to provide the same result variables as the
\fBFind<pkg>.cmake\fP modules so that dependent projects can use them
interchangeably.
.SS CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS
.sp
New in version 3.14.

.sp
Set to \fBTRUE\fP to tell \fI\%find_package()\fP calls to resolve symbolic
links in the value of \fB<PackageName>_DIR\fP\&.
.sp
This is helpful in use cases where the package search path points at a
proxy directory in which symlinks to the real package locations appear.
This is not enabled by default because there are also common use cases
in which the symlinks should be preserved.
.SS CMAKE_FIND_PACKAGE_TARGETS_GLOBAL
.sp
New in version 3.24.

.sp
Setting to \fBTRUE\fP promotes all \fI\%IMPORTED\fP targets discoverd
by \fI\%find_package()\fP to a \fBGLOBAL\fP scope.
.sp
Setting this to \fBTRUE\fP is akin to specifying \fBGLOBAL\fP
as an argument to \fI\%find_package()\fP\&.
Default value is \fBOFF\fP\&.
.SS CMAKE_FIND_PACKAGE_WARN_NO_MODULE
.sp
Tell \fI\%find_package()\fP to warn if called without an explicit mode.
.sp
If \fI\%find_package()\fP is called without an explicit mode option
(\fBMODULE\fP, \fBCONFIG\fP, or \fBNO_MODULE\fP) and no \fBFind<pkg>.cmake\fP module
is in \fI\%CMAKE_MODULE_PATH\fP then CMake implicitly assumes that the
caller intends to search for a package configuration file.  If no package
configuration file is found then the wording of the failure message
must account for both the case that the package is really missing and
the case that the project has a bug and failed to provide the intended
Find module.  If instead the caller specifies an explicit mode option
then the failure message can be more specific.
.sp
Set \fBCMAKE_FIND_PACKAGE_WARN_NO_MODULE\fP to \fBTRUE\fP to tell
\fI\%find_package()\fP to warn when it implicitly assumes Config mode.  This
helps developers enforce use of an explicit mode in all calls to
\fI\%find_package()\fP within a project.
.sp
This variable has no effect if \fI\%CMAKE_FIND_PACKAGE_PREFER_CONFIG\fP is
set to \fBTRUE\fP\&.
.SS CMAKE_FIND_ROOT_PATH
.sp
\fI\%Semicolon\-separated list\fP of root paths to search on the filesystem.
.sp
This variable is most useful when cross\-compiling. CMake uses the paths in
this list as alternative roots to find filesystem items with
\fI\%find_package()\fP, \fI\%find_library()\fP etc.
.SS CMAKE_FIND_ROOT_PATH_MODE_INCLUDE
.sp
This variable controls whether the \fI\%CMAKE_FIND_ROOT_PATH\fP and
\fI\%CMAKE_SYSROOT\fP are used by \fI\%find_file()\fP and \fI\%find_path()\fP\&.
.sp
If set to \fBONLY\fP, then only the roots in \fI\%CMAKE_FIND_ROOT_PATH\fP
will be searched. If set to \fBNEVER\fP, then the roots in
\fI\%CMAKE_FIND_ROOT_PATH\fP will be ignored and only the host system
root will be used. If set to \fBBOTH\fP, then the host system paths and the
paths in \fI\%CMAKE_FIND_ROOT_PATH\fP will be searched.
.SS CMAKE_FIND_ROOT_PATH_MODE_LIBRARY
.sp
This variable controls whether the \fI\%CMAKE_FIND_ROOT_PATH\fP and
\fI\%CMAKE_SYSROOT\fP are used by \fI\%find_library()\fP\&.
.sp
If set to \fBONLY\fP, then only the roots in \fI\%CMAKE_FIND_ROOT_PATH\fP
will be searched. If set to \fBNEVER\fP, then the roots in
\fI\%CMAKE_FIND_ROOT_PATH\fP will be ignored and only the host system
root will be used. If set to \fBBOTH\fP, then the host system paths and the
paths in \fI\%CMAKE_FIND_ROOT_PATH\fP will be searched.
.SS CMAKE_FIND_ROOT_PATH_MODE_PACKAGE
.sp
This variable controls whether the \fI\%CMAKE_FIND_ROOT_PATH\fP and
\fI\%CMAKE_SYSROOT\fP are used by \fI\%find_package()\fP\&.
.sp
If set to \fBONLY\fP, then only the roots in \fI\%CMAKE_FIND_ROOT_PATH\fP
will be searched. If set to \fBNEVER\fP, then the roots in
\fI\%CMAKE_FIND_ROOT_PATH\fP will be ignored and only the host system
root will be used. If set to \fBBOTH\fP, then the host system paths and the
paths in \fI\%CMAKE_FIND_ROOT_PATH\fP will be searched.
.SS CMAKE_FIND_ROOT_PATH_MODE_PROGRAM
.sp
This variable controls whether the \fI\%CMAKE_FIND_ROOT_PATH\fP and
\fI\%CMAKE_SYSROOT\fP are used by \fI\%find_program()\fP\&.
.sp
If set to \fBONLY\fP, then only the roots in \fI\%CMAKE_FIND_ROOT_PATH\fP
will be searched. If set to \fBNEVER\fP, then the roots in
\fI\%CMAKE_FIND_ROOT_PATH\fP will be ignored and only the host system
root will be used. If set to \fBBOTH\fP, then the host system paths and the
paths in \fI\%CMAKE_FIND_ROOT_PATH\fP will be searched.
.SS CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH
.sp
New in version 3.16.

.sp
Controls the default behavior of the following commands for whether or not to
search paths provided by cmake\-specific environment variables:
.INDENT 0.0
.IP \(bu 2
\fI\%find_program()\fP
.IP \(bu 2
\fI\%find_library()\fP
.IP \(bu 2
\fI\%find_file()\fP
.IP \(bu 2
\fI\%find_path()\fP
.IP \(bu 2
\fI\%find_package()\fP
.UNINDENT
.sp
This is useful in cross\-compiling environments.
.sp
By default this variable is not set, which is equivalent to it having
a value of \fBTRUE\fP\&.  Explicit options given to the above commands
take precedence over this variable.
.sp
See also the \fI\%CMAKE_FIND_USE_CMAKE_PATH\fP,
\fI\%CMAKE_FIND_USE_CMAKE_SYSTEM_PATH\fP,
\fI\%CMAKE_FIND_USE_INSTALL_PREFIX\fP,
\fI\%CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH\fP,
\fI\%CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY\fP,
\fI\%CMAKE_FIND_USE_PACKAGE_REGISTRY\fP,
and \fI\%CMAKE_FIND_USE_PACKAGE_ROOT_PATH\fP variables.
.SS CMAKE_FIND_USE_CMAKE_PATH
.sp
New in version 3.16.

.sp
Controls the default behavior of the following commands for whether or not to
search paths provided by cmake\-specific cache variables:
.INDENT 0.0
.IP \(bu 2
\fI\%find_program()\fP
.IP \(bu 2
\fI\%find_library()\fP
.IP \(bu 2
\fI\%find_file()\fP
.IP \(bu 2
\fI\%find_path()\fP
.IP \(bu 2
\fI\%find_package()\fP
.UNINDENT
.sp
This is useful in cross\-compiling environments.
.sp
By default this variable is not set, which is equivalent to it having
a value of \fBTRUE\fP\&.  Explicit options given to the above commands
take precedence over this variable.
.sp
See also the \fI\%CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH\fP,
\fI\%CMAKE_FIND_USE_CMAKE_SYSTEM_PATH\fP,
\fI\%CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH\fP,
\fI\%CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY\fP,
\fI\%CMAKE_FIND_USE_PACKAGE_REGISTRY\fP,
and \fI\%CMAKE_FIND_USE_PACKAGE_ROOT_PATH\fP variables.
.SS CMAKE_FIND_USE_CMAKE_SYSTEM_PATH
.sp
New in version 3.16.

.sp
Controls the default behavior of the following commands for whether or not to
search paths provided by platform\-specific cmake variables:
.INDENT 0.0
.IP \(bu 2
\fI\%find_program()\fP
.IP \(bu 2
\fI\%find_library()\fP
.IP \(bu 2
\fI\%find_file()\fP
.IP \(bu 2
\fI\%find_path()\fP
.IP \(bu 2
\fI\%find_package()\fP
.UNINDENT
.sp
This is useful in cross\-compiling environments.
.sp
By default this variable is not set, which is equivalent to it having
a value of \fBTRUE\fP\&.  Explicit options given to the above commands
take precedence over this variable.
.sp
See also the \fI\%CMAKE_FIND_USE_CMAKE_PATH\fP,
\fI\%CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH\fP,
\fI\%CMAKE_FIND_USE_INSTALL_PREFIX\fP,
\fI\%CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH\fP,
\fI\%CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY\fP,
\fI\%CMAKE_FIND_USE_PACKAGE_REGISTRY\fP,
and \fI\%CMAKE_FIND_USE_PACKAGE_ROOT_PATH\fP variables.
.SS CMAKE_FIND_USE_INSTALL_PREFIX
.sp
New in version 3.24.

.sp
Controls the default behavior of the following commands for whether or not to
search the locations in the \fI\%CMAKE_INSTALL_PREFIX\fP and
\fI\%CMAKE_STAGING_PREFIX\fP variables.
.INDENT 0.0
.IP \(bu 2
\fI\%find_program()\fP
.IP \(bu 2
\fI\%find_library()\fP
.IP \(bu 2
\fI\%find_file()\fP
.IP \(bu 2
\fI\%find_path()\fP
.IP \(bu 2
\fI\%find_package()\fP
.UNINDENT
.sp
This is useful in cross\-compiling environments.
.sp
Due to backwards compatibility with \fI\%CMAKE_FIND_NO_INSTALL_PREFIX\fP,
the behavior of the find command change based on if this variable exists.
.TS
center;
|l|l|l|.
_
T{
CMAKE_FIND_USE_INSTALL_PREFIX
T}	T{
CMAKE_FIND_NO_INSTALL_PREFIX
T}	T{
Search
T}
_
T{
Not Defined
T}	T{
On
T}	T{
NO
T}
_
T{
Not Defined
T}	T{
Off || Not Defined
T}	T{
YES
T}
_
T{
Off
T}	T{
On
T}	T{
NO
T}
_
T{
Off
T}	T{
Off || Not Defined
T}	T{
NO
T}
_
T{
On
T}	T{
On
T}	T{
YES
T}
_
T{
On
T}	T{
Off || Not Defined
T}	T{
YES
T}
_
.TE
.sp
By default this variable is not defined. Explicit options given to the above
commands take precedence over this variable.
.sp
See also the \fI\%CMAKE_FIND_USE_CMAKE_PATH\fP,
\fI\%CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH\fP,
\fI\%CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH\fP,
\fI\%CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY\fP,
\fI\%CMAKE_FIND_USE_PACKAGE_REGISTRY\fP,
and \fI\%CMAKE_FIND_USE_PACKAGE_ROOT_PATH\fP variables.
.SS CMAKE_FIND_USE_PACKAGE_REGISTRY
.sp
New in version 3.16.

.sp
Controls the default behavior of the \fI\%find_package()\fP command for
whether or not to search paths provided by the \fI\%User Package Registry\fP\&.
.sp
By default this variable is not set and the behavior will fall back
to that determined by the deprecated
\fI\%CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY\fP variable.  If that is
also not set, then \fI\%find_package()\fP will use the
\fI\%User Package Registry\fP unless the \fBNO_CMAKE_PACKAGE_REGISTRY\fP option
is provided.
.sp
This variable takes precedence over
\fI\%CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY\fP when both are set.
.sp
In some cases, for example to locate only system wide installations, it
is not desirable to use the \fI\%User Package Registry\fP when searching
for packages.  If the \fBCMAKE_FIND_USE_PACKAGE_REGISTRY\fP
variable is \fBFALSE\fP, all the \fI\%find_package()\fP commands will skip
the \fI\%User Package Registry\fP as if they were called with the
\fBNO_CMAKE_PACKAGE_REGISTRY\fP argument.
.sp
See also \fI\%Disabling the Package Registry\fP and the
\fI\%CMAKE_FIND_USE_CMAKE_PATH\fP,
\fI\%CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH\fP,
\fI\%CMAKE_FIND_USE_INSTALL_PREFIX\fP,
\fI\%CMAKE_FIND_USE_CMAKE_SYSTEM_PATH\fP,
\fI\%CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH\fP,
\fI\%CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY\fP,
and \fI\%CMAKE_FIND_USE_PACKAGE_ROOT_PATH\fP variables.
.SS CMAKE_FIND_USE_PACKAGE_ROOT_PATH
.sp
New in version 3.16.

.sp
Controls the default behavior of the following commands for whether or not to
search paths provided by \fI\%<PackageName>_ROOT\fP variables:
.INDENT 0.0
.IP \(bu 2
\fI\%find_program()\fP
.IP \(bu 2
\fI\%find_library()\fP
.IP \(bu 2
\fI\%find_file()\fP
.IP \(bu 2
\fI\%find_path()\fP
.IP \(bu 2
\fI\%find_package()\fP
.UNINDENT
.sp
By default this variable is not set, which is equivalent to it having
a value of \fBTRUE\fP\&.  Explicit options given to the above commands
take precedence over this variable.
.sp
See also the \fI\%CMAKE_FIND_USE_CMAKE_PATH\fP,
\fI\%CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH\fP,
\fI\%CMAKE_FIND_USE_INSTALL_PREFIX\fP,
\fI\%CMAKE_FIND_USE_CMAKE_SYSTEM_PATH\fP,
\fI\%CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH\fP,
\fI\%CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY\fP,
and \fI\%CMAKE_FIND_USE_PACKAGE_REGISTRY\fP variables.
.SS CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH
.sp
New in version 3.16.

.sp
Controls the default behavior of the following commands for whether or not to
search paths provided by standard system environment variables:
.INDENT 0.0
.IP \(bu 2
\fI\%find_program()\fP
.IP \(bu 2
\fI\%find_library()\fP
.IP \(bu 2
\fI\%find_file()\fP
.IP \(bu 2
\fI\%find_path()\fP
.IP \(bu 2
\fI\%find_package()\fP
.UNINDENT
.sp
This is useful in cross\-compiling environments.
.sp
By default this variable is not set, which is equivalent to it having
a value of \fBTRUE\fP\&.  Explicit options given to the above commands
take precedence over this variable.
.sp
See also the \fI\%CMAKE_FIND_USE_CMAKE_PATH\fP,
\fI\%CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH\fP,
\fI\%CMAKE_FIND_USE_INSTALL_PREFIX\fP,
\fI\%CMAKE_FIND_USE_CMAKE_SYSTEM_PATH\fP,
\fI\%CMAKE_FIND_USE_PACKAGE_REGISTRY\fP,
\fI\%CMAKE_FIND_USE_PACKAGE_ROOT_PATH\fP,
and \fI\%CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY\fP variables.
.SS CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY
.sp
New in version 3.16.

.sp
Controls searching the \fI\%System Package Registry\fP by the
\fI\%find_package()\fP command.
.sp
By default this variable is not set and the behavior will fall back
to that determined by the deprecated
\fI\%CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY\fP variable.
If that is also not set, then \fI\%find_package()\fP will use the
\fI\%System Package Registry\fP unless the \fBNO_CMAKE_SYSTEM_PACKAGE_REGISTRY\fP
option is provided.
.sp
This variable takes precedence over
\fI\%CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY\fP when both are set.
.sp
In some cases, for example to locate only user specific installations, it
is not desirable to use the \fI\%System Package Registry\fP when searching
for packages. If the \fBCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY\fP
variable is \fBFALSE\fP, all the \fI\%find_package()\fP commands will skip
the \fI\%System Package Registry\fP as if they were called with the
\fBNO_CMAKE_SYSTEM_PACKAGE_REGISTRY\fP argument.
.sp
See also \fI\%Disabling the Package Registry\fP\&.
.sp
See also the \fI\%CMAKE_FIND_USE_CMAKE_PATH\fP,
\fI\%CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH\fP,
\fI\%CMAKE_FIND_USE_INSTALL_PREFIX\fP,
\fI\%CMAKE_FIND_USE_CMAKE_SYSTEM_PATH\fP,
\fI\%CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH\fP,
\fI\%CMAKE_FIND_USE_PACKAGE_REGISTRY\fP,
and \fI\%CMAKE_FIND_USE_PACKAGE_ROOT_PATH\fP variables.
.SS CMAKE_FRAMEWORK_PATH
.sp
\fI\%Semicolon\-separated list\fP of directories specifying a search path
for macOS frameworks used by the \fI\%find_library()\fP,
\fI\%find_package()\fP, \fI\%find_path()\fP, and \fI\%find_file()\fP
commands.
.sp
There is also an environment variable \fI\%CMAKE_FRAMEWORK_PATH\fP, which is used
as an additional list of search directories.
.SS CMAKE_IGNORE_PATH
.sp
\fI\%Semicolon\-separated list\fP of directories
to be ignored by the various \fBfind...()\fP commands.
.sp
For \fI\%find_program()\fP, \fI\%find_library()\fP, \fI\%find_file()\fP,
and \fI\%find_path()\fP, any file found in one of the listed directories
will be ignored. The listed directories do not apply recursively, so any
subdirectories to be ignored must also be explicitly listed.
\fBCMAKE_IGNORE_PATH\fP does not affect the search \fIprefixes\fP used by these
four commands. To ignore individual paths under a search prefix
(e.g. \fBbin\fP, \fBinclude\fP, \fBlib\fP, etc.), each path must be listed in
\fBCMAKE_IGNORE_PATH\fP as a full absolute path. \fI\%CMAKE_IGNORE_PREFIX_PATH\fP
provides a more appropriate way to ignore a whole search prefix.
.sp
\fI\%find_package()\fP is also affected by \fBCMAKE_IGNORE_PATH\fP, but only
for \fIConfig mode\fP searches. Any \fB<Name>Config.cmake\fP or
\fB<name>\-config.cmake\fP file found in one of the specified directories
will be ignored. In addition, any search \fIprefix\fP found in \fBCMAKE_IGNORE_PATH\fP
will be skipped for backward compatibility reasons, but new code should
prefer to use \fI\%CMAKE_IGNORE_PREFIX_PATH\fP to ignore prefixes instead.
.sp
Ignoring search locations can be useful in cross\-compiling environments where
some system directories contain incompatible but possibly linkable libraries.
For example, on cross\-compiled cluster environments, this allows a user to
ignore directories containing libraries meant for the front\-end machine.
.sp
By default, \fBCMAKE_IGNORE_PATH\fP is empty. It is intended to be set by the
project or the end user.
.sp
See also the following variables:
.INDENT 0.0
.IP \(bu 2
\fI\%CMAKE_IGNORE_PREFIX_PATH\fP
.IP \(bu 2
\fI\%CMAKE_SYSTEM_IGNORE_PATH\fP
.IP \(bu 2
\fI\%CMAKE_PREFIX_PATH\fP
.IP \(bu 2
\fI\%CMAKE_LIBRARY_PATH\fP
.IP \(bu 2
\fI\%CMAKE_INCLUDE_PATH\fP
.IP \(bu 2
\fI\%CMAKE_PROGRAM_PATH\fP
.UNINDENT
.SS CMAKE_IGNORE_PREFIX_PATH
.sp
New in version 3.23.

.sp
\fI\%Semicolon\-separated list\fP of search \fIprefixes\fP
to be ignored by the \fI\%find_program()\fP, \fI\%find_library()\fP,
\fI\%find_file()\fP, and \fI\%find_path()\fP commands.
The prefixes are also ignored by the \fIConfig mode\fP of the
\fI\%find_package()\fP command (\fIModule mode\fP is unaffected).
To ignore specific directories instead, see \fI\%CMAKE_IGNORE_PATH\fP\&.
.sp
Ignoring search locations can be useful in cross\-compiling environments where
some system directories contain incompatible but possibly linkable libraries.
For example, on cross\-compiled cluster environments, this allows a user to
ignore directories containing libraries meant for the front\-end machine.
.sp
By default, \fBCMAKE_IGNORE_PREFIX_PATH\fP is empty. It is intended to be set by the
project or the end user.
.sp
See also the following variables:
.INDENT 0.0
.IP \(bu 2
\fI\%CMAKE_IGNORE_PATH\fP
.IP \(bu 2
\fI\%CMAKE_SYSTEM_IGNORE_PREFIX_PATH\fP
.IP \(bu 2
\fI\%CMAKE_PREFIX_PATH\fP
.IP \(bu 2
\fI\%CMAKE_LIBRARY_PATH\fP
.IP \(bu 2
\fI\%CMAKE_INCLUDE_PATH\fP
.IP \(bu 2
\fI\%CMAKE_PROGRAM_PATH\fP
.UNINDENT
.SS CMAKE_INCLUDE_DIRECTORIES_BEFORE
.sp
Whether to append or prepend directories by default in
\fI\%include_directories()\fP\&.
.sp
This variable affects the default behavior of the \fI\%include_directories()\fP
command.  Setting this variable to \fBON\fP is equivalent to using the \fBBEFORE\fP
option in all uses of that command.
.SS CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE
.sp
Whether to force prepending of project include directories.
.sp
This variable affects the order of include directories generated in compiler
command lines.  If set to \fBON\fP, it causes the \fI\%CMAKE_SOURCE_DIR\fP
and the \fI\%CMAKE_BINARY_DIR\fP to appear first.
.SS CMAKE_INCLUDE_PATH
.sp
\fI\%Semicolon\-separated list\fP of directories specifying a search path
for the \fI\%find_file()\fP and \fI\%find_path()\fP commands.  By default it
is empty, it is intended to be set by the project.
.sp
There is also an environment variable \fI\%CMAKE_INCLUDE_PATH\fP, which is used
as an additional list of search directories.
.sp
See also \fI\%CMAKE_SYSTEM_INCLUDE_PATH\fP and \fI\%CMAKE_PREFIX_PATH\fP\&.
.SS CMAKE_INSTALL_DEFAULT_COMPONENT_NAME
.sp
Default component used in \fI\%install()\fP commands.
.sp
If an \fI\%install()\fP command is used without the \fBCOMPONENT\fP argument,
these files will be grouped into a default component.  The name of this
default install component will be taken from this variable.  It
defaults to \fBUnspecified\fP\&.
.SS CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS
.sp
New in version 3.11.

.sp
Default permissions for directories created implicitly during installation
of files by \fI\%install()\fP and \fI\%file(INSTALL)\fP\&.
.sp
If \fBmake install\fP is invoked and directories are implicitly created they
get permissions set by \fBCMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS\fP
variable or platform specific default permissions if the variable is not set.
.sp
Implicitly created directories are created if they are not explicitly installed
by \fI\%install()\fP command but are needed to install a file on a certain
path. Example of such locations are directories created due to the setting of
\fI\%CMAKE_INSTALL_PREFIX\fP\&.
.sp
Expected content of the \fBCMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS\fP
variable is a list of permissions that can be used by \fI\%install()\fP command
\fIPERMISSIONS\fP section.
.sp
Example usage:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
set(CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS
     OWNER_READ
     OWNER_WRITE
     OWNER_EXECUTE
     GROUP_READ
   )
.ft P
.fi
.UNINDENT
.UNINDENT
.SS CMAKE_INSTALL_MESSAGE
.sp
New in version 3.1.

.sp
Specify verbosity of installation script code generated by the
\fI\%install()\fP command (using the \fI\%file(INSTALL)\fP command).
For paths that are newly installed or updated, installation
may print lines like:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
\-\- Installing: /some/destination/path
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
For paths that are already up to date, installation may print
lines like:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
\-\- Up\-to\-date: /some/destination/path
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
The \fBCMAKE_INSTALL_MESSAGE\fP variable may be set to control
which messages are printed:
.INDENT 0.0
.TP
.B \fBALWAYS\fP
Print both \fBInstalling\fP and \fBUp\-to\-date\fP messages.
.TP
.B \fBLAZY\fP
Print \fBInstalling\fP but not \fBUp\-to\-date\fP messages.
.TP
.B \fBNEVER\fP
Print neither \fBInstalling\fP nor \fBUp\-to\-date\fP messages.
.UNINDENT
.sp
Other values have undefined behavior and may not be diagnosed.
.sp
If this variable is not set, the default behavior is \fBALWAYS\fP\&.
.SS CMAKE_INSTALL_PREFIX
.sp
Install directory used by \fI\%install()\fP\&.
.sp
If \fBmake install\fP is invoked or \fBINSTALL\fP is built, this directory is
prepended onto all install directories.
.sp
This variable defaults as follows:
.INDENT 0.0
.IP \(bu 2
New in version 3.29: If the \fI\%CMAKE_INSTALL_PREFIX\fP environment variable is set,
its value is used as default for this variable.

.IP \(bu 2
\fBc:/Program Files/${PROJECT_NAME}\fP on Windows.
.IP \(bu 2
\fB/usr/local\fP on UNIX platforms.
.UNINDENT
.sp
See \fI\%CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT\fP for how a
project might choose its own default.
.sp
On UNIX one can use the \fBDESTDIR\fP mechanism in order to relocate the
whole installation to a staging area.  See the \fI\%DESTDIR\fP environment
variable for more information.
.sp
The installation prefix is also added to \fI\%CMAKE_SYSTEM_PREFIX_PATH\fP
so that \fI\%find_package()\fP, \fI\%find_program()\fP,
\fI\%find_library()\fP, \fI\%find_path()\fP, and \fI\%find_file()\fP
will search the prefix for other software. This behavior can be disabled by
setting the \fI\%CMAKE_FIND_NO_INSTALL_PREFIX\fP to \fBTRUE\fP before the
first \fI\%project()\fP invocation.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
Use the \fI\%GNUInstallDirs\fP module to provide GNU\-style
options for the layout of directories within the installation.
.UNINDENT
.UNINDENT
.sp
The \fBCMAKE_INSTALL_PREFIX\fP may be defined when configuring a build tree
to set its installation prefix.  Or, when using the \fI\%cmake(1)\fP
command\-line tool\(aqs \fI\%\-\-install\fP mode, one may specify
a different prefix using the \fI\%\-\-prefix\fP
option:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
cmake \-\-install . \-\-prefix /my/install/prefix
.ft P
.fi
.UNINDENT
.UNINDENT
.SS CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT
.sp
New in version 3.7.1.

.sp
CMake sets this variable to a \fBTRUE\fP value when the
\fI\%CMAKE_INSTALL_PREFIX\fP has just been initialized to
its default value, typically on the first
run of CMake within a new build tree and the \fI\%CMAKE_INSTALL_PREFIX\fP
environment variable is not set on the first run of CMake. This can be used
by project code to change the default without overriding a user\-provided value:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
  set(CMAKE_INSTALL_PREFIX \(dq/my/default\(dq CACHE PATH \(dq...\(dq FORCE)
endif()
.ft P
.fi
.UNINDENT
.UNINDENT
.SS CMAKE_KATE_FILES_MODE
.sp
New in version 3.27.

.sp
This cache variable is used by the Kate project generator and controls
to what mode the \fBfiles\fP entry in the project file will be set.  See
\fI\%cmake\-generators(7)\fP\&.
.sp
Possible values are \fBAUTO\fP, \fBSVN\fP, \fBGIT\fP, \fBHG\fP, \fBFOSSIL\fP and \fBLIST\fP\&.
.sp
When set to \fBLIST\fP, CMake will put the list of source files known to CMake
in the project file.
When set to \fBSVN\fP, \fBGIT\fP, \fBHG\fP or \fBFOSSIL\fP, CMake will set
the generated project accordingly to Subversion, git, Mercurial
or Fossil, and Kate will then use the respective command line tool to
retrieve the list of files in the project.
When unset or set to \fBAUTO\fP, CMake will try to detect whether the
source directory is part of a git or svn checkout or not, and put the
respective entry into the project file.
.SS CMAKE_KATE_MAKE_ARGUMENTS
.sp
New in version 3.0.

.sp
This cache variable is used by the Kate project generator.  See
\fI\%cmake\-generators(7)\fP\&.
.sp
This variable holds arguments which are used when Kate invokes the make
tool. By default it is initialized to hold flags to enable parallel builds
(using \-j typically).
.SS CMAKE_LIBRARY_PATH
.sp
\fI\%Semicolon\-separated list\fP of directories specifying a search path
for the \fI\%find_library()\fP command.  By default it is empty, it is
intended to be set by the project.
.sp
There is also an environment variable \fI\%CMAKE_LIBRARY_PATH\fP, which is used
as an additional list of search directories.
.sp
See also \fI\%CMAKE_SYSTEM_LIBRARY_PATH\fP and \fI\%CMAKE_PREFIX_PATH\fP\&.
.SS CMAKE_LINK_DIRECTORIES_BEFORE
.sp
New in version 3.13.

.sp
Whether to append or prepend directories by default in
\fI\%link_directories()\fP\&.
.sp
This variable affects the default behavior of the \fI\%link_directories()\fP
command.  Setting this variable to \fBON\fP is equivalent to using the \fBBEFORE\fP
option in all uses of that command.
.SS CMAKE_LINK_LIBRARIES_ONLY_TARGETS
.sp
New in version 3.23.

.sp
Set this variable to initialize the \fI\%LINK_LIBRARIES_ONLY_TARGETS\fP
property of non\-imported targets when they are created.  Setting it to true
enables an additional check that all items named by
\fI\%target_link_libraries()\fP that can be target names are actually names
of existing targets.  See the target property documentation for details.
.SS CMAKE_MAXIMUM_RECURSION_DEPTH
.sp
New in version 3.14.

.sp
Maximum recursion depth for CMake scripts. It is intended to be set on the
command line with \fB\-DCMAKE_MAXIMUM_RECURSION_DEPTH=<x>\fP, or within
\fBCMakeLists.txt\fP 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:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
# About to perform deeply recursive actions
if(NOT CMAKE_MAXIMUM_RECURSION_DEPTH)
  set(CMAKE_MAXIMUM_RECURSION_DEPTH 2000)
endif()
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
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.
.sp
Calling any of the following commands increases the recursion depth:
.INDENT 0.0
.IP \(bu 2
\fI\%include()\fP
.IP \(bu 2
\fI\%find_package()\fP
.IP \(bu 2
\fI\%add_subdirectory()\fP
.IP \(bu 2
\fI\%try_compile()\fP
.IP \(bu 2
\fI\%ctest_read_custom_files()\fP
.IP \(bu 2
\fI\%ctest_run_script()\fP (unless \fBNEW_PROCESS\fP is specified)
.IP \(bu 2
User\-defined \fI\%function()\fP\(aqs and \fI\%macro()\fP\(aqs (note that
\fI\%function()\fP and \fI\%macro()\fP themselves don\(aqt increase recursion
depth)
.IP \(bu 2
Reading or writing variables that are being watched by a
\fI\%variable_watch()\fP
.UNINDENT
.sp
See also the \fI\%CMAKE_MAXIMUM_RECURSION_DEPTH\fP environment variable.
.SS CMAKE_MESSAGE_CONTEXT
.sp
New in version 3.17.

.sp
When enabled by the \fI\%cmake \-\-log\-context\fP command line
option or the \fI\%CMAKE_MESSAGE_CONTEXT_SHOW\fP variable, the
\fI\%message()\fP command converts the \fBCMAKE_MESSAGE_CONTEXT\fP list into a
dot\-separated string surrounded by square brackets and prepends it to each line
for messages of log levels \fBNOTICE\fP and below.
.sp
For logging contexts to work effectively, projects should generally
\fBAPPEND\fP and \fBPOP_BACK\fP an item to the current value of
\fBCMAKE_MESSAGE_CONTEXT\fP 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).
.sp
\fBWARNING:\fP
.INDENT 0.0
.INDENT 3.5
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 \fBcmake_\fP are also reserved for use by CMake and
should not be used by projects.
.UNINDENT
.UNINDENT
.sp
Example:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
function(bar)
  list(APPEND CMAKE_MESSAGE_CONTEXT \(dqbar\(dq)
  message(VERBOSE \(dqbar VERBOSE message\(dq)
endfunction()

function(baz)
  list(APPEND CMAKE_MESSAGE_CONTEXT \(dqbaz\(dq)
  message(DEBUG \(dqbaz DEBUG message\(dq)
endfunction()

function(foo)
  list(APPEND CMAKE_MESSAGE_CONTEXT \(dqfoo\(dq)
  bar()
  message(TRACE \(dqfoo TRACE message\(dq)
  baz()
endfunction()

list(APPEND CMAKE_MESSAGE_CONTEXT \(dqtop\(dq)

message(VERBOSE \(dqBefore \(gafoo\(ga\(dq)
foo()
message(VERBOSE \(dqAfter \(gafoo\(ga\(dq)

list(POP_BACK CMAKE_MESSAGE_CONTEXT)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Which results in the following output:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
\-\- [top] Before \(gafoo\(ga
\-\- [top.foo.bar] bar VERBOSE message
\-\- [top.foo] foo TRACE message
\-\- [top.foo.baz] baz DEBUG message
\-\- [top] After \(gafoo\(ga
.ft P
.fi
.UNINDENT
.UNINDENT
.SS CMAKE_MESSAGE_CONTEXT_SHOW
.sp
New in version 3.17.

.sp
Setting this variable to true enables showing a context with each line
logged by the \fI\%message()\fP command (see \fI\%CMAKE_MESSAGE_CONTEXT\fP
for how the context itself is specified).
.sp
This variable is an alternative to providing the \fB\-\-log\-context\fP option
on the \fI\%cmake\fP command line.  Whereas the command line
option will apply only to that one CMake run, setting
\fBCMAKE_MESSAGE_CONTEXT_SHOW\fP to true as a cache variable will ensure that
subsequent CMake runs will continue to show the message context.
.sp
Projects should not set \fBCMAKE_MESSAGE_CONTEXT_SHOW\fP\&.  It is intended for
users so that they may control whether or not to include context with messages.
.SS CMAKE_MESSAGE_INDENT
.sp
New in version 3.16.

.sp
The \fI\%message()\fP command joins the strings from this list and for
log levels of \fBNOTICE\fP and below, it prepends the resultant string to
each line of the message.
.sp
Example:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
list(APPEND listVar one two three)

message(VERBOSE [[Collected items in the \(dqlistVar\(dq:]])
list(APPEND CMAKE_MESSAGE_INDENT \(dq  \(dq)

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

list(POP_BACK CMAKE_MESSAGE_INDENT)
message(VERBOSE \(dqNo more indent\(dq)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Which results in the following output:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
\-\- Collected items in the \(dqlistVar\(dq:
\-\-   one
\-\-   two
\-\-   three
\-\- No more indent
.ft P
.fi
.UNINDENT
.UNINDENT
.SS CMAKE_MESSAGE_LOG_LEVEL
.sp
New in version 3.17.

.sp
When set, this variable specifies the logging level used by the
\fI\%message()\fP command.  Valid values are the same as those for the
\fI\%\-\-log\-level\fP command line option of the
\fI\%cmake(1)\fP program.  If this variable is set and the
\fI\%\-\-log\-level\fP command line option is
given, the command line option takes precedence.
.sp
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.
.sp
Projects should not set this variable, it is intended for users so that
they may control the log level according to their own needs.
.sp
New in version 3.25: See the \fI\%cmake_language()\fP
\fI\%cmake_language\fP command for a way to query
the current message logging level.

.SS CMAKE_MFC_FLAG
.sp
Use the MFC library for an executable or dll.
.sp
Enables the use of the Microsoft Foundation Classes (MFC).
It should be set to \fB1\fP for the static MFC library, and
\fB2\fP for the shared MFC library.  This is used in Visual Studio
project files.
.sp
Usage example:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
add_definitions(\-D_AFXDLL)
set(CMAKE_MFC_FLAG 2)
add_executable(CMakeSetup WIN32 ${SRCS})
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Contents of \fBCMAKE_MFC_FLAG\fP may use
\fI\%generator expressions\fP\&.
.SS CMAKE_MODULE_PATH
.sp
\fI\%Semicolon\-separated list\fP of directories,
represented using forward slashes, specifying a search path for CMake modules
to be loaded by the \fI\%include()\fP or \fI\%find_package()\fP commands
before checking the default modules that come with CMake. By default it is
empty.  It is intended to be set by the project.
.SS CMAKE_POLICY_DEFAULT_CMP<NNNN>
.sp
Default for CMake Policy \fBCMP<NNNN>\fP when it is otherwise left unset.
.sp
Commands \fI\%cmake_minimum_required(VERSION)\fP and
\fI\%cmake_policy(VERSION)\fP by default leave policies introduced after
the given version unset.  Set \fBCMAKE_POLICY_DEFAULT_CMP<NNNN>\fP to \fBOLD\fP
or \fBNEW\fP to specify the default for policy \fBCMP<NNNN>\fP, where \fB<NNNN>\fP
is the policy number.
.sp
This variable should not be set by a project in CMake code as a way to
set its own policies; use \fI\%cmake_policy(SET)\fP instead.  This
variable is meant to externally set policies for which a project has
not itself been updated:
.INDENT 0.0
.IP \(bu 2
Users running CMake may set this variable in the cache
(e.g. \fB\-DCMAKE_POLICY_DEFAULT_CMP<NNNN>=<OLD|NEW>\fP).  Set it to \fBOLD\fP
to quiet a policy warning while using old behavior or to \fBNEW\fP to
try building the project with new behavior.
.IP \(bu 2
Projects may set this variable before a call to \fI\%add_subdirectory()\fP
that adds a third\-party project in order to set its policies without
modifying third\-party code.
.UNINDENT
.SS CMAKE_POLICY_WARNING_CMP<NNNN>
.sp
Explicitly enable or disable the warning when CMake Policy \fBCMP<NNNN>\fP
has not been set explicitly by \fI\%cmake_policy()\fP or implicitly
by \fI\%cmake_minimum_required()\fP\&. This is meaningful
only for the policies that do not warn by default:
.INDENT 0.0
.IP \(bu 2
\fBCMAKE_POLICY_WARNING_CMP0025\fP controls the warning for
policy \fI\%CMP0025\fP\&.
.IP \(bu 2
\fBCMAKE_POLICY_WARNING_CMP0047\fP controls the warning for
policy \fI\%CMP0047\fP\&.
.IP \(bu 2
\fBCMAKE_POLICY_WARNING_CMP0056\fP controls the warning for
policy \fI\%CMP0056\fP\&.
.IP \(bu 2
\fBCMAKE_POLICY_WARNING_CMP0060\fP controls the warning for
policy \fI\%CMP0060\fP\&.
.IP \(bu 2
\fBCMAKE_POLICY_WARNING_CMP0065\fP controls the warning for
policy \fI\%CMP0065\fP\&.
.IP \(bu 2
\fBCMAKE_POLICY_WARNING_CMP0066\fP controls the warning for
policy \fI\%CMP0066\fP\&.
.IP \(bu 2
\fBCMAKE_POLICY_WARNING_CMP0067\fP controls the warning for
policy \fI\%CMP0067\fP\&.
.IP \(bu 2
\fBCMAKE_POLICY_WARNING_CMP0082\fP controls the warning for
policy \fI\%CMP0082\fP\&.
.IP \(bu 2
\fBCMAKE_POLICY_WARNING_CMP0089\fP controls the warning for
policy \fI\%CMP0089\fP\&.
.IP \(bu 2
\fBCMAKE_POLICY_WARNING_CMP0102\fP controls the warning for
policy \fI\%CMP0102\fP\&.
.IP \(bu 2
\fBCMAKE_POLICY_WARNING_CMP0112\fP controls the warning for
policy \fI\%CMP0112\fP\&.
.IP \(bu 2
\fBCMAKE_POLICY_WARNING_CMP0116\fP controls the warning for
policy \fI\%CMP0116\fP\&.
.IP \(bu 2
\fBCMAKE_POLICY_WARNING_CMP0126\fP controls the warning for
policy \fI\%CMP0126\fP\&.
.IP \(bu 2
\fBCMAKE_POLICY_WARNING_CMP0128\fP controls the warning for
policy \fI\%CMP0128\fP\&.
.IP \(bu 2
\fBCMAKE_POLICY_WARNING_CMP0129\fP controls the warning for
policy \fI\%CMP0129\fP\&.
.IP \(bu 2
\fBCMAKE_POLICY_WARNING_CMP0133\fP controls the warning for
policy \fI\%CMP0133\fP\&.
.UNINDENT
.sp
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. \fB\-DCMAKE_POLICY_WARNING_CMP<NNNN>=ON\fP).
Alternatively, running \fI\%cmake(1)\fP with the
\fI\%\-\-debug\-output\fP,
\fI\%\-\-trace\fP, or
\fI\%\-\-trace\-expand\fP option will also
enable the warning.
.SS CMAKE_PREFIX_PATH
.sp
\fI\%Semicolon\-separated list\fP of directories specifying installation
\fIprefixes\fP to be searched by the \fI\%find_package()\fP,
\fI\%find_program()\fP, \fI\%find_library()\fP, \fI\%find_file()\fP, and
\fI\%find_path()\fP commands.  Each command will add appropriate
subdirectories (like \fBbin\fP, \fBlib\fP, or \fBinclude\fP) as specified in its own
documentation.
.sp
By default this is empty.  It is intended to be set by the project.
.sp
There is also an environment variable \fI\%CMAKE_PREFIX_PATH\fP, which is used
as an additional list of search prefixes.
.sp
See also \fI\%CMAKE_SYSTEM_PREFIX_PATH\fP, \fI\%CMAKE_INCLUDE_PATH\fP,
\fI\%CMAKE_LIBRARY_PATH\fP, \fI\%CMAKE_PROGRAM_PATH\fP, and
\fI\%CMAKE_IGNORE_PATH\fP\&.
.SS CMAKE_PROGRAM_PATH
.sp
\fI\%Semicolon\-separated list\fP of directories specifying a search path
for the \fI\%find_program()\fP command.  By default it is empty, it is
intended to be set by the project.
.sp
There is also an environment variable \fI\%CMAKE_PROGRAM_PATH\fP, which is used
as an additional list of search directories.
.sp
See also \fI\%CMAKE_SYSTEM_PROGRAM_PATH\fP and \fI\%CMAKE_PREFIX_PATH\fP\&.
.SS CMAKE_PROJECT_INCLUDE
.sp
New in version 3.15.

.sp
A CMake language file to be included as the last step of all
\fI\%project()\fP command calls.  This is intended for injecting custom code
into project builds without modifying their source.  See \fI\%Code Injection\fP
for a more detailed discussion of files potentially included during a
\fI\%project()\fP call.
.sp
New in version 3.29: This variable can be a \fI\%semicolon\-separated list\fP
of CMake language files to be included sequentially. It can also now refer to
module names to be found in \fI\%CMAKE_MODULE_PATH\fP or builtin to CMake.

.sp
See also the \fI\%CMAKE_PROJECT_<PROJECT\-NAME>_INCLUDE\fP,
\fI\%CMAKE_PROJECT_<PROJECT\-NAME>_INCLUDE_BEFORE\fP,
\fI\%CMAKE_PROJECT_INCLUDE_BEFORE\fP, and
\fI\%CMAKE_PROJECT_TOP_LEVEL_INCLUDES\fP variables.
.SS CMAKE_PROJECT_INCLUDE_BEFORE
.sp
New in version 3.15.

.sp
A CMake language file to be included as the first step of all
\fI\%project()\fP command calls.  This is intended for injecting custom code
into project builds without modifying their source.  See \fI\%Code Injection\fP
for a more detailed discussion of files potentially included during a
\fI\%project()\fP call.
.sp
New in version 3.29: This variable can be a \fI\%semicolon\-separated list\fP
of CMake language files to be included sequentially. It can also now refer to
module names to be found in \fI\%CMAKE_MODULE_PATH\fP or builtin to CMake.

.sp
See also the \fI\%CMAKE_PROJECT_<PROJECT\-NAME>_INCLUDE\fP,
\fI\%CMAKE_PROJECT_<PROJECT\-NAME>_INCLUDE_BEFORE\fP,
\fI\%CMAKE_PROJECT_INCLUDE\fP, and
\fI\%CMAKE_PROJECT_TOP_LEVEL_INCLUDES\fP variables.
.SS CMAKE_PROJECT_<PROJECT\-NAME>_INCLUDE
.sp
A CMake language file to be included as the last step of any
\fI\%project()\fP command calls that specify \fB<PROJECT\-NAME>\fP as the project
name.  This is intended for injecting custom code into project builds without
modifying their source.  See \fI\%Code Injection\fP for a more detailed
discussion of files potentially included during a \fI\%project()\fP call.
.sp
New in version 3.29: This variable can be a \fI\%semicolon\-separated list\fP
of CMake language files to be included sequentially. It can also now refer to
module names to be found in \fI\%CMAKE_MODULE_PATH\fP or builtin to CMake.

.sp
See also the \fI\%CMAKE_PROJECT_<PROJECT\-NAME>_INCLUDE_BEFORE\fP,
\fI\%CMAKE_PROJECT_INCLUDE\fP, \fI\%CMAKE_PROJECT_INCLUDE_BEFORE\fP,
and \fI\%CMAKE_PROJECT_TOP_LEVEL_INCLUDES\fP variables.
.SS CMAKE_PROJECT_<PROJECT\-NAME>_INCLUDE_BEFORE
.sp
New in version 3.17.

.sp
A CMake language file to be included as the first step of any
\fI\%project()\fP command calls that specify \fB<PROJECT\-NAME>\fP as the project
name.  This is intended for injecting custom code into project builds without
modifying their source.  See \fI\%Code Injection\fP for a more detailed
discussion of files potentially included during a \fI\%project()\fP call.
.sp
New in version 3.29: This variable can be a \fI\%semicolon\-separated list\fP
of CMake language files to be included sequentially. It can also now refer to
module names to be found in \fI\%CMAKE_MODULE_PATH\fP or builtin to CMake.

.sp
See also the \fI\%CMAKE_PROJECT_<PROJECT\-NAME>_INCLUDE\fP,
\fI\%CMAKE_PROJECT_INCLUDE\fP, \fI\%CMAKE_PROJECT_INCLUDE_BEFORE\fP,
and \fI\%CMAKE_PROJECT_TOP_LEVEL_INCLUDES\fP variables.
.SS CMAKE_PROJECT_TOP_LEVEL_INCLUDES
.sp
New in version 3.24.

.sp
\fI\%Semicolon\-separated list\fP of CMake language
files to include as part of the very first \fI\%project()\fP 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 \fI\%CMAKE_<LANG>_COMPILER\fP, might not be set.
See \fI\%Code Injection\fP for a more detailed discussion of files potentially
included during a \fI\%project()\fP call.
.sp
New in version 3.29: This variable can also now refer to module names to be found in
\fI\%CMAKE_MODULE_PATH\fP or builtin to CMake.

.sp
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 \fI\%CMAKE_TOOLCHAIN_FILE\fP for that).
.sp
By default, this variable is empty.  It is intended to be set by the user.
.sp
See also the \fI\%CMAKE_PROJECT_INCLUDE\fP,
\fI\%CMAKE_PROJECT_INCLUDE_BEFORE\fP,
\fI\%CMAKE_PROJECT_<PROJECT\-NAME>_INCLUDE\fP, and
\fI\%CMAKE_PROJECT_<PROJECT\-NAME>_INCLUDE_BEFORE\fP variables.
.SS CMAKE_REQUIRE_FIND_PACKAGE_<PackageName>
.sp
New in version 3.22.

.sp
Variable for making \fI\%find_package()\fP call \fBREQUIRED\fP\&.
.sp
Every non\-\fBREQUIRED\fP \fI\%find_package()\fP call in a project can be
turned into \fBREQUIRED\fP by setting the variable
\fBCMAKE_REQUIRE_FIND_PACKAGE_<PackageName>\fP to \fBTRUE\fP\&.
This can be used to assert assumptions about build environment and to
ensure the build will fail early if they do not hold.
.sp
Note that setting this variable to true breaks some commonly used patterns.
Multiple calls to \fI\%find_package()\fP 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:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
find_package(something PATHS /some/local/path NO_DEFAULT_PATH)
find_package(something)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
In the above, the first call looks for the \fBsomething\fP package in a specific
directory.  If \fBCMAKE_REQUIRE_FIND_PACKAGE_something\fP 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.
.sp
A similar pattern is used even by some of CMake\(aqs own Find modules to search
for a config package first:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
find_package(something CONFIG QUIET)
if(NOT something_FOUND)
  # Fall back to searching using typical Find module logic...
endif()
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Again, if \fBCMAKE_REQUIRE_FIND_PACKAGE_something\fP 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.
.sp
See also the \fI\%CMAKE_DISABLE_FIND_PACKAGE_<PackageName>\fP variable.
.SS CMAKE_SKIP_INSTALL_ALL_DEPENDENCY
.sp
Don\(aqt make the \fBinstall\fP target depend on the \fBall\fP target.
.sp
By default, the \fBinstall\fP target depends on the \fBall\fP target.  This
has the effect, that when \fBmake install\fP is invoked or \fBINSTALL\fP is
built, first the \fBall\fP target is built, then the installation starts.
If \fBCMAKE_SKIP_INSTALL_ALL_DEPENDENCY\fP is set to \fBTRUE\fP, this
dependency is not created, so the installation process will start immediately,
independent from whether the project has been completely built or not.
.sp
See also \fI\%CMAKE_SKIP_TEST_ALL_DEPENDENCY\fP\&.
.SS CMAKE_SKIP_TEST_ALL_DEPENDENCY
.sp
New in version 3.29.

.sp
Control whether the \fBtest\fP target depends on the \fBall\fP target.
.sp
If this variable is not defined, or is set to \fBTRUE\fP, then the
\fBtest\fP (or \fBRUN_TESTS\fP) target does not depend on the
\fBall\fP (or \fBALL_BUILD\fP) target.  When the \fBtest\fP target is built,
e.g., via \fBmake test\fP, the test process will start immediately,
regardless of whether the project has been completely built or not.
.sp
If \fBCMAKE_SKIP_TEST_ALL_DEPENDENCY\fP is explicitly set to \fBFALSE\fP,
then the \fBtest\fP target will depend on the \fBall\fP target.  When the
\fBtest\fP target is built, e.g., via \fBmake test\fP, the \fBall\fP target
will be built first, and then the tests will run.
.sp
See also \fI\%CMAKE_SKIP_INSTALL_ALL_DEPENDENCY\fP\&.
.SS CMAKE_STAGING_PREFIX
.sp
This variable may be set to a path to install to when cross\-compiling. This can
be useful if the path in \fI\%CMAKE_SYSROOT\fP is read\-only, or otherwise
should remain pristine.
.sp
The \fBCMAKE_STAGING_PREFIX\fP location is also used as a search prefix
by the \fBfind_*\fP commands. This can be controlled by setting the
\fI\%CMAKE_FIND_NO_INSTALL_PREFIX\fP variable.
.sp
If any \fBRPATH\fP/\fBRUNPATH\fP entries passed to the linker contain the
\fBCMAKE_STAGING_PREFIX\fP, the matching path fragments are replaced
with the \fI\%CMAKE_INSTALL_PREFIX\fP\&.
.SS CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS
.sp
New in version 3.8.

.sp
This variable contains a list of env vars as a list of tokens with the
syntax \fBvar=value\fP\&.
.sp
Example:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
set(CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS
   \(dqFOO=FOO1\e;FOO2\e;FOON\(dq
   \(dqBAR=BAR1\e;BAR2\e;BARN\(dq
   \(dqBAZ=BAZ1\e;BAZ2\e;BAZN\(dq
   \(dqFOOBAR=FOOBAR1\e;FOOBAR2\e;FOOBARN\(dq
   \(dqVALID=\(dq
   )
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
In case of malformed variables CMake will fail:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
set(CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS
    \(dqTHIS_IS_NOT_VALID\(dq
    )
.ft P
.fi
.UNINDENT
.UNINDENT
.SS CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE
.sp
New in version 3.8.

.sp
If this variable evaluates to \fBON\fP at the end of the top\-level
\fBCMakeLists.txt\fP file, the \fI\%Sublime Text 2\fP extra generator
excludes the build tree from the \fB\&.sublime\-project\fP if it is inside the
source tree.
.SS CMAKE_SUPPRESS_REGENERATION
.sp
New in version 3.12.

.sp
If \fBCMAKE_SUPPRESS_REGENERATION\fP is \fBOFF\fP, 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.
.sp
If this variable evaluates to \fBON\fP at the end of the top\-level
\fBCMakeLists.txt\fP file, CMake will not add the regeneration target to the
build system or perform any build system checks.
.SS CMAKE_SYSROOT
.sp
Path to pass to the compiler in the \fB\-\-sysroot\fP flag.
.sp
The \fBCMAKE_SYSROOT\fP content is passed to the compiler in the \fB\-\-sysroot\fP
flag, if supported.  The path is also stripped from the \fBRPATH\fP/\fBRUNPATH\fP
if necessary on installation.  The \fBCMAKE_SYSROOT\fP is also used to prefix
paths searched by the \fBfind_*\fP commands.
.sp
This variable may only be set in a toolchain file specified by
the \fI\%CMAKE_TOOLCHAIN_FILE\fP variable.
.sp
See also the \fI\%CMAKE_SYSROOT_COMPILE\fP and
\fI\%CMAKE_SYSROOT_LINK\fP variables.
.SS CMAKE_SYSROOT_COMPILE
.sp
New in version 3.9.

.sp
Path to pass to the compiler in the \fB\-\-sysroot\fP flag when compiling source
files.  This is the same as \fI\%CMAKE_SYSROOT\fP but is used only for
compiling sources and not linking.
.sp
This variable may only be set in a toolchain file specified by
the \fI\%CMAKE_TOOLCHAIN_FILE\fP variable.
.SS CMAKE_SYSROOT_LINK
.sp
New in version 3.9.

.sp
Path to pass to the compiler in the \fB\-\-sysroot\fP flag when linking.  This is
the same as \fI\%CMAKE_SYSROOT\fP but is used only for linking and not
compiling sources.
.sp
This variable may only be set in a toolchain file specified by
the \fI\%CMAKE_TOOLCHAIN_FILE\fP variable.
.SS CMAKE_SYSTEM_APPBUNDLE_PATH
.sp
New in version 3.4.

.sp
Search path for macOS application bundles used by the \fI\%find_program()\fP,
and \fI\%find_package()\fP commands.  By default it contains the standard
directories for the current system.  It is \fInot\fP intended to be modified by
the project, use \fI\%CMAKE_APPBUNDLE_PATH\fP for this.
.SS CMAKE_SYSTEM_FRAMEWORK_PATH
.sp
New in version 3.4.

.sp
Search path for macOS frameworks used by the \fI\%find_library()\fP,
\fI\%find_package()\fP, \fI\%find_path()\fP, and \fI\%find_file()\fP
commands.  By default it contains the standard directories for the
current system.  It is \fInot\fP intended to be modified by the project,
use \fI\%CMAKE_FRAMEWORK_PATH\fP for this.
.SS CMAKE_SYSTEM_IGNORE_PATH
.sp
\fI\%Semicolon\-separated list\fP of directories
to be ignored by the various \fBfind...()\fP commands.
.sp
For \fI\%find_program()\fP, \fI\%find_library()\fP, \fI\%find_file()\fP,
and \fI\%find_path()\fP, any file found in one of the listed directories
will be ignored. The listed directories do not apply recursively, so any
subdirectories to be ignored must also be explicitly listed.
\fBCMAKE_SYSTEM_IGNORE_PATH\fP does not affect the search \fIprefixes\fP used by these
four commands. To ignore individual paths under a search prefix
(e.g. \fBbin\fP, \fBinclude\fP, \fBlib\fP, etc.), each path must be listed in
\fBCMAKE_SYSTEM_IGNORE_PATH\fP as a full absolute path. \fI\%CMAKE_SYSTEM_IGNORE_PREFIX_PATH\fP
provides a more appropriate way to ignore a whole search prefix.
.sp
\fI\%find_package()\fP is also affected by \fBCMAKE_SYSTEM_IGNORE_PATH\fP, but only
for \fIConfig mode\fP searches. Any \fB<Name>Config.cmake\fP or
\fB<name>\-config.cmake\fP file found in one of the specified directories
will be ignored. In addition, any search \fIprefix\fP found in \fBCMAKE_SYSTEM_IGNORE_PATH\fP
will be skipped for backward compatibility reasons, but new code should
prefer to use \fI\%CMAKE_SYSTEM_IGNORE_PREFIX_PATH\fP to ignore prefixes instead.
.sp
Ignoring search locations can be useful in cross\-compiling environments where
some system directories contain incompatible but possibly linkable libraries.
For example, on cross\-compiled cluster environments, this allows a user to
ignore directories containing libraries meant for the front\-end machine.
.sp
\fBCMAKE_SYSTEM_IGNORE_PATH\fP is populated by CMake as part of its platform
and toolchain setup. Its purpose is to ignore locations containing
incompatible binaries meant for the host rather than the target platform.
The project or end user should not modify this variable, they should use
\fI\%CMAKE_IGNORE_PATH\fP instead.
.sp
See also the following variables:
.INDENT 0.0
.IP \(bu 2
\fI\%CMAKE_SYSTEM_IGNORE_PREFIX_PATH\fP
.IP \(bu 2
\fI\%CMAKE_SYSTEM_PREFIX_PATH\fP
.IP \(bu 2
\fI\%CMAKE_SYSTEM_LIBRARY_PATH\fP
.IP \(bu 2
\fI\%CMAKE_SYSTEM_INCLUDE_PATH\fP
.IP \(bu 2
\fI\%CMAKE_SYSTEM_PROGRAM_PATH\fP
.UNINDENT
.SS CMAKE_SYSTEM_IGNORE_PREFIX_PATH
.sp
New in version 3.23.

.sp
\fI\%Semicolon\-separated list\fP of search \fIprefixes\fP
to be ignored by the \fI\%find_program()\fP, \fI\%find_library()\fP,
\fI\%find_file()\fP, and \fI\%find_path()\fP commands.
The prefixes are also ignored by the \fIConfig mode\fP of the
\fI\%find_package()\fP command (\fIModule mode\fP is unaffected).
To ignore specific directories instead, see \fI\%CMAKE_SYSTEM_IGNORE_PATH\fP\&.
.sp
Ignoring search locations can be useful in cross\-compiling environments where
some system directories contain incompatible but possibly linkable libraries.
For example, on cross\-compiled cluster environments, this allows a user to
ignore directories containing libraries meant for the front\-end machine.
.sp
\fBCMAKE_SYSTEM_IGNORE_PREFIX_PATH\fP is populated by CMake as part of its platform
and toolchain setup. Its purpose is to ignore locations containing
incompatible binaries meant for the host rather than the target platform.
The project or end user should not modify this variable, they should use
\fI\%CMAKE_IGNORE_PREFIX_PATH\fP instead.
.sp
See also the following variables:
.INDENT 0.0
.IP \(bu 2
\fI\%CMAKE_SYSTEM_IGNORE_PATH\fP
.IP \(bu 2
\fI\%CMAKE_SYSTEM_PREFIX_PATH\fP
.IP \(bu 2
\fI\%CMAKE_SYSTEM_LIBRARY_PATH\fP
.IP \(bu 2
\fI\%CMAKE_SYSTEM_INCLUDE_PATH\fP
.IP \(bu 2
\fI\%CMAKE_SYSTEM_PROGRAM_PATH\fP
.UNINDENT
.SS CMAKE_SYSTEM_INCLUDE_PATH
.sp
\fI\%Semicolon\-separated list\fP of directories specifying a search path
for the \fI\%find_file()\fP and \fI\%find_path()\fP commands.  By default
this contains the standard directories for the current system.  It is \fInot\fP
intended to be modified by the project; use \fI\%CMAKE_INCLUDE_PATH\fP for
this.  See also \fI\%CMAKE_SYSTEM_PREFIX_PATH\fP\&.
.SS CMAKE_SYSTEM_LIBRARY_PATH
.sp
\fI\%Semicolon\-separated list\fP of directories specifying a search path
for the \fI\%find_library()\fP command.  By default this contains the
standard directories for the current system.  It is \fInot\fP intended to be
modified by the project; use \fI\%CMAKE_LIBRARY_PATH\fP for this.
See also \fI\%CMAKE_SYSTEM_PREFIX_PATH\fP\&.
.SS CMAKE_SYSTEM_PREFIX_PATH
.sp
\fI\%Semicolon\-separated list\fP of directories specifying installation
\fIprefixes\fP to be searched by the \fI\%find_package()\fP,
\fI\%find_program()\fP, \fI\%find_library()\fP, \fI\%find_file()\fP, and
\fI\%find_path()\fP commands.  Each command will add appropriate
subdirectories (like \fBbin\fP, \fBlib\fP, or \fBinclude\fP) as specified in its own
documentation.
.sp
By default this contains the system directories for the current system, the
\fI\%CMAKE_INSTALL_PREFIX\fP, and the \fI\%CMAKE_STAGING_PREFIX\fP\&.
The installation and staging prefixes may be excluded by setting
the \fI\%CMAKE_FIND_NO_INSTALL_PREFIX\fP variable before the
first \fI\%project()\fP invocation.
.sp
The system directories that are contained in \fBCMAKE_SYSTEM_PREFIX_PATH\fP are
locations that typically include installed software. An example being
\fB/usr/local\fP for UNIX based platforms. In addition to standard platform
locations, CMake will also add values to \fBCMAKE_SYSTEM_PREFIX_PATH\fP 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:
.INDENT 0.0
.TP
.B CrayLinuxEnvironment:
.INDENT 7.0
.IP \(bu 2
\fBENV{SYSROOT_DIR}/\fP
.IP \(bu 2
\fBENV{SYSROOT_DIR}/usr\fP
.IP \(bu 2
\fBENV{SYSROOT_DIR}/usr/local\fP
.UNINDENT
.TP
.B Darwin:
.INDENT 7.0
.IP \(bu 2
\fBENV{SDKROOT}/usr\fP When \fBCMAKE_OSX_SYSROOT\fP is not explicitly specified.
.UNINDENT
.TP
.B OpenBSD:
.INDENT 7.0
.IP \(bu 2
\fBENV{LOCALBASE}\fP
.UNINDENT
.TP
.B Unix:
.INDENT 7.0
.IP \(bu 2
\fBENV{CONDA_PREFIX}\fP when using a conda compiler
.UNINDENT
.TP
.B MSYSTEM environment with MinGW toolchain:
New in version 3.28.

.INDENT 7.0
.IP \(bu 2
\fBENV{MSYSTEM_PREFIX}/local\fP
.IP \(bu 2
\fBENV{MSYSTEM_PREFIX}\fP
.UNINDENT
.TP
.B Windows:
.INDENT 7.0
.IP \(bu 2
\fBENV{ProgramW6432}\fP
.IP \(bu 2
\fBENV{ProgramFiles}\fP
.IP \(bu 2
\fBENV{ProgramFiles(x86)}\fP
.IP \(bu 2
\fBENV{SystemDrive}/Program Files\fP
.IP \(bu 2
\fBENV{SystemDrive}/Program Files (x86)\fP
.UNINDENT
.UNINDENT
.sp
\fBCMAKE_SYSTEM_PREFIX_PATH\fP is \fInot\fP intended to be modified by the project;
use \fI\%CMAKE_PREFIX_PATH\fP for this.
.sp
See also \fI\%CMAKE_SYSTEM_INCLUDE_PATH\fP,
\fI\%CMAKE_SYSTEM_LIBRARY_PATH\fP, \fI\%CMAKE_SYSTEM_PROGRAM_PATH\fP,
and \fI\%CMAKE_SYSTEM_IGNORE_PATH\fP\&.
.SS CMAKE_SYSTEM_PROGRAM_PATH
.sp
\fI\%Semicolon\-separated list\fP of directories specifying a search path
for the \fI\%find_program()\fP command.  By default this contains the
standard directories for the current system.  It is \fInot\fP intended to be
modified by the project; use \fI\%CMAKE_PROGRAM_PATH\fP for this.
See also \fI\%CMAKE_SYSTEM_PREFIX_PATH\fP\&.
.SS CMAKE_TLS_CAINFO
.sp
Specify the default value for the \fI\%file(DOWNLOAD)\fP and
\fI\%file(UPLOAD)\fP commands\(aq \fBTLS_CAINFO\fP options.
It is unset by default.
.sp
This variable is also used by the \fI\%ExternalProject\fP and
\fI\%FetchContent\fP modules for internal calls to \fI\%file(DOWNLOAD)\fP\&.
.SS CMAKE_TLS_VERIFY
.sp
Specify the default value for the \fI\%file(DOWNLOAD)\fP and
\fI\%file(UPLOAD)\fP commands\(aq \fBTLS_VERIFY\fP options.
If not set, the default is \fIoff\fP\&.
.sp
This variable is also used by the \fI\%ExternalProject\fP and
\fI\%FetchContent\fP modules for internal calls to \fI\%file(DOWNLOAD)\fP\&.
.sp
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.
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
set(CMAKE_TLS_VERIFY TRUE)
.ft P
.fi
.UNINDENT
.UNINDENT
.SS CMAKE_USER_MAKE_RULES_OVERRIDE
.sp
Specify a CMake file that overrides platform information.
.sp
CMake loads the specified file while enabling support for each
language from either the \fI\%project()\fP or \fI\%enable_language()\fP
commands.  It is loaded after CMake\(aqs builtin compiler and platform information
modules have been loaded but before the information is used.  The file
may set platform information variables to override CMake\(aqs defaults.
See \fI\%CMAKE_USER_MAKE_RULES_OVERRIDE_<LANG>\fP for the language\-specific
version of this variable.
.sp
This feature is intended for use only in overriding information
variables that must be set before CMake builds its first test project
to check that the compiler for a language works.  It should not be
used to load a file in cases that a normal \fI\%include()\fP will work.  Use
it only as a last resort for behavior that cannot be achieved any
other way.  For example, one may set the
\fI\%CMAKE_C_FLAGS_INIT\fP variable
to change the default value used to initialize the
\fI\%CMAKE_C_FLAGS\fP variable
before it is cached.  The override file should NOT be used to set anything
that could be set after languages are enabled, such as variables like
\fI\%CMAKE_RUNTIME_OUTPUT_DIRECTORY\fP that affect the placement of
binaries.  Information set in the file will be used for \fI\%try_compile()\fP
and \fI\%try_run()\fP builds too.
.SS CMAKE_WARN_DEPRECATED
.sp
Whether to issue warnings for deprecated functionality.
.sp
If not \fBFALSE\fP, use of deprecated functionality will issue warnings.
If this variable is not set, CMake behaves as if it were set to \fBTRUE\fP\&.
.sp
When running \fI\%cmake(1)\fP, this option can be enabled with the
\fI\%\-Wdeprecated\fP option, or disabled with the
\fI\%\-Wno\-deprecated\fP option.
.SS CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION
.sp
Ask \fBcmake_install.cmake\fP script to warn each time a file with absolute
\fBINSTALL DESTINATION\fP is encountered.
.sp
This variable is used by CMake\-generated \fBcmake_install.cmake\fP scripts.
If one sets this variable to \fBON\fP while running the script, it may get
warning messages from the script.
.SS CMAKE_XCODE_GENERATE_SCHEME
.sp
New in version 3.9.

.sp
If enabled, the \fI\%Xcode\fP generator will generate schema files.  These
are useful to invoke analyze, archive, build\-for\-testing and test
actions from the command line.
.sp
This variable initializes the
\fI\%XCODE_GENERATE_SCHEME\fP
target property on all targets.
.SS CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY
.sp
New in version 3.11.

.sp
If enabled, the \fI\%Xcode\fP generator will generate only a
single Xcode project file for the topmost \fI\%project()\fP command
instead of generating one for every \fBproject()\fP command.
.sp
This could be useful to speed up the CMake generation step for
large projects and to work\-around a bug in the \fBZERO_CHECK\fP logic.
.SS CMAKE_XCODE_LINK_BUILD_PHASE_MODE
.sp
New in version 3.19.

.sp
This variable is used to initialize the
\fI\%XCODE_LINK_BUILD_PHASE_MODE\fP property on targets.
It affects the methods that the \fI\%Xcode\fP generator uses to link
different kinds of libraries.  Its default value is \fBNONE\fP\&.
.SS CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER
.sp
New in version 3.13.

.sp
Whether to enable \fBAddress Sanitizer\fP in the Diagnostics
section of the generated Xcode scheme.
.sp
This variable initializes the
\fI\%XCODE_SCHEME_ADDRESS_SANITIZER\fP
property on all targets.
.sp
Please refer to the \fI\%XCODE_GENERATE_SCHEME\fP target property
documentation to see all Xcode schema related properties.
.SS CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN
.sp
New in version 3.13.

.sp
Whether to enable \fBDetect use of stack after return\fP
in the Diagnostics section of the generated Xcode scheme.
.sp
This variable initializes the
\fI\%XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN\fP
property on all targets.
.sp
Please refer to the \fI\%XCODE_GENERATE_SCHEME\fP target property
documentation to see all Xcode schema related properties.
.SS CMAKE_XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING
.sp
New in version 3.16.

.sp
Whether to enable
\fBAllow debugging when using document Versions Browser\fP
in the Options section of the generated Xcode scheme.
.sp
This variable initializes the
\fI\%XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING\fP
property on all targets.
.sp
Please refer to the \fI\%XCODE_GENERATE_SCHEME\fP target property
documentation to see all Xcode schema related properties.
.SS CMAKE_XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER
.sp
New in version 3.13.

.sp
Whether to disable the \fBMain Thread Checker\fP
in the Diagnostics section of the generated Xcode scheme.
.sp
This variable initializes the
\fI\%XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER\fP
property on all targets.
.sp
Please refer to the \fI\%XCODE_GENERATE_SCHEME\fP target property
documentation to see all Xcode schema related properties.
.SS CMAKE_XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS
.sp
New in version 3.13.

.sp
Whether to enable \fBDynamic Library Loads\fP
in the Diagnostics section of the generated Xcode scheme.
.sp
This variable initializes the
\fI\%XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS\fP
property on all targets.
.sp
Please refer to the \fI\%XCODE_GENERATE_SCHEME\fP target property
documentation to see all Xcode schema related properties.
.SS CMAKE_XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE
.sp
New in version 3.13.

.sp
Whether to enable \fBDynamic Linker API usage\fP
in the Diagnostics section of the generated Xcode scheme.
.sp
This variable initializes the
\fI\%XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE\fP
property on all targets.
.sp
Please refer to the \fI\%XCODE_GENERATE_SCHEME\fP target property
documentation to see all Xcode schema related properties.
.SS CMAKE_XCODE_SCHEME_ENABLE_GPU_API_VALIDATION
.sp
New in version 3.25.

.sp
Property value for \fBMetal: API Validation\fP in the Options section of
the generated Xcode scheme.
.sp
This variable initializes the
\fI\%XCODE_SCHEME_ENABLE_GPU_API_VALIDATION\fP property on all targets.
.sp
Please refer to the \fI\%XCODE_GENERATE_SCHEME\fP target property
documentation to see all Xcode schema related properties.
.SS CMAKE_XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE
.sp
New in version 3.23.

.sp
Property value for \fBGPU Frame Capture\fP in the Options section of
the generated Xcode scheme. Example values are \fIMetal\fP and
\fIDisabled\fP\&.
.sp
This variable initializes the
\fI\%XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE\fP
property on all targets.
.sp
Please refer to the \fI\%XCODE_GENERATE_SCHEME\fP target property
documentation to see all Xcode schema related properties.
.SS CMAKE_XCODE_SCHEME_ENABLE_GPU_SHADER_VALIDATION
.sp
New in version 3.25.

.sp
Property value for \fBMetal: Shader Validation\fP in the Options section of
the generated Xcode scheme.
.sp
This variable initializes the
\fI\%XCODE_SCHEME_ENABLE_GPU_SHADER_VALIDATION\fP property on all targets.
.sp
Please refer to the \fI\%XCODE_GENERATE_SCHEME\fP target property
documentation to see all Xcode schema related properties.
.SS CMAKE_XCODE_SCHEME_ENVIRONMENT
.sp
New in version 3.17.

.sp
Specify environment variables that should be added to the Arguments
section of the generated Xcode scheme.
.sp
If set to a list of environment variables and values of the form
\fBMYVAR=value\fP those environment variables will be added to the
scheme.
.sp
This variable initializes the \fI\%XCODE_SCHEME_ENVIRONMENT\fP
property on all targets.
.sp
Please refer to the \fI\%XCODE_GENERATE_SCHEME\fP target property
documentation to see all Xcode schema related properties.
.SS CMAKE_XCODE_SCHEME_GUARD_MALLOC
.sp
New in version 3.13.

.sp
Whether to enable \fBGuard Malloc\fP
in the Diagnostics section of the generated Xcode scheme.
.sp
This variable initializes the
\fI\%XCODE_SCHEME_GUARD_MALLOC\fP
property on all targets.
.sp
Please refer to the \fI\%XCODE_GENERATE_SCHEME\fP target property
documentation to see all Xcode schema related properties.
.SS CMAKE_XCODE_SCHEME_LAUNCH_CONFIGURATION
.sp
New in version 3.25.

.sp
Set the build configuration to run the target.
.sp
This variable initializes the \fI\%XCODE_SCHEME_LAUNCH_CONFIGURATION\fP
property on all targets.
.sp
Please refer to the \fI\%XCODE_GENERATE_SCHEME\fP target property
documentation to see all Xcode schema related properties.
.SS CMAKE_XCODE_SCHEME_LAUNCH_MODE
.sp
New in version 3.25.

.sp
Property value for \fBLaunch\fP in the Info section of the generated Xcode
scheme.
.sp
This variable initializes the \fI\%XCODE_SCHEME_LAUNCH_MODE\fP property on
all targets.
.sp
Please refer to the \fI\%XCODE_GENERATE_SCHEME\fP target property
documentation to see all Xcode schema related properties.
.SS CMAKE_XCODE_SCHEME_MAIN_THREAD_CHECKER_STOP
.sp
New in version 3.13.

.sp
Whether to enable the \fBMain Thread Checker\fP option
\fBPause on issues\fP
in the Diagnostics section of the generated Xcode scheme.
.sp
This variable initializes the
\fI\%XCODE_SCHEME_MAIN_THREAD_CHECKER_STOP\fP
property on all targets.
.sp
Please refer to the \fI\%XCODE_GENERATE_SCHEME\fP target property
documentation to see all Xcode schema related properties.
.SS CMAKE_XCODE_SCHEME_MALLOC_GUARD_EDGES
.sp
New in version 3.13.

.sp
Whether to enable \fBMalloc Guard Edges\fP
in the Diagnostics section of the generated Xcode scheme.
.sp
This variable initializes the
\fI\%XCODE_SCHEME_MALLOC_GUARD_EDGES\fP
property on all targets.
.sp
Please refer to the \fI\%XCODE_GENERATE_SCHEME\fP target property
documentation to see all Xcode schema related properties.
.SS CMAKE_XCODE_SCHEME_MALLOC_SCRIBBLE
.sp
New in version 3.13.

.sp
Whether to enable \fBMalloc Scribble\fP
in the Diagnostics section of the generated Xcode scheme.
.sp
This variable initializes the
\fI\%XCODE_SCHEME_MALLOC_SCRIBBLE\fP
property on all targets.
.sp
Please refer to the \fI\%XCODE_GENERATE_SCHEME\fP target property
documentation to see all Xcode schema related properties.
.SS CMAKE_XCODE_SCHEME_MALLOC_STACK
.sp
New in version 3.13.

.sp
Whether to enable \fBMalloc Stack\fP in the Diagnostics
section of the generated Xcode scheme.
.sp
This variable initializes the
\fI\%XCODE_SCHEME_MALLOC_STACK\fP
property on all targets.
.sp
Please refer to the \fI\%XCODE_GENERATE_SCHEME\fP target property
documentation to see all Xcode schema related properties.
.SS CMAKE_XCODE_SCHEME_THREAD_SANITIZER
.sp
New in version 3.13.

.sp
Whether to enable \fBThread Sanitizer\fP in the Diagnostics
section of the generated Xcode scheme.
.sp
This variable initializes the
\fI\%XCODE_SCHEME_THREAD_SANITIZER\fP
property on all targets.
.sp
Please refer to the \fI\%XCODE_GENERATE_SCHEME\fP target property
documentation to see all Xcode schema related properties.
.SS CMAKE_XCODE_SCHEME_THREAD_SANITIZER_STOP
.sp
New in version 3.13.

.sp
Whether to enable \fBThread Sanitizer \- Pause on issues\fP
in the Diagnostics section of the generated Xcode scheme.
.sp
This variable initializes the
\fI\%XCODE_SCHEME_THREAD_SANITIZER_STOP\fP
property on all targets.
.sp
Please refer to the \fI\%XCODE_GENERATE_SCHEME\fP target property
documentation to see all Xcode schema related properties.
.SS CMAKE_XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER
.sp
New in version 3.13.

.sp
Whether to enable \fBUndefined Behavior Sanitizer\fP
in the Diagnostics section of the generated Xcode scheme.
.sp
This variable initializes the
\fI\%XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER\fP
property on all targets.
.sp
Please refer to the \fI\%XCODE_GENERATE_SCHEME\fP target property
documentation to see all Xcode schema related properties.
.SS CMAKE_XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER_STOP
.sp
New in version 3.13.

.sp
Whether to enable \fBUndefined Behavior Sanitizer\fP option
\fBPause on issues\fP
in the Diagnostics section of the generated Xcode scheme.
.sp
This variable initializes the
\fI\%XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER_STOP\fP
property on all targets.
.sp
Please refer to the \fI\%XCODE_GENERATE_SCHEME\fP target property
documentation to see all Xcode schema related properties.
.SS CMAKE_XCODE_SCHEME_WORKING_DIRECTORY
.sp
New in version 3.17.

.sp
Specify the \fBWorking Directory\fP of the \fIRun\fP and \fIProfile\fP
actions in the generated Xcode scheme.
.sp
This variable initializes the
\fI\%XCODE_SCHEME_WORKING_DIRECTORY\fP
property on all targets.
.sp
Please refer to the \fI\%XCODE_GENERATE_SCHEME\fP target property
documentation to see all Xcode schema related properties.
.SS CMAKE_XCODE_SCHEME_ZOMBIE_OBJECTS
.sp
New in version 3.13.

.sp
Whether to enable \fBZombie Objects\fP
in the Diagnostics section of the generated Xcode scheme.
.sp
This variable initializes the
\fI\%XCODE_SCHEME_ZOMBIE_OBJECTS\fP
property on all targets.
.sp
Please refer to the \fI\%XCODE_GENERATE_SCHEME\fP target property
documentation to see all Xcode schema related properties.
.SS CMAKE_XCODE_XCCONFIG
.sp
New in version 3.24.

.sp
If set, the \fI\%Xcode\fP generator will register the specified
file as a global XCConfig file. For target\-level XCConfig files see
the \fI\%XCODE_XCCONFIG\fP target property.
.sp
This feature is intended to ease migration from native Xcode projects
to CMake projects.
.sp
Contents of \fBCMAKE_XCODE_XCCONFIG\fP may use
\fI\%generator expressions\fP\&.
.SS <PackageName>_ROOT
.sp
New in version 3.12.

.sp
Calls to \fI\%find_package(<PackageName>)\fP will search in prefixes
specified by the \fB<PackageName>_ROOT\fP CMake variable, where
\fB<PackageName>\fP is the (case\-preserved) name given to the
\fI\%find_package()\fP call and \fB_ROOT\fP is literal.
For example, \fBfind_package(Foo)\fP will search prefixes specified in the
\fBFoo_ROOT\fP CMake variable (if set).  See policy \fI\%CMP0074\fP\&.
.sp
This variable may hold a single prefix or a
\fI\%semicolon\-separated list\fP of multiple prefixes.
.sp
See also the \fI\%<PackageName>_ROOT\fP environment variable.
.INDENT 0.0
.TP
.B <PACKAGENAME>_ROOT
New in version 3.27.

.sp
Calls to \fI\%find_package(<PackageName>)\fP will also search in
prefixes specified by the upper\-case \fB<PACKAGENAME>_ROOT\fP CMake
variable.  See policy \fI\%CMP0144\fP\&.
.UNINDENT
.SH VARIABLES THAT DESCRIBE THE SYSTEM
.SS ANDROID
.sp
New in version 3.7.

.sp
Set to \fB1\fP when the target system (\fI\%CMAKE_SYSTEM_NAME\fP) is
\fBAndroid\fP\&.
.SS APPLE
.sp
Set to \fBTrue\fP when the target system is an Apple platform
(macOS, iOS, tvOS, visionOS or watchOS).
.SS BORLAND
.sp
\fBTrue\fP if the Borland compiler is being used.
.sp
This is set to \fBtrue\fP if the Borland compiler is being used.
.SS BSD
.sp
New in version 3.25.

.sp
Set to a string value when the target system is BSD. This value can be one of
the following: DragonFlyBSD, FreeBSD, OpenBSD, or NetBSD.
.SS CMAKE_ANDROID_NDK_VERSION
.sp
New in version 3.20.

.sp
When \fI\%Cross Compiling for Android with the NDK\fP and using an
Android NDK version 11 or higher, this variable is provided by
CMake to report the NDK version number.
.SS CMAKE_CL_64
.sp
Discouraged.  Use \fI\%CMAKE_SIZEOF_VOID_P\fP instead.
.sp
Set to a true value when using a Microsoft Visual Studio \fBcl\fP compiler that
\fItargets\fP a 64\-bit architecture.
.SS CMAKE_COMPILER_2005
.sp
Using the Visual Studio 2005 compiler from Microsoft
.sp
Set to true when using the Visual Studio 2005 compiler from Microsoft.
.SS CMAKE_HOST_APPLE
.sp
\fBTrue\fP for Apple macOS operating systems.
.sp
Set to \fBtrue\fP when the host system is Apple macOS.
.SS CMAKE_HOST_BSD
.sp
New in version 3.25.

.sp
Set to a string value when the host system is BSD. This value can be one of
the following: DragonFlyBSD, FreeBSD, OpenBSD, or NetBSD.
.SS CMAKE_HOST_LINUX
.sp
New in version 3.25.

.sp
Set to true when the host system is Linux.
.SS CMAKE_HOST_SOLARIS
.sp
New in version 3.6.

.sp
\fBTrue\fP for Oracle Solaris operating systems.
.sp
Set to \fBtrue\fP when the host system is Oracle Solaris.
.SS CMAKE_HOST_SYSTEM
.sp
Composite Name of OS CMake is being run on.
.sp
This variable is the composite of \fI\%CMAKE_HOST_SYSTEM_NAME\fP and
\fI\%CMAKE_HOST_SYSTEM_VERSION\fP, e.g.
\fB${CMAKE_HOST_SYSTEM_NAME}\-${CMAKE_HOST_SYSTEM_VERSION}\fP\&.  If
\fI\%CMAKE_HOST_SYSTEM_VERSION\fP is not set, then this variable is
the same as \fI\%CMAKE_HOST_SYSTEM_NAME\fP\&.
.SS CMAKE_HOST_SYSTEM_NAME
.sp
Name of the OS CMake is running on.
.sp
On systems that have the uname command, this variable is set to the
output of \fBuname \-s\fP\&.  \fBLinux\fP, \fBWindows\fP, and \fBDarwin\fP for macOS
are the values found on the big three operating systems.
.sp
For a list of possible values, see \fI\%CMAKE_SYSTEM_NAME\fP\&.
.SS CMAKE_HOST_SYSTEM_PROCESSOR
.sp
The name of the CPU CMake is running on.
.SS Windows Platforms
.sp
On Windows, this variable is set to the value of the environment variable
\fBPROCESSOR_ARCHITECTURE\fP\&.
.SS Unix Platforms
.sp
On systems that support \fBuname\fP, this variable is set to the output of:
.INDENT 0.0
.IP \(bu 2
\fBuname \-m\fP on GNU, Linux, Cygwin, Android, or
.IP \(bu 2
\fBarch\fP on OpenBSD, or
.IP \(bu 2
on other systems,
.INDENT 2.0
.IP \(bu 2
\fBuname \-p\fP if its exit code is nonzero, or
.IP \(bu 2
\fBuname \-m\fP otherwise.
.UNINDENT
.UNINDENT
.SS macOS Platforms
.sp
The value of \fBuname \-m\fP is used by default.
.sp
On Apple Silicon hosts, the architecture printed by \fBuname \-m\fP may vary
based on CMake\(aqs own architecture and that of the invoking process tree.
.sp
New in version 3.19.2: On Apple Silicon hosts:
.INDENT 0.0
.IP \(bu 2
The \fI\%CMAKE_APPLE_SILICON_PROCESSOR\fP variable or
the \fI\%CMAKE_APPLE_SILICON_PROCESSOR\fP environment variable
may be set to specify the host architecture explicitly.
.IP \(bu 2
If \fI\%CMAKE_OSX_ARCHITECTURES\fP is not set, CMake adds explicit
flags to tell the compiler to build for the host architecture so the
toolchain does not have to guess based on the process tree\(aqs architecture.
.UNINDENT

.SS CMAKE_HOST_SYSTEM_VERSION
.sp
The OS version CMake is running on.
.sp
A numeric version string for the system.  On systems that support
\fBuname\fP, this variable is set to the output of \fBuname \-r\fP\&. On other
systems this is set to major\-minor version numbers.
.SS CMAKE_HOST_UNIX
.sp
\fBTrue\fP for UNIX and UNIX like operating systems.
.sp
Set to \fBtrue\fP when the host system is UNIX or UNIX like (i.e.  APPLE and
CYGWIN).
.SS CMAKE_HOST_WIN32
.sp
\fBTrue\fP if the host system is running Windows, including Windows 64\-bit and MSYS.
.sp
Set to \fBfalse\fP on Cygwin.
.SS CMAKE_LIBRARY_ARCHITECTURE
.sp
Target architecture library directory name, if detected.
.sp
This is the value of \fI\%CMAKE_<LANG>_LIBRARY_ARCHITECTURE\fP as detected
for one of the enabled languages.
.SS CMAKE_LIBRARY_ARCHITECTURE_REGEX
.sp
Regex matching possible target architecture library directory names.
.sp
This is used to detect \fI\%CMAKE_<LANG>_LIBRARY_ARCHITECTURE\fP from the
implicit linker search path by matching the \fB<arch>\fP name.
.SS CMAKE_OBJECT_PATH_MAX
.sp
Maximum object file full\-path length allowed by native build tools.
.sp
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.
.SS CMAKE_SYSTEM
.sp
Composite name of operating system CMake is compiling for.
.sp
This variable is the composite of \fI\%CMAKE_SYSTEM_NAME\fP and
\fI\%CMAKE_SYSTEM_VERSION\fP, e.g.
\fB${CMAKE_SYSTEM_NAME}\-${CMAKE_SYSTEM_VERSION}\fP\&.  If
\fI\%CMAKE_SYSTEM_VERSION\fP is not set, then this variable is
the same as \fI\%CMAKE_SYSTEM_NAME\fP\&.
.SS CMAKE_SYSTEM_NAME
.sp
The name of the operating system for which CMake is to build.
See the \fI\%CMAKE_SYSTEM_VERSION\fP variable for the OS version.
.sp
Note that \fBCMAKE_SYSTEM_NAME\fP is not set to anything by default when running
in script mode, since it\(aqs not building anything.
.SS System Name for Host Builds
.sp
\fBCMAKE_SYSTEM_NAME\fP is by default set to the same value as the
\fI\%CMAKE_HOST_SYSTEM_NAME\fP variable so that the build
targets the host system.
.SS System Name for Cross Compiling
.sp
\fBCMAKE_SYSTEM_NAME\fP may be set explicitly when first configuring a new build
tree in order to enable \fI\%cross compiling\fP\&.
In this case the \fI\%CMAKE_SYSTEM_VERSION\fP variable must also be
set explicitly.
.SS System Names Known to CMake
.sp
The following is a list of possible values, each associated with corresponding
operating systems or environments.
.TS
center;
|l|l|.
_
T{
Value
T}	T{
Name
T}
_
T{
\fBADSP\fP
T}	T{
Analog Devices Audio Digital Signal Processing
T}
_
T{
\fBAIX\fP
T}	T{
IBM Unix operating system
T}
_
T{
\fBAndroid\fP
T}	T{
Android operating system
T}
_
T{
\fBARTOS\fP
T}	T{
Operating system for microcontrollers
T}
_
T{
\fBBeOS\fP
T}	T{
Operating system for personal computers (discontinued)
T}
_
T{
\fBBlueGeneL\fP
T}	T{
Blue Gene/L static environment
T}
_
T{
\fBBlueGeneP\-dynamic\fP
T}	T{
Blue Gene/P dynamic environment
T}
_
T{
\fBBlueGeneP\-static\fP
T}	T{
Blue Gene/P static environment
T}
_
T{
\fBBlueGeneQ\-dynamic\fP
T}	T{
Blue Gene/Q dynamic environment
T}
_
T{
\fBBlueGeneQ\-static\fP
T}	T{
Blue Gene/Q static environment
T}
_
T{
\fBBSDOS\fP
T}	T{
BSD operating system (discontinued)
T}
_
T{
\fBCatamount\fP
T}	T{
Operating system for Cray XT series
T}
_
T{
\fBCrayLinuxEnvironment\fP
T}	T{
Cray Linux Environment
T}
_
T{
\fBCYGWIN\fP
T}	T{
Cygwin environment for Windows
T}
_
T{
\fBDarwin\fP
T}	T{
Apple stationary operating systems (macOS, OS X, etc.)
T}
_
T{
\fBDOS\fP
T}	T{
MS\-DOS or compatible
T}
_
T{
\fBDragonFly\fP
T}	T{
BSD\-derived operating system
T}
_
T{
\fBeCos\fP
T}	T{
Real\-time embedded operating system
T}
_
T{
\fBEmscripten\fP
T}	T{
Compiler toolchain to WebAssembly
T}
_
T{
\fBEuros\fP
T}	T{
Real\-time operating system for embedded devices
T}
_
T{
\fBFreeBSD\fP
T}	T{
FreeBSD operating system
T}
_
T{
\fBFuchsia\fP
T}	T{
Operating system by Google based on the Zircon kernel
T}
_
T{
\fBGeneric\-ADSP\fP
T}	T{
Generic ADSP (Audio DSP) environment
T}
_
T{
\fBGeneric\-ELF\fP
T}	T{
Generic ELF (Executable and Linkable Format) environment
T}
_
T{
\fBGeneric\fP
T}	T{
Some platforms, e.g. bare metal embedded devices
T}
_
T{
\fBGHS\-MULTI\fP
T}	T{
Green Hills Software MULTI environment
T}
_
T{
\fBGNU\fP
T}	T{
GNU/Hurd\-based operating system
T}
_
T{
\fBHaiku\fP
T}	T{
Unix operating system inspired by BeOS
T}
_
T{
\fBHP\-UX\fP
T}	T{
Hewlett Packard Unix
T}
_
T{
\fBiOS\fP
T}	T{
Apple mobile phone operating system
T}
_
T{
\fBkFreeBSD\fP
T}	T{
FreeBSD kernel with a GNU userland
T}
_
T{
\fBLinux\fP
T}	T{
All Linux\-based distributions
T}
_
T{
\fBMidipix\fP
T}	T{
POSIX\-compatible layer for Windows
T}
_
T{
\fBMirBSD\fP
T}	T{
MirOS BSD operating system
T}
_
T{
\fBMP\-RAS\fP
T}	T{
MP\-RAS UNIX operating system
T}
_
T{
\fBMSYS\fP
T}	T{
MSYS environment (MSYSTEM=MSYS)
T}
_
T{
\fBNetBSD\fP
T}	T{
NetBSD operating systems
T}
_
T{
\fBOpenBSD\fP
T}	T{
OpenBSD operating systems
T}
_
T{
\fBOpenVMS\fP
T}	T{
OpenVMS operating system by HP
T}
_
T{
\fBOS2\fP
T}	T{
OS/2 operating system
T}
_
T{
\fBOSF1\fP
T}	T{
Compaq Tru64 UNIX (formerly DEC OSF/1, Digital Unix) (discontinued)
T}
_
T{
\fBQNX\fP
T}	T{
Unix\-like operating system by BlackBerry
T}
_
T{
\fBRISCos\fP
T}	T{
RISC OS operating system
T}
_
T{
\fBSCO_SV\fP
T}	T{
SCO OpenServer 5
T}
_
T{
\fBSerenityOS\fP
T}	T{
Unix\-like operating system
T}
_
T{
\fBSINIX\fP
T}	T{
SINIX operating system
T}
_
T{
\fBSunOS\fP
T}	T{
Oracle Solaris and all illumos operating systems
T}
_
T{
\fBsyllable\fP
T}	T{
Syllable operating system
T}
_
T{
\fBTru64\fP
T}	T{
Compaq Tru64 UNIX (formerly DEC OSF/1) operating system
T}
_
T{
\fBtvOS\fP
T}	T{
Apple TV operating system
T}
_
T{
\fBULTRIX\fP
T}	T{
Unix operating system (discontinued)
T}
_
T{
\fBUNIX_SV\fP
T}	T{
SCO UnixWare (pre release 7)
T}
_
T{
\fBUnixWare\fP
T}	T{
SCO UnixWare 7
T}
_
T{
\fBvisionOS\fP
T}	T{
Apple mixed reality operating system
T}
_
T{
\fBwatchOS\fP
T}	T{
Apple watch operating system
T}
_
T{
\fBWindows\fP
T}	T{
Windows stationary operating systems
T}
_
T{
\fBWindowsCE\fP
T}	T{
Windows Embedded Compact
T}
_
T{
\fBWindowsPhone\fP
T}	T{
Windows mobile phone operating system
T}
_
T{
\fBWindowsStore\fP
T}	T{
Universal Windows Platform applications
T}
_
T{
\fBXenix\fP
T}	T{
SCO Xenix Unix operating system (discontinued)
T}
_
.TE
.sp
Platform\-specific notes:
.INDENT 0.0
.IP \(bu 2
MSYS2\(aqs \fBmsys/cmake\fP package (\fB/usr/bin/cmake\fP) works only under
\fBMSYSTEM=MSYS\fP environments, with system name \fBMSYS\fP\&.  Under other
environments like \fBMSYSTEM=MINGW64\fP, use another package such
as \fBmingw64/mingw\-w64\-x86_64\-cmake\fP (\fB/mingw64/bin/cmake\fP),
which targets \fBMSYSTEM=MINGW64\fP with system name \fBWindows\fP\&.
.IP \(bu 2
Cygwin\(aqs \fBcmake\fP package (\fB/usr/bin/cmake\fP) uses system name \fBCYGWIN\fP\&.
A non\-cygwin CMake on Windows (e.g. \fB$PROGRAMFILES/CMake/bin/cmake\fP)
uses system name \fBWindows\fP even when it runs under a Cygwin environment.
.UNINDENT
.SS CMAKE_SYSTEM_PROCESSOR
.sp
When not cross\-compiling, this variable has the same value as the
\fI\%CMAKE_HOST_SYSTEM_PROCESSOR\fP 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 \fBAMD64\fP
even when using a MSVC \fBcl\fP compiler with a 32\-bit target.)
.sp
When cross\-compiling, a \fI\%CMAKE_TOOLCHAIN_FILE\fP should set
the \fBCMAKE_SYSTEM_PROCESSOR\fP variable to match target architecture
that it specifies (via \fI\%CMAKE_<LANG>_COMPILER\fP and perhaps
\fI\%CMAKE_<LANG>_COMPILER_TARGET\fP).
.SS CMAKE_SYSTEM_VERSION
.sp
The version of the operating system for which CMake is to build.
See the \fI\%CMAKE_SYSTEM_NAME\fP variable for the OS name.
.SS System Version for Host Builds
.sp
When the \fI\%CMAKE_SYSTEM_NAME\fP variable takes its default value
then \fBCMAKE_SYSTEM_VERSION\fP is by default set to the same value as the
\fI\%CMAKE_HOST_SYSTEM_VERSION\fP variable so that the build targets
the host system version.
.sp
In the case of a host build then \fBCMAKE_SYSTEM_VERSION\fP 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.
.SS System Version for Cross Compiling
.sp
When the \fI\%CMAKE_SYSTEM_NAME\fP variable is set explicitly to
enable \fI\%cross compiling\fP then the
value of \fBCMAKE_SYSTEM_VERSION\fP must also be set explicitly to specify
the target system version.
.SS CYGWIN
.sp
\fBTrue\fP for Cygwin.
.sp
Set to \fBtrue\fP when using Cygwin.
.SS GHSMULTI
.sp
New in version 3.3.

.sp
\fB1\fP when using \fI\%Green Hills MULTI\fP generator.
.sp
Also, Set to \fB1\fP when the target system is a Green Hills platform
(i.e. When \fI\%CMAKE_SYSTEM_NAME\fP is \fBGHS\-MULTI\fP).
.SS IOS
.sp
New in version 3.14.

.sp
Set to \fB1\fP when the target system (\fI\%CMAKE_SYSTEM_NAME\fP) is \fBiOS\fP\&.
.SS LINUX
.sp
New in version 3.25.

.sp
Set to true when the target system is Linux.
.SS MINGW
.sp
New in version 3.2.

.sp
Set to a true value when at least one language is enabled
with a compiler targeting the GNU ABI on Windows (MinGW).
.sp
Otherwise, this variable is not set by CMake.
.SS MSVC
.sp
Set to \fBtrue\fP when the compiler is some version of Microsoft Visual C++
or another compiler simulating the Visual C++ \fBcl\fP command\-line syntax.
.sp
See also the \fI\%MSVC_VERSION\fP variable.
.SS MSVC_IDE
.sp
\fBTrue\fP when using the Microsoft Visual C++ IDE.
.sp
Set to \fBtrue\fP when the target platform is the Microsoft Visual C++ IDE, as
opposed to the command line compiler.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
This variable is only available after compiler detection has been performed,
so it is not available to toolchain files or before the first
\fI\%project()\fP or \fI\%enable_language()\fP call which uses an
MSVC\-like compiler.
.UNINDENT
.UNINDENT
.SS MSVC_TOOLSET_VERSION
.sp
New in version 3.12.

.sp
The toolset version of Microsoft Visual C/C++ being used if any.
If MSVC\-like is being used, this variable is set based on the version
of the compiler as given by the \fI\%MSVC_VERSION\fP variable.
.sp
Known toolset version numbers are:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
80        = VS 2005 (8.0)
90        = VS 2008 (9.0)
100       = VS 2010 (10.0)
110       = VS 2012 (11.0)
120       = VS 2013 (12.0)
140       = VS 2015 (14.0)
141       = VS 2017 (15.0)
142       = VS 2019 (16.0)
143       = VS 2022 (17.0)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Compiler versions newer than those known to CMake will be reported
as the latest known toolset version.
.sp
See also the \fI\%MSVC_VERSION\fP variable.
.SS MSVC_VERSION
.sp
The version of Microsoft Visual C/C++ being used if any.
If a compiler simulating Visual C++ is being used, this variable is set
to the toolset version simulated as given by the \fB_MSC_VER\fP
preprocessor definition.
.sp
Known version numbers are:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
1200      = VS  6.0
1300      = VS  7.0
1310      = VS  7.1
1400      = VS  8.0 (v80 toolset)
1500      = VS  9.0 (v90 toolset)
1600      = VS 10.0 (v100 toolset)
1700      = VS 11.0 (v110 toolset)
1800      = VS 12.0 (v120 toolset)
1900      = VS 14.0 (v140 toolset)
1910\-1919 = VS 15.0 (v141 toolset)
1920\-1929 = VS 16.0 (v142 toolset)
1930\-1939 = VS 17.0 (v143 toolset)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
See also the  \fI\%CMAKE_<LANG>_COMPILER_VERSION\fP and
\fI\%MSVC_TOOLSET_VERSION\fP variable.
.SS MSYS
.sp
New in version 3.14.

.sp
\fBTrue\fP when using the \fI\%MSYS Makefiles\fP generator.
.SS UNIX
.sp
Set to \fBTrue\fP when the target system is UNIX or UNIX\-like
(e.g. \fI\%APPLE\fP and \fI\%CYGWIN\fP).  The
\fI\%CMAKE_SYSTEM_NAME\fP variable should be queried if
a more specific understanding of the target system is required.
.SS WIN32
.sp
Set to \fBTrue\fP when the target system is Windows, including Win64.
.SS WINCE
.sp
New in version 3.1.

.sp
True when the \fI\%CMAKE_SYSTEM_NAME\fP variable is set
to \fBWindowsCE\fP\&.
.SS WINDOWS_PHONE
.sp
New in version 3.1.

.sp
True when the \fI\%CMAKE_SYSTEM_NAME\fP variable is set
to \fBWindowsPhone\fP\&.
.SS WINDOWS_STORE
.sp
New in version 3.1.

.sp
True when the \fI\%CMAKE_SYSTEM_NAME\fP variable is set
to \fBWindowsStore\fP\&.
.SS XCODE
.sp
New in version 3.7.

.sp
\fBTrue\fP when using \fI\%Xcode\fP generator.
.SS XCODE_VERSION
.sp
Version of Xcode (\fI\%Xcode\fP generator only).
.sp
Under the \fI\%Xcode\fP generator, this is the version of Xcode
as specified in \fBXcode.app/Contents/version.plist\fP (such as \fB3.1.2\fP).
.SH VARIABLES THAT CONTROL THE BUILD
.SS CMAKE_ADSP_ROOT
.sp
New in version 3.24.

.sp
When \fI\%Cross Compiling for ADSP SHARC/Blackfin\fP,
this variable holds the absolute path to the latest CCES or VDSP++ install.
The directory is expected to contain the \fBcc21k.exe\fP and \fBccblkfn.exe\fP compilers.
This will be set automatically if a default install of CCES or VDSP++ can be found.
.sp
See also the \fI\%ADSP_ROOT\fP environment variable.
.SS CMAKE_AIX_EXPORT_ALL_SYMBOLS
.sp
New in version 3.17.

.sp
Default value for \fI\%AIX_EXPORT_ALL_SYMBOLS\fP target property.
This variable is used to initialize the property on each target as it is
created.
.SS CMAKE_ANDROID_ANT_ADDITIONAL_OPTIONS
.sp
New in version 3.4.

.sp
Default value for the \fI\%ANDROID_ANT_ADDITIONAL_OPTIONS\fP target property.
See that target property for additional information.
.SS CMAKE_ANDROID_API
.sp
New in version 3.1.

.sp
When \fI\%Cross Compiling for Android with NVIDIA Nsight Tegra Visual Studio Edition\fP, this variable may be set to specify the default value for the
\fI\%ANDROID_API\fP target property.  See that target property for
additional information.
.sp
When \fI\%Cross Compiling for Android\fP, the \fI\%CMAKE_SYSTEM_VERSION\fP
variable represents the Android API version number targeted.  For historical
reasons, if a toolchain file sets \fBCMAKE_ANDROID_API\fP, but not
\fBCMAKE_SYSTEM_VERSION\fP, the latter will be initialized using the former.
.SS CMAKE_ANDROID_API_MIN
.sp
New in version 3.2.

.sp
Default value for the \fI\%ANDROID_API_MIN\fP target property.
See that target property for additional information.
.SS CMAKE_ANDROID_ARCH
.sp
New in version 3.4.

.sp
When \fI\%Cross Compiling for Android with NVIDIA Nsight Tegra Visual Studio Edition\fP, this variable may be set to specify the default value for the
\fI\%ANDROID_ARCH\fP target property.  See that target property for
additional information.
.sp
Otherwise, when \fI\%Cross Compiling for Android\fP, this variable provides
the name of the Android architecture corresponding to the value of the
\fI\%CMAKE_ANDROID_ARCH_ABI\fP variable.  The architecture name
may be one of:
.INDENT 0.0
.IP \(bu 2
\fBarm\fP
.IP \(bu 2
\fBarm64\fP
.IP \(bu 2
\fBmips\fP
.IP \(bu 2
\fBmips64\fP
.IP \(bu 2
\fBx86\fP
.IP \(bu 2
\fBx86_64\fP
.UNINDENT
.SS CMAKE_ANDROID_ARCH_ABI
.sp
New in version 3.7.

.sp
When \fI\%Cross Compiling for Android\fP, this variable specifies the
target architecture and ABI to be used.  Valid values are:
.INDENT 0.0
.IP \(bu 2
\fBarm64\-v8a\fP
.IP \(bu 2
\fBarmeabi\-v7a\fP
.IP \(bu 2
\fBarmeabi\-v6\fP
.IP \(bu 2
\fBarmeabi\fP
.IP \(bu 2
\fBmips\fP
.IP \(bu 2
\fBmips64\fP
.IP \(bu 2
\fBx86\fP
.IP \(bu 2
\fBx86_64\fP
.UNINDENT
.sp
See also the \fI\%CMAKE_ANDROID_ARM_MODE\fP and
\fI\%CMAKE_ANDROID_ARM_NEON\fP variables.
.SS CMAKE_ANDROID_ARM_MODE
.sp
New in version 3.7.

.sp
When \fI\%Cross Compiling for Android\fP and \fI\%CMAKE_ANDROID_ARCH_ABI\fP
is set to one of the \fBarmeabi\fP architectures, set \fBCMAKE_ANDROID_ARM_MODE\fP
to \fBON\fP to target 32\-bit ARM processors (\fB\-marm\fP).  Otherwise, the
default is to target the 16\-bit Thumb processors (\fB\-mthumb\fP).
.SS CMAKE_ANDROID_ARM_NEON
.sp
New in version 3.7.

.sp
When \fI\%Cross Compiling for Android\fP and \fI\%CMAKE_ANDROID_ARCH_ABI\fP
is set to \fBarmeabi\-v7a\fP set \fBCMAKE_ANDROID_ARM_NEON\fP to \fBON\fP to target
ARM NEON devices.
.SS CMAKE_ANDROID_ASSETS_DIRECTORIES
.sp
New in version 3.4.

.sp
Default value for the \fI\%ANDROID_ASSETS_DIRECTORIES\fP target property.
See that target property for additional information.
.SS CMAKE_ANDROID_EXCEPTIONS
.sp
New in version 3.20.

.sp
When \fI\%Cross Compiling for Android with the NDK\fP, this variable may be set
to specify whether exceptions are enabled.
.SS CMAKE_ANDROID_GUI
.sp
New in version 3.1.

.sp
Default value for the \fI\%ANDROID_GUI\fP target property of
executables.  See that target property for additional information.
.SS CMAKE_ANDROID_JAR_DEPENDENCIES
.sp
New in version 3.4.

.sp
Default value for the \fI\%ANDROID_JAR_DEPENDENCIES\fP target property.
See that target property for additional information.
.SS CMAKE_ANDROID_JAR_DIRECTORIES
.sp
New in version 3.4.

.sp
Default value for the \fI\%ANDROID_JAR_DIRECTORIES\fP target property.
See that target property for additional information.
.SS CMAKE_ANDROID_JAVA_SOURCE_DIR
.sp
New in version 3.4.

.sp
Default value for the \fI\%ANDROID_JAVA_SOURCE_DIR\fP target property.
See that target property for additional information.
.SS CMAKE_ANDROID_NATIVE_LIB_DEPENDENCIES
.sp
New in version 3.4.

.sp
Default value for the \fI\%ANDROID_NATIVE_LIB_DEPENDENCIES\fP target
property.  See that target property for additional information.
.SS CMAKE_ANDROID_NATIVE_LIB_DIRECTORIES
.sp
New in version 3.4.

.sp
Default value for the \fI\%ANDROID_NATIVE_LIB_DIRECTORIES\fP target
property.  See that target property for additional information.
.SS CMAKE_ANDROID_NDK
.sp
New in version 3.7.

.sp
When \fI\%Cross Compiling for Android with the NDK\fP, this variable holds
the absolute path to the root directory of the NDK.  The directory must
contain a \fBplatforms\fP subdirectory holding the \fBandroid\-<api>\fP
directories.
.SS CMAKE_ANDROID_NDK_DEPRECATED_HEADERS
.sp
New in version 3.9.

.sp
When \fI\%Cross Compiling for Android with the NDK\fP, this variable
may be set to specify whether to use the deprecated per\-api\-level
headers instead of the unified headers.
.sp
If not specified, the default will be \fIfalse\fP if using a NDK version
that provides the unified headers and \fItrue\fP otherwise.
.SS CMAKE_ANDROID_NDK_TOOLCHAIN_HOST_TAG
.sp
New in version 3.7.1.

.sp
When \fI\%Cross Compiling for Android with the NDK\fP, this variable
provides the NDK\(aqs \(dqhost tag\(dq used to construct the path to prebuilt
toolchains that run on the host.
.SS CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION
.sp
New in version 3.7.

.sp
When \fI\%Cross Compiling for Android with the NDK\fP, this variable
may be set to specify the version of the toolchain to be used
as the compiler.
.sp
On NDK r19 or above, this variable must be unset or set to \fBclang\fP\&.
.sp
On NDK r18 or below, this variable must be set to one of these forms:
.INDENT 0.0
.IP \(bu 2
\fB<major>.<minor>\fP: GCC of specified version
.IP \(bu 2
\fBclang<major>.<minor>\fP: Clang of specified version
.IP \(bu 2
\fBclang\fP: Clang of most recent available version
.UNINDENT
.sp
A toolchain of the requested version will be selected automatically to
match the ABI named in the \fI\%CMAKE_ANDROID_ARCH_ABI\fP variable.
.sp
If not specified, the default will be a value that selects the latest
available GCC toolchain.
.SS CMAKE_ANDROID_PROCESS_MAX
.sp
New in version 3.4.

.sp
Default value for the \fI\%ANDROID_PROCESS_MAX\fP target property.
See that target property for additional information.
.SS CMAKE_ANDROID_PROGUARD
.sp
New in version 3.4.

.sp
Default value for the \fI\%ANDROID_PROGUARD\fP target property.
See that target property for additional information.
.SS CMAKE_ANDROID_PROGUARD_CONFIG_PATH
.sp
New in version 3.4.

.sp
Default value for the \fI\%ANDROID_PROGUARD_CONFIG_PATH\fP target property.
See that target property for additional information.
.SS CMAKE_ANDROID_RTTI
.sp
New in version 3.20.

.sp
When \fI\%Cross Compiling for Android with the NDK\fP, this variable may be set
to specify whether RTTI is enabled.
.SS CMAKE_ANDROID_SECURE_PROPS_PATH
.sp
New in version 3.4.

.sp
Default value for the \fI\%ANDROID_SECURE_PROPS_PATH\fP target property.
See that target property for additional information.
.SS CMAKE_ANDROID_SKIP_ANT_STEP
.sp
New in version 3.4.

.sp
Default value for the \fI\%ANDROID_SKIP_ANT_STEP\fP target property.
See that target property for additional information.
.SS CMAKE_ANDROID_STANDALONE_TOOLCHAIN
.sp
New in version 3.7.

.sp
When \fI\%Cross Compiling for Android with a Standalone Toolchain\fP, this
variable holds the absolute path to the root directory of the toolchain.
The specified directory must contain a \fBsysroot\fP subdirectory.
.SS CMAKE_ANDROID_STL_TYPE
.sp
New in version 3.4.

.sp
When \fI\%Cross Compiling for Android with NVIDIA Nsight Tegra Visual Studio Edition\fP, this variable may be set to specify the default value for the
\fI\%ANDROID_STL_TYPE\fP target property.  See that target property
for additional information.
.sp
When \fI\%Cross Compiling for Android with the NDK\fP, this variable may be
set to specify the STL variant to be used.  The value may be one of:
.INDENT 0.0
.TP
.B \fBnone\fP
No C++ Support
.TP
.B \fBsystem\fP
Minimal C++ without STL
.TP
.B \fBgabi++_static\fP
GAbi++ Static
.TP
.B \fBgabi++_shared\fP
GAbi++ Shared
.TP
.B \fBgnustl_static\fP
GNU libstdc++ Static
.TP
.B \fBgnustl_shared\fP
GNU libstdc++ Shared
.TP
.B \fBc++_static\fP
LLVM libc++ Static
.TP
.B \fBc++_shared\fP
LLVM libc++ Shared
.TP
.B \fBstlport_static\fP
STLport Static
.TP
.B \fBstlport_shared\fP
STLport Shared
.UNINDENT
.sp
The default value is \fBgnustl_static\fP on NDK versions that provide it
and otherwise \fBc++_static\fP\&.  Note that this default differs from
the native NDK build system because CMake may be used to build projects for
Android that are not natively implemented for it and use the C++ standard
library.
.SS CMAKE_APPLE_SILICON_PROCESSOR
.sp
New in version 3.19.2.

.sp
On Apple Silicon hosts running macOS, set this variable to tell
CMake what architecture to use for \fI\%CMAKE_HOST_SYSTEM_PROCESSOR\fP\&.
The value must be either \fBarm64\fP or \fBx86_64\fP\&.
.sp
The value of this variable should never be modified by project code.
It is meant to be set as a cache entry provided by the user,
e.g. via \fB\-DCMAKE_APPLE_SILICON_PROCESSOR=...\fP\&.
.sp
See also the \fI\%CMAKE_APPLE_SILICON_PROCESSOR\fP environment variable.
.SS CMAKE_ARCHIVE_OUTPUT_DIRECTORY
.sp
Where to put all the \fI\%ARCHIVE\fP
target files when built.
.sp
This variable is used to initialize the \fI\%ARCHIVE_OUTPUT_DIRECTORY\fP
property on all the targets.  See that target property for additional
information.
.SS CMAKE_ARCHIVE_OUTPUT_DIRECTORY_<CONFIG>
.sp
New in version 3.3.

.sp
Where to put all the \fI\%ARCHIVE\fP
target files when built for a specific configuration.
.sp
This variable is used to initialize the
\fI\%ARCHIVE_OUTPUT_DIRECTORY_<CONFIG>\fP property on all the targets.
See that target property for additional information.
.SS CMAKE_AUTOGEN_BETTER_GRAPH_MULTI_CONFIG
.sp
New in version 3.29.

.sp
This variable is used to initialize the
\fI\%AUTOGEN_BETTER_GRAPH_MULTI_CONFIG\fP property on all targets as they
are created.  See that target property for additional information.
.sp
By default \fBCMAKE_AUTOGEN_BETTER_GRAPH_MULTI_CONFIG\fP is unset.
.SS CMAKE_AUTOGEN_COMMAND_LINE_LENGTH_MAX
.sp
New in version 3.29.

.sp
Command line length limit for autogen targets, i.e. \fBmoc\fP or \fBuic\fP,
that triggers the use of response files on Windows instead of passing all
arguments to the command line.
.sp
By default \fBCMAKE_AUTOGEN_COMMAND_LINE_LENGTH_MAX\fP is unset.
.SS CMAKE_AUTOGEN_ORIGIN_DEPENDS
.sp
New in version 3.14.

.sp
Switch for forwarding origin target dependencies to the corresponding
\fI\%The <ORIGIN>_autogen target\fP targets.
.INDENT 0.0
.INDENT 3.5
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
If Qt 5.15 or later is used and the generator is either \fI\%Ninja\fP
or \fI\%Makefile Generators\fP, additional target dependencies are added to
the \fI\%The <ORIGIN>_autogen_timestamp_deps target\fP target instead of the
\fI\%The <ORIGIN>_autogen target\fP target.
.UNINDENT
.UNINDENT
.UNINDENT
.UNINDENT
.sp
This variable is used to initialize the \fI\%AUTOGEN_ORIGIN_DEPENDS\fP
property on all the targets.  See that target property for additional
information.
.sp
By default \fBCMAKE_AUTOGEN_ORIGIN_DEPENDS\fP is \fBON\fP\&.
.SS CMAKE_AUTOGEN_PARALLEL
.sp
New in version 3.11.

.sp
Number of parallel \fBmoc\fP or \fBuic\fP processes to start when using
\fI\%AUTOMOC\fP and \fI\%AUTOUIC\fP\&.
.sp
This variable is used to initialize the \fI\%AUTOGEN_PARALLEL\fP property
on all the targets.  See that target property for additional information.
.sp
By default \fBCMAKE_AUTOGEN_PARALLEL\fP is unset.
.SS CMAKE_AUTOGEN_USE_SYSTEM_INCLUDE
.sp
New in version 3.27.

.sp
This variable is used to initialize the \fI\%AUTOGEN_USE_SYSTEM_INCLUDE\fP
property on all targets as they are created.  See that target property for
additional information.
.sp
By default \fBCMAKE_AUTOGEN_USE_SYSTEM_INCLUDE\fP is unset.
.SS CMAKE_AUTOGEN_VERBOSE
.sp
New in version 3.13.

.sp
Sets the verbosity of \fI\%AUTOMOC\fP, \fI\%AUTOUIC\fP and
\fI\%AUTORCC\fP\&.  A positive integer value or a true boolean value
lets the \fBAUTO*\fP generators output additional processing information.
.sp
Setting \fBCMAKE_AUTOGEN_VERBOSE\fP has the same effect
as setting the \fBVERBOSE\fP environment variable during
generation (e.g. by calling \fBmake VERBOSE=1\fP).
The extra verbosity is limited to the \fBAUTO*\fP generators though.
.sp
By default \fBCMAKE_AUTOGEN_VERBOSE\fP is unset.
.SS CMAKE_AUTOMOC
.sp
Whether to handle \fBmoc\fP automatically for Qt targets.
.sp
This variable is used to initialize the \fI\%AUTOMOC\fP property on all the
targets.  See that target property for additional information.
.SS CMAKE_AUTOMOC_COMPILER_PREDEFINES
.sp
New in version 3.10.

.sp
This variable is used to initialize the \fI\%AUTOMOC_COMPILER_PREDEFINES\fP
property on all the targets. See that target property for additional
information.
.sp
By default it is ON.
.SS CMAKE_AUTOMOC_DEPEND_FILTERS
.sp
New in version 3.9.

.sp
Filter definitions used by \fI\%CMAKE_AUTOMOC\fP
to extract file names from source code as additional dependencies
for the \fBmoc\fP file.
.sp
This variable is used to initialize the \fI\%AUTOMOC_DEPEND_FILTERS\fP
property on all the targets. See that target property for additional
information.
.sp
By default it is empty.
.SS CMAKE_AUTOMOC_MACRO_NAMES
.sp
New in version 3.10.

.sp
\fI\%Semicolon\-separated list\fP list of macro names used by
\fI\%CMAKE_AUTOMOC\fP to determine if a C++ file needs to be
processed by \fBmoc\fP\&.
.sp
This variable is used to initialize the \fI\%AUTOMOC_MACRO_NAMES\fP
property on all the targets. See that target property for additional
information.
.sp
The default value is \fBQ_OBJECT;Q_GADGET;Q_NAMESPACE;Q_NAMESPACE_EXPORT\fP\&.
.SS Example
.sp
Let CMake know that source files that contain \fBCUSTOM_MACRO\fP must be \fBmoc\fP
processed as well:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
set(CMAKE_AUTOMOC ON)
list(APPEND CMAKE_AUTOMOC_MACRO_NAMES \(dqCUSTOM_MACRO\(dq)
.ft P
.fi
.UNINDENT
.UNINDENT
.SS CMAKE_AUTOMOC_MOC_OPTIONS
.sp
Additional options for \fBmoc\fP when using \fI\%CMAKE_AUTOMOC\fP\&.
.sp
This variable is used to initialize the \fI\%AUTOMOC_MOC_OPTIONS\fP property
on all the targets.  See that target property for additional information.
.SS CMAKE_AUTOMOC_PATH_PREFIX
.sp
New in version 3.16.

.sp
Whether to generate the \fB\-p\fP path prefix option for \fBmoc\fP on
\fI\%AUTOMOC\fP enabled Qt targets.
.sp
This variable is used to initialize the \fI\%AUTOMOC_PATH_PREFIX\fP
property on all the targets.  See that target property for additional
information.
.sp
The default value is \fBOFF\fP\&.
.SS CMAKE_AUTOMOC_EXECUTABLE
.sp
New in version 3.27.

.sp
This variable is used to initialize the \fI\%AUTOMOC_EXECUTABLE\fP
property on all the targets. See that target property for additional
information.
.sp
By default it is empty.
.SS CMAKE_AUTORCC
.sp
Whether to handle \fBrcc\fP automatically for Qt targets.
.sp
This variable is used to initialize the \fI\%AUTORCC\fP property on all
the targets.  See that target property for additional information.
.SS CMAKE_AUTORCC_OPTIONS
.sp
Additional options for \fBrcc\fP when using \fI\%CMAKE_AUTORCC\fP\&.
.sp
This variable is used to initialize the \fI\%AUTORCC_OPTIONS\fP property on
all the targets.  See that target property for additional information.
.SS EXAMPLE
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
# ...
set(CMAKE_AUTORCC_OPTIONS \(dq\-\-compress;9\(dq)
# ...
.ft P
.fi
.UNINDENT
.UNINDENT
.SS CMAKE_AUTORCC_EXECUTABLE
.sp
New in version 3.27.

.sp
This variable is used to initialize the \fI\%AUTORCC_EXECUTABLE\fP
property on all the targets. See that target property for additional
information.
.sp
By default it is empty.
.SS CMAKE_AUTOUIC
.sp
Whether to handle \fBuic\fP automatically for Qt targets.
.sp
This variable is used to initialize the \fI\%AUTOUIC\fP property on all
the targets.  See that target property for additional information.
.SS CMAKE_AUTOUIC_OPTIONS
.sp
Additional options for \fBuic\fP when using \fI\%CMAKE_AUTOUIC\fP\&.
.sp
This variable is used to initialize the \fI\%AUTOUIC_OPTIONS\fP property on
all the targets.  See that target property for additional information.
.SS EXAMPLE
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
# ...
set_property(CMAKE_AUTOUIC_OPTIONS \(dq\-\-no\-protection\(dq)
# ...
.ft P
.fi
.UNINDENT
.UNINDENT
.SS CMAKE_AUTOUIC_SEARCH_PATHS
.sp
New in version 3.9.

.sp
Search path list used by \fI\%CMAKE_AUTOUIC\fP to find included
\fB\&.ui\fP files.
.sp
This variable is used to initialize the \fI\%AUTOUIC_SEARCH_PATHS\fP
property on all the targets. See that target property for additional
information.
.sp
By default it is empty.
.SS CMAKE_AUTOUIC_EXECUTABLE
.sp
New in version 3.27.

.sp
This variable is used to initialize the \fI\%AUTOUIC_EXECUTABLE\fP
property on all the targets. See that target property for additional
information.
.sp
By default it is empty.
.SS CMAKE_BUILD_RPATH
.sp
New in version 3.8.

.sp
\fI\%Semicolon\-separated list\fP specifying runtime path (\fBRPATH\fP)
entries to add to binaries linked in the build tree (for platforms that
support it).  The entries will \fInot\fP be used for binaries in the install
tree.  See also the \fI\%CMAKE_INSTALL_RPATH\fP variable.
.sp
This is used to initialize the \fI\%BUILD_RPATH\fP target property
for all targets.
.SS CMAKE_BUILD_RPATH_USE_ORIGIN
.sp
New in version 3.14.

.sp
Whether to use relative paths for the build \fBRPATH\fP\&.
.sp
This is used to initialize the \fI\%BUILD_RPATH_USE_ORIGIN\fP target
property for all targets, see that property for more details.
.SS CMAKE_BUILD_WITH_INSTALL_NAME_DIR
.sp
New in version 3.9.

.sp
Whether to use \fI\%INSTALL_NAME_DIR\fP on targets in the build tree.
.sp
This variable is used to initialize the \fI\%BUILD_WITH_INSTALL_NAME_DIR\fP
property on all targets.
.SS CMAKE_BUILD_WITH_INSTALL_RPATH
.sp
Use the install path for the \fBRPATH\fP\&.
.sp
Normally CMake uses the build tree for the \fBRPATH\fP when building
executables etc on systems that use \fBRPATH\fP\&.  When the software is
installed the executables etc are relinked by CMake to have the
install \fBRPATH\fP\&.  If this variable is set to true then the software is
always built with the install path for the \fBRPATH\fP and does not need to
be relinked when installed.
.sp
This is used to initialize the \fI\%BUILD_WITH_INSTALL_RPATH\fP target property
for all targets.
.SS CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY
.sp
New in version 3.1.

.sp
Output directory for MS debug symbol \fB\&.pdb\fP files
generated by the compiler while building source files.
.sp
This variable is used to initialize the
\fI\%COMPILE_PDB_OUTPUT_DIRECTORY\fP property on all the targets.
.SS CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_<CONFIG>
.sp
New in version 3.1.

.sp
Per\-configuration output directory for MS debug symbol \fB\&.pdb\fP files
generated by the compiler while building source files.
.sp
This is a per\-configuration version of
\fI\%CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY\fP\&.
This variable is used to initialize the
\fI\%COMPILE_PDB_OUTPUT_DIRECTORY_<CONFIG>\fP
property on all the targets.
.SS CMAKE_COMPILE_WARNING_AS_ERROR
.sp
New in version 3.24.

.sp
Specify whether to treat warnings on compile as errors.
.sp
This variable is used to initialize the
\fI\%COMPILE_WARNING_AS_ERROR\fP property on all the targets.
.SS CMAKE_<CONFIG>_POSTFIX
.sp
Default filename postfix for libraries under configuration \fB<CONFIG>\fP\&.
.sp
When a non\-executable target is created its \fI\%<CONFIG>_POSTFIX\fP
target property is initialized with the value of this variable if it is set.
.SS CMAKE_CROSS_CONFIGS
.sp
New in version 3.17.

.sp
Specifies a \fI\%semicolon\-separated list\fP of
configurations available from all \fBbuild\-<Config>.ninja\fP files in the
\fI\%Ninja Multi\-Config\fP generator.  This variable activates
cross\-config mode. Targets from each config specified in this variable can be
built from any \fBbuild\-<Config>.ninja\fP file. Custom commands will use the
configuration native to \fBbuild\-<Config>.ninja\fP\&. If it is set to \fBall\fP, all
configurations from \fI\%CMAKE_CONFIGURATION_TYPES\fP are cross\-configs. If
it is not specified, or empty, each \fBbuild\-<Config>.ninja\fP file will only
contain build rules for its own configuration.
.sp
The value of this variable must be a subset of
\fI\%CMAKE_CONFIGURATION_TYPES\fP\&.
.SS CMAKE_CTEST_ARGUMENTS
.sp
New in version 3.17.

.sp
Set this to a \fI\%semicolon\-separated list\fP of
command\-line arguments to pass to \fI\%ctest(1)\fP when running tests
through the \fBtest\fP (or \fBRUN_TESTS\fP) target of the generated build system.
.SS CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS
.sp
New in version 3.16.

.sp
Default value for \fI\%CUDA_RESOLVE_DEVICE_SYMBOLS\fP target
property when defined. By default this variable is not defined.
.sp
This variable is used to initialize the property on each target as
it is created.
.SS CMAKE_CUDA_RUNTIME_LIBRARY
.sp
New in version 3.17.

.sp
Select the CUDA runtime library for use when compiling and linking CUDA.
This variable is used to initialize the \fI\%CUDA_RUNTIME_LIBRARY\fP
property on all targets as they are created.
.sp
The allowed case insensitive values are:
.INDENT 0.0
.TP
.B \fBNone\fP
Link with \fB\-cudart=none\fP or equivalent flag(s) to use no CUDA
runtime library.
.TP
.B \fBShared\fP
Link with \fB\-cudart=shared\fP or equivalent flag(s) to use a
dynamically\-linked CUDA runtime library.
.TP
.B \fBStatic\fP
Link with \fB\-cudart=static\fP or equivalent flag(s) to use a
statically\-linked CUDA runtime library.
.UNINDENT
.sp
Contents of \fBCMAKE_CUDA_RUNTIME_LIBRARY\fP may use
\fI\%generator expressions\fP\&.
.sp
If this variable is not set then the \fI\%CUDA_RUNTIME_LIBRARY\fP target
property will not be set automatically.  If that property is not set then
CMake uses an appropriate default value based on the compiler to select the
CUDA runtime library.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
This property has effect only when the \fBCUDA\fP language is enabled. To
control the CUDA runtime linking when only using the CUDA SDK with the
\fBC\fP or \fBC++\fP language we recommend using the \fI\%FindCUDAToolkit\fP
module.
.UNINDENT
.UNINDENT
.SS CMAKE_CUDA_SEPARABLE_COMPILATION
.sp
New in version 3.11.

.sp
Default value for \fI\%CUDA_SEPARABLE_COMPILATION\fP target property.
This variable is used to initialize the property on each target as it is
created.
.SS CMAKE_CXX_SCAN_FOR_MODULES
.sp
New in version 3.28.

.sp
Whether to scan C++ source files for module dependencies.
.sp
This variable is used to initialize the \fI\%CXX_SCAN_FOR_MODULES\fP
property on all the targets.  See that target property for additional
information.
.SS CMAKE_DEBUG_POSTFIX
.sp
See variable \fI\%CMAKE_<CONFIG>_POSTFIX\fP\&.
.sp
This variable is a special case of the more\-general
\fI\%CMAKE_<CONFIG>_POSTFIX\fP variable for the \fIDEBUG\fP configuration.
.SS CMAKE_DEFAULT_BUILD_TYPE
.sp
New in version 3.17.

.sp
Specifies the configuration to use by default in a \fBbuild.ninja\fP file in the
\fI\%Ninja Multi\-Config\fP generator. If this variable is specified,
\fBbuild.ninja\fP uses build rules from \fBbuild\-<Config>.ninja\fP by default. All
custom commands are executed with this configuration. If the variable is not
specified, the first item from \fI\%CMAKE_CONFIGURATION_TYPES\fP is used
instead.
.sp
The value of this variable must be one of the items from
\fI\%CMAKE_CONFIGURATION_TYPES\fP\&.
.SS CMAKE_DEFAULT_CONFIGS
.sp
New in version 3.17.

.sp
Specifies a \fI\%semicolon\-separated list\fP of configurations
to build for a target in \fBbuild.ninja\fP if no \fB:<Config>\fP suffix is specified in
the \fI\%Ninja Multi\-Config\fP generator. If it is set to \fBall\fP, all
configurations from \fI\%CMAKE_CROSS_CONFIGS\fP are used. If it is not
specified, it defaults to \fI\%CMAKE_DEFAULT_BUILD_TYPE\fP\&.
.sp
For example, if you set \fI\%CMAKE_DEFAULT_BUILD_TYPE\fP to \fBRelease\fP,
but set \fBCMAKE_DEFAULT_CONFIGS\fP to \fBDebug\fP or \fBall\fP, all
\fB<target>\fP aliases in \fBbuild.ninja\fP will resolve to \fB<target>:Debug\fP or
\fB<target>:all\fP, but custom commands will still use the \fBRelease\fP
configuration.
.sp
The value of this variable must be a subset of \fI\%CMAKE_CROSS_CONFIGS\fP
or be the same as \fI\%CMAKE_DEFAULT_BUILD_TYPE\fP\&. It must not be
specified if \fI\%CMAKE_DEFAULT_BUILD_TYPE\fP or
\fI\%CMAKE_CROSS_CONFIGS\fP is not used.
.SS CMAKE_DEPENDS_USE_COMPILER
.sp
New in version 3.20.

.sp
For the \fI\%Makefile Generators\fP, source dependencies are now, for a
selection of compilers, generated by the compiler itself. By defining this
variable with value \fBFALSE\fP, you can restore the legacy behavior (i.e. using
CMake for dependencies discovery).
.SS CMAKE_DISABLE_PRECOMPILE_HEADERS
.sp
New in version 3.16.

.sp
Default value for \fI\%DISABLE_PRECOMPILE_HEADERS\fP of targets.
.sp
By default \fBCMAKE_DISABLE_PRECOMPILE_HEADERS\fP is \fBOFF\fP\&.
.SS CMAKE_DLL_NAME_WITH_SOVERSION
.sp
New in version 3.27.

.sp
This variable is used to initialize the \fI\%DLL_NAME_WITH_SOVERSION\fP
property on shared library targets for the Windows platform, which is selected
when the \fI\%WIN32\fP variable is set.
.sp
See this target property for additional information.
.sp
Please note that setting this variable has no effect if versioned filenames
are globally disabled with the \fI\%CMAKE_PLATFORM_NO_VERSIONED_SONAME\fP
variable.
.SS CMAKE_ENABLE_EXPORTS
.sp
New in version 3.4.

.sp
Specify whether executables export symbols for loadable modules.
.sp
This variable is used to initialize the \fI\%ENABLE_EXPORTS\fP target
property for executable targets when they are created by calls to the
\fI\%add_executable()\fP command.  See the property documentation for details.
.sp
This variable has been superseded by the
\fI\%CMAKE_EXECUTABLE_ENABLE_EXPORTS\fP variable.  It is provided for
backward compatibility with older CMake code, but should not be used in new
projects.
.SS CMAKE_EXECUTABLE_ENABLE_EXPORTS
.sp
New in version 3.27.

.sp
Specify whether executables export symbols for loadable modules.
.sp
This variable is used to initialize the \fI\%ENABLE_EXPORTS\fP target
property for executable targets when they are created by calls to the
\fI\%add_executable()\fP command.  See the property documentation for details.
.sp
This variable supersede the \fI\%CMAKE_ENABLE_EXPORTS\fP variable.
.SS CMAKE_EXE_LINKER_FLAGS
.sp
Linker flags to be used to create executables.
.sp
These flags will be used by the linker when creating an executable.
.SS CMAKE_EXE_LINKER_FLAGS_<CONFIG>
.sp
Flags to be used when linking an executable.
.sp
Same as \fBCMAKE_C_FLAGS_*\fP but used by the linker when creating
executables.
.SS CMAKE_EXE_LINKER_FLAGS_<CONFIG>_INIT
.sp
New in version 3.7.

.sp
Value used to initialize the \fI\%CMAKE_EXE_LINKER_FLAGS_<CONFIG>\fP
cache entry the first time a build tree is configured.
This variable is meant to be set by a \fI\%toolchain file\fP\&.  CMake may prepend or append content to
the value based on the environment and target platform.
.sp
See also \fI\%CMAKE_EXE_LINKER_FLAGS_INIT\fP\&.
.SS CMAKE_EXE_LINKER_FLAGS_INIT
.sp
New in version 3.7.

.sp
Value used to initialize the \fI\%CMAKE_EXE_LINKER_FLAGS\fP
cache entry the first time a build tree is configured.
This variable is meant to be set by a \fI\%toolchain file\fP\&.  CMake may prepend or append content to
the value based on the environment and target platform.
.sp
See also the configuration\-specific variable
\fI\%CMAKE_EXE_LINKER_FLAGS_<CONFIG>_INIT\fP\&.
.SS CMAKE_EXPORT_FIND_PACKAGE_NAME
.sp
New in version 3.29.

.sp
Initializes the value of \fI\%EXPORT_FIND_PACKAGE_NAME\fP\&.
.SS CMAKE_FOLDER
.sp
New in version 3.12.

.sp
Set the folder name. Use to organize targets in an IDE.
.sp
This variable is used to initialize the \fI\%FOLDER\fP property on all the
targets.  See that target property for additional information.
.SS CMAKE_Fortran_FORMAT
.sp
Set to \fBFIXED\fP or \fBFREE\fP to indicate the Fortran source layout.
.sp
This variable is used to initialize the \fI\%Fortran_FORMAT\fP property on
all the targets.  See that target property for additional information.
.SS CMAKE_Fortran_MODULE_DIRECTORY
.sp
Fortran module output directory.
.sp
This variable is used to initialize the \fI\%Fortran_MODULE_DIRECTORY\fP
property on all the targets.  See that target property for additional
information.
.SS CMAKE_Fortran_PREPROCESS
.sp
New in version 3.18.

.sp
Default value for \fI\%Fortran_PREPROCESS\fP of targets.
.sp
This variable is used to initialize the \fI\%Fortran_PREPROCESS\fP
property on all the targets.  See that target property for additional
information.
.SS CMAKE_FRAMEWORK
.sp
New in version 3.15.

.sp
Default value for \fI\%FRAMEWORK\fP of targets.
.sp
This variable is used to initialize the \fI\%FRAMEWORK\fP property on
all the targets.  See that target property for additional information.
.SS CMAKE_FRAMEWORK_MULTI_CONFIG_POSTFIX_<CONFIG>
.sp
New in version 3.18.

.sp
Default framework filename postfix under configuration \fB<CONFIG>\fP when
using a multi\-config generator.
.sp
When a framework target is created its \fI\%FRAMEWORK_MULTI_CONFIG_POSTFIX_<CONFIG>\fP
target property is initialized with the value of this variable if it is set.
.SS CMAKE_GHS_NO_SOURCE_GROUP_FILE
.sp
New in version 3.14.

.sp
\fBON\fP / \fBOFF\fP boolean to control if the project file for a target should
be one single file or multiple files.  Refer to
\fI\%GHS_NO_SOURCE_GROUP_FILE\fP for further details.
.SS CMAKE_GLOBAL_AUTOGEN_TARGET
.sp
New in version 3.14.

.sp
Switch to enable generation of a global \fBautogen\fP target.
.sp
When \fBCMAKE_GLOBAL_AUTOGEN_TARGET\fP is enabled, a custom target
\fBautogen\fP is generated.  This target depends on all \fI\%AUTOMOC\fP and
\fI\%AUTOUIC\fP generated \fI\%The <ORIGIN>_autogen target\fP targets in the project.
By building the global \fBautogen\fP target, all \fI\%AUTOMOC\fP and
\fI\%AUTOUIC\fP files in the project will be generated.
.sp
The name of the global \fBautogen\fP target can be changed by setting
\fI\%CMAKE_GLOBAL_AUTOGEN_TARGET_NAME\fP\&.
.sp
By default \fBCMAKE_GLOBAL_AUTOGEN_TARGET\fP is unset.
.sp
See the \fI\%cmake\-qt(7)\fP manual for more information on using CMake
with Qt.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
\fI\%The <ORIGIN>_autogen target\fP targets by default inherit their origin target\(aqs
dependencies. This might result in unintended dependency target builds when
only \fI\%The <ORIGIN>_autogen target\fP targets are built.  A solution is to disable
\fI\%AUTOGEN_ORIGIN_DEPENDS\fP on the respective origin targets.
.UNINDENT
.UNINDENT
.SS CMAKE_GLOBAL_AUTOGEN_TARGET_NAME
.sp
New in version 3.14.

.sp
Change the name of the global \fBautogen\fP target.
.sp
When \fI\%CMAKE_GLOBAL_AUTOGEN_TARGET\fP is enabled, a global custom target
named \fBautogen\fP is created.  \fBCMAKE_GLOBAL_AUTOGEN_TARGET_NAME\fP
allows to set a different name for that target.
.sp
By default \fBCMAKE_GLOBAL_AUTOGEN_TARGET_NAME\fP is unset.
.sp
See the \fI\%cmake\-qt(7)\fP manual for more information on using CMake
with Qt.
.SS CMAKE_GLOBAL_AUTORCC_TARGET
.sp
New in version 3.14.

.sp
Switch to enable generation of a global \fBautorcc\fP target.
.sp
When \fBCMAKE_GLOBAL_AUTORCC_TARGET\fP is enabled, a custom target
\fBautorcc\fP is generated. This target depends on all \fI\%AUTORCC\fP
generated \fB<ORIGIN>_arcc_<QRC>\fP targets in the project.
By building the global \fBautorcc\fP target, all \fI\%AUTORCC\fP
files in the project will be generated.
.sp
The name of the global \fBautorcc\fP target can be changed by setting
\fI\%CMAKE_GLOBAL_AUTORCC_TARGET_NAME\fP\&.
.sp
By default \fBCMAKE_GLOBAL_AUTORCC_TARGET\fP is unset.
.sp
See the \fI\%cmake\-qt(7)\fP manual for more information on using CMake
with Qt.
.SS CMAKE_GLOBAL_AUTORCC_TARGET_NAME
.sp
New in version 3.14.

.sp
Change the name of the global \fBautorcc\fP target.
.sp
When \fI\%CMAKE_GLOBAL_AUTORCC_TARGET\fP is enabled, a global custom target
named \fBautorcc\fP is created.  \fBCMAKE_GLOBAL_AUTORCC_TARGET_NAME\fP
allows to set a different name for that target.
.sp
By default \fBCMAKE_GLOBAL_AUTORCC_TARGET_NAME\fP is unset.
.sp
See the \fI\%cmake\-qt(7)\fP manual for more information on using CMake
with Qt.
.SS CMAKE_GNUtoMS
.sp
Convert GNU import libraries (\fB\&.dll.a\fP) to MS format (\fB\&.lib\fP).
.sp
This variable is used to initialize the \fI\%GNUtoMS\fP property on
targets when they are created.  See that target property for additional
information.
.SS CMAKE_INCLUDE_CURRENT_DIR
.sp
Automatically add the current source and build directories to the include path.
.sp
If this variable is enabled, CMake automatically adds
\fI\%CMAKE_CURRENT_SOURCE_DIR\fP and \fI\%CMAKE_CURRENT_BINARY_DIR\fP
to the include path for each directory.  These additional include
directories do not propagate down to subdirectories.  This is useful
mainly for out\-of\-source builds, where files generated into the build
tree are included by files located in the source tree.
.sp
By default \fBCMAKE_INCLUDE_CURRENT_DIR\fP is \fBOFF\fP\&.
.SS CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE
.sp
Automatically add the current source and build directories to the
\fI\%INTERFACE_INCLUDE_DIRECTORIES\fP target property.
.sp
If this variable is enabled, CMake automatically adds for each shared
library target, static library target, module target and executable
target, \fI\%CMAKE_CURRENT_SOURCE_DIR\fP and
\fI\%CMAKE_CURRENT_BINARY_DIR\fP to
the \fI\%INTERFACE_INCLUDE_DIRECTORIES\fP target property.  By default
\fBCMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE\fP is \fBOFF\fP\&.
.SS CMAKE_INSTALL_NAME_DIR
.sp
Directory name for installed targets on Apple platforms.
.sp
\fBCMAKE_INSTALL_NAME_DIR\fP is used to initialize the
\fI\%INSTALL_NAME_DIR\fP property on all targets.  See that target
property for more information.
.SS CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH
.sp
New in version 3.16.

.sp
Sets the default for whether toolchain\-defined rpaths should be removed during
installation.
.sp
\fBCMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH\fP is a boolean that provides the
default value for the \fI\%INSTALL_REMOVE_ENVIRONMENT_RPATH\fP property
of all subsequently created targets.
.SS CMAKE_INSTALL_RPATH
.sp
The rpath to use for installed targets.
.sp
A semicolon\-separated list specifying the rpath to use in installed
targets (for platforms that support it).  This is used to initialize
the target property \fI\%INSTALL_RPATH\fP for all targets.
.SS CMAKE_INSTALL_RPATH_USE_LINK_PATH
.sp
Add paths to linker search and installed rpath.
.sp
\fBCMAKE_INSTALL_RPATH_USE_LINK_PATH\fP is a boolean that if set to \fBTrue\fP
will append to the runtime search path (rpath) of installed binaries
any directories outside the project that are in the linker search path or
contain linked library files.  The directories are appended after the
value of the \fI\%INSTALL_RPATH\fP target property.
.sp
This variable is used to initialize the target property
\fI\%INSTALL_RPATH_USE_LINK_PATH\fP for all targets.
.SS CMAKE_INTERPROCEDURAL_OPTIMIZATION
.sp
New in version 3.9.

.sp
Default value for \fI\%INTERPROCEDURAL_OPTIMIZATION\fP of targets.
.sp
This variable is used to initialize the \fI\%INTERPROCEDURAL_OPTIMIZATION\fP
property on all the targets.  See that target property for additional
information.
.SS CMAKE_INTERPROCEDURAL_OPTIMIZATION_<CONFIG>
.sp
New in version 3.9.

.sp
Default value for \fI\%INTERPROCEDURAL_OPTIMIZATION_<CONFIG>\fP of targets.
.sp
This variable is used to initialize the \fI\%INTERPROCEDURAL_OPTIMIZATION_<CONFIG>\fP
property on all the targets.  See that target property for additional
information.
.SS CMAKE_<LANG>_CLANG_TIDY
.sp
New in version 3.6.

.sp
Default value for \fI\%<LANG>_CLANG_TIDY\fP target property
when \fB<LANG>\fP is \fBC\fP, \fBCXX\fP, \fBOBJC\fP or \fBOBJCXX\fP\&.
.sp
This variable is used to initialize the property on each target as it is
created.  For example:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
set(CMAKE_CXX_CLANG_TIDY clang\-tidy \-checks=\-*,readability\-*)
add_executable(foo foo.cxx)
.ft P
.fi
.UNINDENT
.UNINDENT
.SS CMAKE_<LANG>_CLANG_TIDY_EXPORT_FIXES_DIR
.sp
New in version 3.26.

.sp
Default value for \fI\%<LANG>_CLANG_TIDY_EXPORT_FIXES_DIR\fP target
property when \fB<LANG>\fP is \fBC\fP, \fBCXX\fP, \fBOBJC\fP or \fBOBJCXX\fP\&.
.sp
This variable is used to initialize the property on each target as it is
created.  For example:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
set(CMAKE_CXX_CLANG_TIDY_EXPORT_FIXES_DIR clang\-tidy\-fixes)
add_executable(foo foo.cxx)
.ft P
.fi
.UNINDENT
.UNINDENT
.SS CMAKE_<LANG>_COMPILER_LAUNCHER
.sp
New in version 3.4.

.sp
Default value for \fI\%<LANG>_COMPILER_LAUNCHER\fP target property.
This variable is used to initialize the property on each target as it is
created.  This is done only when \fB<LANG>\fP is \fBC\fP, \fBCXX\fP, \fBFortran\fP,
\fBHIP\fP, \fBISPC\fP, \fBOBJC\fP, \fBOBJCXX\fP, or \fBCUDA\fP\&.
.sp
This variable is initialized to the \fI\%CMAKE_<LANG>_COMPILER_LAUNCHER\fP
environment variable if it is set.
.SS CMAKE_<LANG>_CPPCHECK
.sp
New in version 3.10.

.sp
Default value for \fI\%<LANG>_CPPCHECK\fP target property. This variable
is used to initialize the property on each target as it is created.  This
is done only when \fB<LANG>\fP is \fBC\fP or \fBCXX\fP\&.
.SS CMAKE_<LANG>_CPPLINT
.sp
New in version 3.8.

.sp
Default value for \fI\%<LANG>_CPPLINT\fP target property. This variable
is used to initialize the property on each target as it is created.  This
is done only when \fB<LANG>\fP is \fBC\fP or \fBCXX\fP\&.
.SS CMAKE_<LANG>_INCLUDE_WHAT_YOU_USE
.sp
New in version 3.3.

.sp
Default value for \fI\%<LANG>_INCLUDE_WHAT_YOU_USE\fP target property.
This variable is used to initialize the property on each target as it is
created.  This is done only when \fB<LANG>\fP is \fBC\fP or \fBCXX\fP\&.
.SS CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>
.sp
New in version 3.24.

.sp
This variable defines how to link a group of libraries for the specified
\fB<FEATURE>\fP when a \fI\%LINK_GROUP\fP generator expression is used and
the link language for the target is \fB<LANG>\fP\&.
For this variable to have any effect, the associated
\fI\%CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>_SUPPORTED\fP variable
must be set to true.
.sp
The \fI\%CMAKE_LINK_GROUP_USING_<FEATURE>\fP variable should be defined
instead for features that are independent of the link language.
.sp
Feature names are case\-sensitive and may only contain letters, numbers
and underscores.  Feature names defined in all uppercase are reserved for
CMake\(aqs own built\-in features (see \fI\%Predefined Features\fP further below).
.SS Feature Definitions
.sp
A group feature definition is a list that contains exactly two elements:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
<PREFIX> <SUFFIX>
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
On the linker command line, \fB<PREFIX>\fP will precede the list of libraries
in the group and \fB<SUFFIX>\fP will follow after.
.sp
For the elements of this variable, the \fBLINKER:\fP prefix can be used.
.sp
To pass options to the linker tool, each compiler driver has its own syntax.
The \fBLINKER:\fP prefix and \fB,\fP separator can be used to specify, in a portable
way, options to pass to the linker tool. \fBLINKER:\fP is replaced by the
appropriate driver option and \fB,\fP by the appropriate driver separator.
The driver prefix and driver separator are given by the values of the
\fI\%CMAKE_<LANG>_LINKER_WRAPPER_FLAG\fP and
\fI\%CMAKE_<LANG>_LINKER_WRAPPER_FLAG_SEP\fP variables.
.sp
For example, \fB\(dqLINKER:\-z,defs\(dq\fP becomes \fB\-Xlinker \-z \-Xlinker defs\fP for
\fBClang\fP and \fB\-Wl,\-z,defs\fP for \fBGNU GCC\fP\&.
.sp
The \fBLINKER:\fP prefix can be specified as part of a \fBSHELL:\fP prefix
expression.
.sp
The \fBLINKER:\fP prefix supports, as an alternative syntax, specification of
arguments using the \fBSHELL:\fP prefix and space as separator. The previous
example then becomes \fB\(dqLINKER:SHELL:\-z defs\(dq\fP\&.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
Specifying the \fBSHELL:\fP prefix anywhere other than at the beginning of the
\fBLINKER:\fP prefix is not supported.
.UNINDENT
.UNINDENT
.SS Examples
.SS Solving cross\-references between two static libraries
.sp
A project may define two or more static libraries which have circular
dependencies between them.  In order for the linker to resolve all symbols
at link time, it may need to search repeatedly among the libraries until no
new undefined references are created.  Different linkers use different syntax
for achieving this.  The following example shows how this may be implemented
for some linkers.  Note that this is for illustration purposes only.
Projects should use the built\-in \fBRESCAN\fP group feature instead
(see \fI\%Predefined Features\fP), which provides a more complete and more robust
implementation of this functionality.
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
set(CMAKE_C_LINK_GROUP_USING_cross_refs_SUPPORTED TRUE)
if(CMAKE_C_COMPILER_ID STREQUAL \(dqGNU\(dq AND CMAKE_SYSTEM_NAME STREQUAL \(dqLinux\(dq)
  set(CMAKE_C_LINK_GROUP_USING_cross_refs
    \(dqLINKER:\-\-start\-group\(dq
    \(dqLINKER:\-\-end\-group\(dq
  )
elseif(CMAKE_C_COMPILER_ID STREQUAL \(dqSunPro\(dq AND CMAKE_SYSTEM_NAME STREQUAL \(dqSunOS\(dq)
  set(CMAKE_C_LINK_GROUP_USING_cross_refs
    \(dqLINKER:\-z,rescan\-start\(dq
    \(dqLINKER:\-z,rescan\-end\(dq
  )
else()
  # feature not yet supported for the other environments
  set(CMAKE_C_LINK_GROUP_USING_cross_refs_SUPPORTED FALSE)
endif()

add_library(lib1 STATIC ...)
add_library(lib2 SHARED ...)

if(CMAKE_C_LINK_GROUP_USING_cross_refs_SUPPORTED)
  target_link_libraries(lib2 PRIVATE \(dq$<LINK_GROUP:cross_refs,lib1,external>\(dq)
else()
  target_link_libraries(lib2 PRIVATE lib1 external)
endif()
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
CMake will generate the following linker command line fragments when linking
\fBlib2\fP:
.INDENT 0.0
.IP \(bu 2
\fBGNU\fP: \fB\-Wl,\-\-start\-group /path/to/lib1.a \-lexternal \-Wl,\-\-end\-group\fP
.IP \(bu 2
\fBSunPro\fP: \fB\-Wl,\-z,rescan\-start /path/to/lib1.a \-lexternal \-Wl,\-z,rescan\-end\fP
.UNINDENT
.SS Predefined Features
.sp
The following built\-in group features are pre\-defined by CMake:
.INDENT 0.0
.TP
.B \fBRESCAN\fP
Some linkers are single\-pass only.  For such linkers, circular references
between libraries typically result in unresolved symbols.  This feature
instructs the linker to search the specified static libraries repeatedly
until no new undefined references are created.
.sp
Normally, a static library is searched only once in the order that it is
specified on the command line.  If a symbol in that library is needed to
resolve an undefined symbol referred to by an object in a library that
appears later on the command line, the linker would not be able to resolve
that reference.  By grouping the static libraries with the \fBRESCAN\fP
feature, they will all be searched repeatedly until all possible references
are resolved.  This will use linker options like \fB\-\-start\-group\fP and
\fB\-\-end\-group\fP, or on SunOS, \fB\-z rescan\-start\fP and \fB\-z rescan\-end\fP\&.
.sp
Using this feature has a significant performance cost. It is best to use it
only when there are unavoidable circular references between two or more
static libraries.
.sp
This feature is available when using toolchains that target Linux, BSD, and
SunOS.  It can also be used when targeting Windows platforms if the GNU
toolchain is used.
.UNINDENT
.SS CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>_SUPPORTED
.sp
New in version 3.24.

.sp
This variable specifies whether the \fB<FEATURE>\fP is supported for the link
language \fB<LANG>\fP\&.  If this variable is true, then the \fB<FEATURE>\fP must
be defined by \fI\%CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>\fP, and the
more generic \fI\%CMAKE_LINK_GROUP_USING_<FEATURE>_SUPPORTED\fP and
\fI\%CMAKE_LINK_GROUP_USING_<FEATURE>\fP variables are not used.
.sp
If \fBCMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>_SUPPORTED\fP is false or is not
set, then the \fI\%CMAKE_LINK_GROUP_USING_<FEATURE>_SUPPORTED\fP variable
will determine whether \fB<FEATURE>\fP is deemed to be supported.
.SS CMAKE_<LANG>_LINK_LIBRARY_FILE_FLAG
.sp
New in version 3.16.

.sp
Language\-specific flag to be used to link a library specified by
a path to its file.
.sp
The flag will be used before a library file path is given to the
linker.  This is needed only on very few platforms.
.SS CMAKE_<LANG>_LINK_LIBRARY_FLAG
.sp
New in version 3.16.

.sp
Flag to be used to link a library into a shared library or executable.
.sp
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 \fB\-l\fP\&.
.SS CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>
.sp
New in version 3.24.

.sp
This variable defines how to link a library or framework for the specified
\fB<FEATURE>\fP when a \fI\%LINK_LIBRARY\fP generator expression is used and
the link language for the target is \fB<LANG>\fP\&.
For this variable to have any effect, the associated
\fI\%CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED\fP variable
must be set to true.
.sp
The \fI\%CMAKE_LINK_LIBRARY_USING_<FEATURE>\fP variable should be defined
instead for features that are independent of the link language.
.sp
Feature names are case\-sensitive and may only contain letters, numbers
and underscores.  Feature names defined in all uppercase are reserved for
CMake\(aqs own built\-in features (see \fI\%Predefined Features\fP further below).
.SS Feature Definitions
.sp
A library feature definition is a list that contains one or three elements:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
[<PREFIX>] <LIBRARY_EXPRESSION> [<SUFFIX>]
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
When \fB<PREFIX>\fP and \fB<SUFFIX>\fP are specified, they precede and follow
respectively the whole list of libraries specified in the
\fI\%LINK_LIBRARY\fP expression, not each library item individually.
There is no guarantee that the list of specified libraries will be kept
grouped together though, so the \fB<PREFIX>\fP and \fB<SUFFIX>\fP may appear
more than once if the library list is reorganized by CMake to satisfy other
constraints.  This means constructs like \fB\-\-start\-group\fP and \fB\-\-end\-group\fP,
as supported by the GNU \fBld\fP linker, cannot be used in this way.  The
\fI\%LINK_GROUP\fP generator expression should be used instead for such
constructs.
.sp
\fB<LIBRARY_EXPRESSION>\fP is used to specify the pattern for constructing the
corresponding fragment on the linker command line for each library.
The following placeholders can be used in the expression:
.INDENT 0.0
.IP \(bu 2
\fB<LIBRARY>\fP is expanded to the full path to the library for CMake targets,
or to a platform\-specific value based on the item otherwise (the same as
\fB<LINK_ITEM>\fP on Windows, or the library base name for other platforms).
.IP \(bu 2
\fB<LINK_ITEM>\fP is expanded to how the library would normally be linked on
the linker command line.
.IP \(bu 2
\fB<LIB_ITEM>\fP is expanded to the full path to the library for CMake targets,
or the item itself exactly as specified in the \fB<LIBRARY_EXPRESSION>\fP
otherwise.
.UNINDENT
.sp
In addition to the above, it is possible to have one pattern for paths
(CMake targets and external libraries specified with file paths) and another
for other items specified by name only.  The \fBPATH{}\fP and \fBNAME{}\fP wrappers
can be used to provide the expansion for those two cases, respectively.
When wrappers are used, both must be present.  For example:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
set(CMAKE_LINK_LIBRARY_USING_weak_library
    \(dqPATH{\-weak_library <LIBRARY>}NAME{LINKER:\-weak\-l<LIB_ITEM>}\(dq
)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
For all three elements of this variable (\fB<PREFIX>\fP, \fB<LIBRARY_EXPRESSION>\fP,
and \fB<SUFFIX>\fP), the \fBLINKER:\fP prefix can be used.
.sp
To pass options to the linker tool, each compiler driver has its own syntax.
The \fBLINKER:\fP prefix and \fB,\fP separator can be used to specify, in a portable
way, options to pass to the linker tool. \fBLINKER:\fP is replaced by the
appropriate driver option and \fB,\fP by the appropriate driver separator.
The driver prefix and driver separator are given by the values of the
\fI\%CMAKE_<LANG>_LINKER_WRAPPER_FLAG\fP and
\fI\%CMAKE_<LANG>_LINKER_WRAPPER_FLAG_SEP\fP variables.
.sp
For example, \fB\(dqLINKER:\-z,defs\(dq\fP becomes \fB\-Xlinker \-z \-Xlinker defs\fP for
\fBClang\fP and \fB\-Wl,\-z,defs\fP for \fBGNU GCC\fP\&.
.sp
The \fBLINKER:\fP prefix can be specified as part of a \fBSHELL:\fP prefix
expression.
.sp
The \fBLINKER:\fP prefix supports, as an alternative syntax, specification of
arguments using the \fBSHELL:\fP prefix and space as separator. The previous
example then becomes \fB\(dqLINKER:SHELL:\-z defs\(dq\fP\&.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
Specifying the \fBSHELL:\fP prefix anywhere other than at the beginning of the
\fBLINKER:\fP prefix is not supported.
.UNINDENT
.UNINDENT
.SS Examples
.SS Loading a whole static library
.sp
A common need is to prevent the linker from discarding any symbols from a
static library.  Different linkers use different syntax for achieving this.
The following example shows how this may be implemented for some linkers.
Note that this is for illustration purposes only.  Projects should use the
built\-in \fBWHOLE_ARCHIVE\fP feature instead (see \fI\%Predefined Features\fP), which
provides a more complete and more robust implementation of this functionality.
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
set(CMAKE_C_LINK_LIBRARY_USING_load_archive_SUPPORTED TRUE)
if(CMAKE_C_COMPILER_ID STREQUAL \(dqAppleClang\(dq)
  set(CMAKE_C_LINK_LIBRARY_USING_load_archive \(dq\-force_load <LIB_ITEM>\(dq)
elseif(CMAKE_C_COMPILER_ID STREQUAL \(dqGNU\(dq AND CMAKE_SYSTEM_NAME STREQUAL \(dqLinux\(dq)
  set(CMAKE_C_LINK_LIBRARY_USING_load_archive
    \(dqLINKER:\-\-push\-state,\-\-whole\-archive\(dq
    \(dq<LINK_ITEM>\(dq
    \(dqLINKER:\-\-pop\-state\(dq
  )
elseif(CMAKE_C_COMPILER_ID STREQUAL \(dqMSVC\(dq)
  set(CMAKE_C_LINK_LIBRARY_USING_load_archive \(dq/WHOLEARCHIVE:<LIBRARY>\(dq)
else()
  # feature not yet supported for the other environments
  set(CMAKE_C_LINK_LIBRARY_USING_load_archive_SUPPORTED FALSE)
endif()

add_library(lib1 STATIC ...)
add_library(lib2 SHARED ...)

if(CMAKE_C_LINK_LIBRARY_USING_load_archive_SUPPORTED)
  # The \-force_load Apple linker option requires a file name
  set(external_lib
    \(dq$<IF:$<LINK_LANG_AND_ID:C,AppleClang>,libexternal.a,external>\(dq
  )
  target_link_libraries(lib2 PRIVATE
    \(dq$<LINK_LIBRARY:load_archive,lib1,${external_lib}>\(dq
  )
else()
  target_link_libraries(lib2 PRIVATE lib1 external)
endif()
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
CMake will generate the following link expressions:
.INDENT 0.0
.IP \(bu 2
\fBAppleClang\fP: \fB\-force_load /path/to/lib1.a \-force_load libexternal.a\fP
.IP \(bu 2
\fBGNU\fP: \fB\-Wl,\-\-push\-state,\-\-whole\-archive /path/to/lib1.a \-lexternal \-Wl,\-\-pop\-state\fP
.IP \(bu 2
\fBMSVC\fP: \fB/WHOLEARCHIVE:/path/to/lib1.lib /WHOLEARCHIVE:external.lib\fP
.UNINDENT
.SS Linking a library as weak
.sp
On macOS, it is possible to link a library in weak mode (the library and all
references are marked as weak imports).  Different flags must be used for a
library specified by file path compared to one specified by name.
This constraint can be solved using \fBPATH{}\fP and \fBNAME{}\fP wrappers.
Again, the following example shows how this may be implemented for some
linkers, but it is for illustration purposes only.  Projects should use the
built\-in \fBWEAK_FRAMEWORK\fP or \fBWEAK_LIBRARY\fP features instead (see
\fI\%Predefined Features\fP), which provide more complete and more robust
implementations of this functionality.
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
if (CMAKE_C_COMPILER_ID STREQUAL \(dqAppleClang\(dq)
  set(CMAKE_LINK_LIBRARY_USING_weak_library
      \(dqPATH{\-weak_library <LIBRARY>}NAME{LINKER:\-weak\-l<LIB_ITEM>}\(dq
  )
  set(CMAKE_LINK_LIBRARY_USING_weak_library_SUPPORTED TRUE)
endif()

add_library(lib SHARED ...)
add_executable(main ...)
if(CMAKE_LINK_LIBRARY_USING_weak_library_SUPPORTED)
  target_link_libraries(main PRIVATE \(dq$<LINK_LIBRARY:weak_library,lib,external>\(dq)
else()
  target_link_libraries(main PRIVATE lib external)
endif()
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
CMake will generate the following linker command line fragment when linking
\fBmain\fP using the \fBAppleClang\fP toolchain:
.sp
\fB\-weak_library /path/to/lib \-Xlinker \-weak\-lexternal\fP\&.
.SS Predefined Features
.sp
The following built\-in library features are pre\-defined by CMake:
.INDENT 0.0
.TP
.B \fBDEFAULT\fP
This feature corresponds to standard linking, essentially equivalent to
using no feature at all.  It is typically only used with the
\fI\%LINK_LIBRARY_OVERRIDE\fP and
\fI\%LINK_LIBRARY_OVERRIDE_<LIBRARY>\fP target properties.
.TP
.B \fBWHOLE_ARCHIVE\fP
Force inclusion of all members of a static library.  This feature is only
supported for the following platforms, with limitations as noted:
.INDENT 7.0
.IP \(bu 2
Linux.
.IP \(bu 2
All BSD variants.
.IP \(bu 2
SunOS.
.IP \(bu 2
All Apple variants.  The library must be specified as a CMake target name,
a library file name (such as \fBlibfoo.a\fP), or a library file path (such as
\fB/path/to/libfoo.a\fP).  Due to a limitation of the Apple linker, it
cannot be specified as a plain library name like \fBfoo\fP, where \fBfoo\fP
is not a CMake target.
.IP \(bu 2
Windows.  When using a MSVC or MSVC\-like toolchain, the MSVC version must
be greater than 1900.
.IP \(bu 2
Cygwin.
.IP \(bu 2
MSYS.
.UNINDENT
.TP
.B \fBFRAMEWORK\fP
This option tells the linker to search for the specified framework using
the \fB\-framework\fP linker option.  It can only be used on Apple platforms,
and only with a linker that understands the option used (i.e. the linker
provided with Xcode, or one compatible with it).
.sp
The framework can be specified as a CMake framework target, a bare framework
name, or a file path.  If a target is given, that target must have the
\fI\%FRAMEWORK\fP target property set to true.  For a file path, if it
contains a directory part, that directory will be added as a framework
search path.
.INDENT 7.0
.INDENT 3.5
.sp
.nf
.ft C
add_library(lib SHARED ...)
target_link_libraries(lib PRIVATE \(dq$<LINK_LIBRARY:FRAMEWORK,/path/to/my_framework>\(dq)

# The constructed linker command line will contain:
#   \-F/path/to \-framework my_framework
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
File paths must conform to one of the following patterns (\fB*\fP is a
wildcard, and optional parts are shown as \fB[...]\fP):
.INDENT 7.0
.INDENT 3.5
.INDENT 0.0
.IP \(bu 2
\fB[/path/to/]FwName[.framework]\fP
.IP \(bu 2
\fB[/path/to/]FwName.framework/FwName[suffix]\fP
.IP \(bu 2
\fB[/path/to/]FwName.framework/Versions/*/FwName[suffix]\fP
.UNINDENT
.UNINDENT
.UNINDENT
.sp
Note that CMake recognizes and automatically handles framework targets,
even without using the \fI\%$<LINK_LIBRARY:FRAMEWORK,...>\fP expression.
The generator expression can still be used with a CMake target if the
project wants to be explicit about it, but it is not required to do so.
The linker command line may have some differences between using the
generator expression or not, but the final result should be the same.
On the other hand, if a file path is given, CMake will recognize some paths
automatically, but not all cases.  The project may want to use
\fI\%$<LINK_LIBRARY:FRAMEWORK,...>\fP for file paths so that the expected
behavior is clear.
.sp
New in version 3.25: The \fI\%FRAMEWORK_MULTI_CONFIG_POSTFIX_<CONFIG>\fP target property as
well as the \fBsuffix\fP of the framework library name are now supported by
the \fBFRAMEWORK\fP features.

.TP
.B \fBNEEDED_FRAMEWORK\fP
This is similar to the \fBFRAMEWORK\fP feature, except it forces the linker
to link with the framework even if no symbols are used from it.  It uses
the \fB\-needed_framework\fP option and has the same linker constraints as
\fBFRAMEWORK\fP\&.
.TP
.B \fBREEXPORT_FRAMEWORK\fP
This is similar to the \fBFRAMEWORK\fP feature, except it tells the linker
that the framework should be available to clients linking to the library
being created.  It uses the \fB\-reexport_framework\fP option and has the
same linker constraints as \fBFRAMEWORK\fP\&.
.TP
.B \fBWEAK_FRAMEWORK\fP
This is similar to the \fBFRAMEWORK\fP feature, except it forces the linker
to mark the framework and all references to it as weak imports.  It uses
the \fB\-weak_framework\fP option and has the same linker constraints as
\fBFRAMEWORK\fP\&.
.TP
.B \fBNEEDED_LIBRARY\fP
This is similar to the \fBNEEDED_FRAMEWORK\fP feature, except it is for use
with non\-framework targets or libraries (Apple platforms only).
It uses the \fB\-needed_library\fP or \fB\-needed\-l\fP option as appropriate,
and has the same linker constraints as \fBNEEDED_FRAMEWORK\fP\&.
.TP
.B \fBREEXPORT_LIBRARY\fP
This is similar to the \fBREEXPORT_FRAMEWORK\fP feature,  except it is for use
with non\-framework targets or libraries (Apple platforms only).
It uses the \fB\-reexport_library\fP or \fB\-reexport\-l\fP option as appropriate,
and has the same linker constraints as \fBREEXPORT_FRAMEWORK\fP\&.
.TP
.B \fBWEAK_LIBRARY\fP
This is similar to the \fBWEAK_FRAMEWORK\fP feature, except it is for use
with non\-framework targets or libraries (Apple platforms only).
It uses the \fB\-weak_library\fP or \fB\-weak\-l\fP option as appropriate,
and has the same linker constraints as \fBWEAK_FRAMEWORK\fP\&.
.UNINDENT
.SS CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED
.sp
New in version 3.24.

.sp
Set to \fBTRUE\fP if the \fB<FEATURE>\fP, as defined by variable
\fI\%CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>\fP, is supported for the
linker language \fB<LANG>\fP\&.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
This variable is evaluated before the more generic variable
\fI\%CMAKE_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED\fP\&.
.UNINDENT
.UNINDENT
.SS CMAKE_<LANG>_LINK_WHAT_YOU_USE_FLAG
.sp
New in version 3.22.

.sp
Linker flag to be used to configure linker so that all specified libraries on
the command line will be linked into the target.
.sp
See also variable \fI\%CMAKE_LINK_WHAT_YOU_USE_CHECK\fP\&.
.SS CMAKE_<LANG>_LINKER_LAUNCHER
.sp
New in version 3.21.

.sp
Default value for \fI\%<LANG>_LINKER_LAUNCHER\fP target property. This
variable is used to initialize the property on each target as it is created.
This is done only when \fB<LANG>\fP is \fBC\fP, \fBCXX\fP, \fBOBJC\fP, or \fBOBJCXX\fP\&.
.sp
This variable is initialized to the \fI\%CMAKE_<LANG>_LINKER_LAUNCHER\fP
environment variable if it is set.
.SS CMAKE_<LANG>_USING_LINKER_MODE
.sp
New in version 3.29.

.INDENT 0.0
.TP
.B This variable specify what is the type of data stored in variable
\fI\%CMAKE_<LANG>_USING_LINKER_<TYPE>\fP\&. There are two possible values:
.TP
.B \fBFLAG\fP
\fI\%CMAKE_<LANG>_USING_LINKER_<TYPE>\fP holds compiler flags. This is
the default.
.TP
.B \fBTOOL\fP
\fI\%CMAKE_<LANG>_USING_LINKER_<TYPE>\fP holds the path to the linker
tool.
.UNINDENT
.SS CMAKE_<LANG>_USING_LINKER_<TYPE>
.sp
New in version 3.29.

.sp
This variable defines how to specify the linker for the link step for the type
as specified by the variable \fI\%CMAKE_LINKER_TYPE\fP or the target
property \fI\%LINKER_TYPE\fP\&. It can hold compiler flags for the link step
or directly the linker tool. The type of data is given by the variable
\fI\%CMAKE_<LANG>_USING_LINKER_MODE\fP\&.
.sp
For example, to specify the \fBLLVM\fP linker for \fBGNU\fP compilers, we have:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
set(CMAKE_C_USING_LINKER_LLD \(dq\-fuse\-ld=lld\(dq)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Or on \fBWindows\fP platform, for \fBClang\fP compilers simulating \fBMSVC\fP, we
have:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
set(CMAKE_C_USING_LINKER_LLD \(dq\-fuse\-ld=lld\-link\(dq)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
And for the \fBMSVC\fP compiler, linker is directly used, so we have:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
set(CMAKE_C_USING_LINKER_LLD \(dq/path/to/lld\-link.exe\(dq)
set(CMAKE_C_USING_LINKER_MODE TOOL)
.ft P
.fi
.UNINDENT
.UNINDENT
.SS CMAKE_<LANG>_VISIBILITY_PRESET
.sp
Default value for the \fI\%<LANG>_VISIBILITY_PRESET\fP target
property when a target is created.
.SS CMAKE_LIBRARY_OUTPUT_DIRECTORY
.sp
Where to put all the \fI\%LIBRARY\fP
target files when built.
.sp
This variable is used to initialize the \fI\%LIBRARY_OUTPUT_DIRECTORY\fP
property on all the targets.  See that target property for additional
information.
.SS CMAKE_LIBRARY_OUTPUT_DIRECTORY_<CONFIG>
.sp
New in version 3.3.

.sp
Where to put all the \fI\%LIBRARY\fP
target files when built for a specific configuration.
.sp
This variable is used to initialize the
\fI\%LIBRARY_OUTPUT_DIRECTORY_<CONFIG>\fP property on all the targets.
See that target property for additional information.
.SS CMAKE_LIBRARY_PATH_FLAG
.sp
The flag to be used to add a library search path to a compiler.
.sp
The flag will be used to specify a library directory to the compiler.
On most compilers this is \fB\-L\fP\&.
.SS CMAKE_LINK_DEF_FILE_FLAG
.sp
Linker flag to be used to specify a \fB\&.def\fP file for dll creation.
.sp
The flag will be used to add a \fB\&.def\fP file when creating a dll on
Windows; this is only defined on Windows.
.SS CMAKE_LINK_DEPENDS_NO_SHARED
.sp
Whether to skip link dependencies on shared library files.
.sp
This variable initializes the \fI\%LINK_DEPENDS_NO_SHARED\fP property on
targets when they are created.  See that target property for
additional information.
.SS CMAKE_LINK_DEPENDS_USE_LINKER
.sp
New in version 3.27.

.sp
For the \fI\%Makefile\fP and
\fI\%Ninja\fP generators, link dependencies are now, for a
selection of linkers, generated by the linker itself. By defining this
variable with value \fBFALSE\fP, you can deactivate this feature.
.sp
This feature is also deactivated if the \fI\%LINK_DEPENDS_NO_SHARED\fP
target property is true.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
CMake version 3.29.0\-rc3 defaults this variable to \fBFALSE\fP because
GNU binutils linkers (\fBld\fP, \fBld.bfd\fP, \fBld.gold\fP) generate spurious
dependencies on temporary files when LTO is enabled.  See \fI\%GNU bug 30568\fP\&.
.UNINDENT
.UNINDENT
.SS CMAKE_LINK_GROUP_USING_<FEATURE>
.sp
New in version 3.24.

.sp
This variable defines how to link a group of libraries for the specified
\fB<FEATURE>\fP when a \fI\%LINK_GROUP\fP generator expression is used.
Both of the following conditions must be met for this variable to have any
effect:
.INDENT 0.0
.IP \(bu 2
The associated \fI\%CMAKE_LINK_GROUP_USING_<FEATURE>_SUPPORTED\fP
variable must be set to true.
.IP \(bu 2
There is no language\-specific definition for the same \fB<FEATURE>\fP\&.
This means \fI\%CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>_SUPPORTED\fP
cannot be true for the link language used by the target for which the
\fI\%LINK_GROUP\fP generator expression is evaluated.
.UNINDENT
.sp
The \fI\%CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>\fP variable should be
defined instead for features that are dependent on the link language.
.sp
Feature names are case\-sensitive and may only contain letters, numbers
and underscores.  Feature names defined in all uppercase are reserved for
CMake\(aqs own built\-in features (see \fI\%Predefined Features\fP further below).
.SS Feature Definitions
.sp
A group feature definition is a list that contains exactly two elements:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
<PREFIX> <SUFFIX>
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
On the linker command line, \fB<PREFIX>\fP will precede the list of libraries
in the group and \fB<SUFFIX>\fP will follow after.
.sp
For the elements of this variable, the \fBLINKER:\fP prefix can be used.
.sp
To pass options to the linker tool, each compiler driver has its own syntax.
The \fBLINKER:\fP prefix and \fB,\fP separator can be used to specify, in a portable
way, options to pass to the linker tool. \fBLINKER:\fP is replaced by the
appropriate driver option and \fB,\fP by the appropriate driver separator.
The driver prefix and driver separator are given by the values of the
\fI\%CMAKE_<LANG>_LINKER_WRAPPER_FLAG\fP and
\fI\%CMAKE_<LANG>_LINKER_WRAPPER_FLAG_SEP\fP variables.
.sp
For example, \fB\(dqLINKER:\-z,defs\(dq\fP becomes \fB\-Xlinker \-z \-Xlinker defs\fP for
\fBClang\fP and \fB\-Wl,\-z,defs\fP for \fBGNU GCC\fP\&.
.sp
The \fBLINKER:\fP prefix can be specified as part of a \fBSHELL:\fP prefix
expression.
.sp
The \fBLINKER:\fP prefix supports, as an alternative syntax, specification of
arguments using the \fBSHELL:\fP prefix and space as separator. The previous
example then becomes \fB\(dqLINKER:SHELL:\-z defs\(dq\fP\&.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
Specifying the \fBSHELL:\fP prefix anywhere other than at the beginning of the
\fBLINKER:\fP prefix is not supported.
.UNINDENT
.UNINDENT
.SS Examples
.SS Solving cross\-references between two static libraries
.sp
A project may define two or more static libraries which have circular
dependencies between them.  In order for the linker to resolve all symbols
at link time, it may need to search repeatedly among the libraries until no
new undefined references are created.  Different linkers use different syntax
for achieving this.  The following example shows how this may be implemented
for some linkers.  Note that this is for illustration purposes only.
Projects should use the built\-in \fBRESCAN\fP group feature instead
(see \fI\%Predefined Features\fP), which provides a more complete and more robust
implementation of this functionality.
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
set(CMAKE_C_LINK_GROUP_USING_cross_refs_SUPPORTED TRUE)
if(CMAKE_C_COMPILER_ID STREQUAL \(dqGNU\(dq AND CMAKE_SYSTEM_NAME STREQUAL \(dqLinux\(dq)
  set(CMAKE_C_LINK_GROUP_USING_cross_refs
    \(dqLINKER:\-\-start\-group\(dq
    \(dqLINKER:\-\-end\-group\(dq
  )
elseif(CMAKE_C_COMPILER_ID STREQUAL \(dqSunPro\(dq AND CMAKE_SYSTEM_NAME STREQUAL \(dqSunOS\(dq)
  set(CMAKE_C_LINK_GROUP_USING_cross_refs
    \(dqLINKER:\-z,rescan\-start\(dq
    \(dqLINKER:\-z,rescan\-end\(dq
  )
else()
  # feature not yet supported for the other environments
  set(CMAKE_C_LINK_GROUP_USING_cross_refs_SUPPORTED FALSE)
endif()

add_library(lib1 STATIC ...)
add_library(lib2 SHARED ...)

if(CMAKE_C_LINK_GROUP_USING_cross_refs_SUPPORTED)
  target_link_libraries(lib2 PRIVATE \(dq$<LINK_GROUP:cross_refs,lib1,external>\(dq)
else()
  target_link_libraries(lib2 PRIVATE lib1 external)
endif()
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
CMake will generate the following linker command line fragments when linking
\fBlib2\fP:
.INDENT 0.0
.IP \(bu 2
\fBGNU\fP: \fB\-Wl,\-\-start\-group /path/to/lib1.a \-lexternal \-Wl,\-\-end\-group\fP
.IP \(bu 2
\fBSunPro\fP: \fB\-Wl,\-z,rescan\-start /path/to/lib1.a \-lexternal \-Wl,\-z,rescan\-end\fP
.UNINDENT
.SS Predefined Features
.sp
The following built\-in group features are pre\-defined by CMake:
.INDENT 0.0
.TP
.B \fBRESCAN\fP
Some linkers are single\-pass only.  For such linkers, circular references
between libraries typically result in unresolved symbols.  This feature
instructs the linker to search the specified static libraries repeatedly
until no new undefined references are created.
.sp
Normally, a static library is searched only once in the order that it is
specified on the command line.  If a symbol in that library is needed to
resolve an undefined symbol referred to by an object in a library that
appears later on the command line, the linker would not be able to resolve
that reference.  By grouping the static libraries with the \fBRESCAN\fP
feature, they will all be searched repeatedly until all possible references
are resolved.  This will use linker options like \fB\-\-start\-group\fP and
\fB\-\-end\-group\fP, or on SunOS, \fB\-z rescan\-start\fP and \fB\-z rescan\-end\fP\&.
.sp
Using this feature has a significant performance cost. It is best to use it
only when there are unavoidable circular references between two or more
static libraries.
.sp
This feature is available when using toolchains that target Linux, BSD, and
SunOS.  It can also be used when targeting Windows platforms if the GNU
toolchain is used.
.UNINDENT
.SS CMAKE_LINK_GROUP_USING_<FEATURE>_SUPPORTED
.sp
New in version 3.24.

.sp
This variable specifies whether the \fB<FEATURE>\fP is supported regardless of
the link language.  If this variable is true, then the \fB<FEATURE>\fP must
be defined by \fI\%CMAKE_LINK_GROUP_USING_<FEATURE>\fP\&.
.sp
Note that this variable has no effect if
\fI\%CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>_SUPPORTED\fP is true for
the link language of the target.
.SS CMAKE_LINK_INTERFACE_LIBRARIES
.sp
Default value for \fI\%LINK_INTERFACE_LIBRARIES\fP of targets.
.sp
This variable is used to initialize the \fI\%LINK_INTERFACE_LIBRARIES\fP
property on all the targets.  See that target property for additional
information.
.SS CMAKE_LINK_LIBRARY_FILE_FLAG
.sp
Flag to be used to link a library specified by a path to its file.
.sp
The flag will be used before a library file path is given to the
linker.  This is needed only on very few platforms.
.SS CMAKE_LINK_LIBRARY_FLAG
.sp
Flag to be used to link a library into an executable.
.sp
The flag will be used to specify a library to link to an executable.
On most compilers this is \fB\-l\fP\&.
.SS CMAKE_LINK_LIBRARY_USING_<FEATURE>
.sp
New in version 3.24.

.sp
This variable defines how to link a library or framework for the specified
\fB<FEATURE>\fP when a \fI\%LINK_LIBRARY\fP generator expression is used.
Both of the following conditions must be met for this variable to have any
effect:
.INDENT 0.0
.IP \(bu 2
The associated \fI\%CMAKE_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED\fP
variable must be set to true.
.IP \(bu 2
There is no language\-specific definition for the same \fB<FEATURE>\fP\&.
This means \fI\%CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED\fP
cannot be true for the link language used by the target for which the
\fI\%LINK_LIBRARY\fP generator expression is evaluated.
.UNINDENT
.sp
Feature names are case\-sensitive and may only contain letters, numbers
and underscores.  Feature names defined in all uppercase are reserved for
CMake\(aqs own built\-in features (see \fI\%Predefined Features\fP further below).
.SS Feature Definitions
.sp
A library feature definition is a list that contains one or three elements:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
[<PREFIX>] <LIBRARY_EXPRESSION> [<SUFFIX>]
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
When \fB<PREFIX>\fP and \fB<SUFFIX>\fP are specified, they precede and follow
respectively the whole list of libraries specified in the
\fI\%LINK_LIBRARY\fP expression, not each library item individually.
There is no guarantee that the list of specified libraries will be kept
grouped together though, so the \fB<PREFIX>\fP and \fB<SUFFIX>\fP may appear
more than once if the library list is reorganized by CMake to satisfy other
constraints.  This means constructs like \fB\-\-start\-group\fP and \fB\-\-end\-group\fP,
as supported by the GNU \fBld\fP linker, cannot be used in this way.  The
\fI\%LINK_GROUP\fP generator expression should be used instead for such
constructs.
.sp
\fB<LIBRARY_EXPRESSION>\fP is used to specify the pattern for constructing the
corresponding fragment on the linker command line for each library.
The following placeholders can be used in the expression:
.INDENT 0.0
.IP \(bu 2
\fB<LIBRARY>\fP is expanded to the full path to the library for CMake targets,
or to a platform\-specific value based on the item otherwise (the same as
\fB<LINK_ITEM>\fP on Windows, or the library base name for other platforms).
.IP \(bu 2
\fB<LINK_ITEM>\fP is expanded to how the library would normally be linked on
the linker command line.
.IP \(bu 2
\fB<LIB_ITEM>\fP is expanded to the full path to the library for CMake targets,
or the item itself exactly as specified in the \fB<LIBRARY_EXPRESSION>\fP
otherwise.
.UNINDENT
.sp
In addition to the above, it is possible to have one pattern for paths
(CMake targets and external libraries specified with file paths) and another
for other items specified by name only.  The \fBPATH{}\fP and \fBNAME{}\fP wrappers
can be used to provide the expansion for those two cases, respectively.
When wrappers are used, both must be present.  For example:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
set(CMAKE_LINK_LIBRARY_USING_weak_library
    \(dqPATH{\-weak_library <LIBRARY>}NAME{LINKER:\-weak\-l<LIB_ITEM>}\(dq
)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
For all three elements of this variable (\fB<PREFIX>\fP, \fB<LIBRARY_EXPRESSION>\fP,
and \fB<SUFFIX>\fP), the \fBLINKER:\fP prefix can be used.
.sp
To pass options to the linker tool, each compiler driver has its own syntax.
The \fBLINKER:\fP prefix and \fB,\fP separator can be used to specify, in a portable
way, options to pass to the linker tool. \fBLINKER:\fP is replaced by the
appropriate driver option and \fB,\fP by the appropriate driver separator.
The driver prefix and driver separator are given by the values of the
\fI\%CMAKE_<LANG>_LINKER_WRAPPER_FLAG\fP and
\fI\%CMAKE_<LANG>_LINKER_WRAPPER_FLAG_SEP\fP variables.
.sp
For example, \fB\(dqLINKER:\-z,defs\(dq\fP becomes \fB\-Xlinker \-z \-Xlinker defs\fP for
\fBClang\fP and \fB\-Wl,\-z,defs\fP for \fBGNU GCC\fP\&.
.sp
The \fBLINKER:\fP prefix can be specified as part of a \fBSHELL:\fP prefix
expression.
.sp
The \fBLINKER:\fP prefix supports, as an alternative syntax, specification of
arguments using the \fBSHELL:\fP prefix and space as separator. The previous
example then becomes \fB\(dqLINKER:SHELL:\-z defs\(dq\fP\&.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
Specifying the \fBSHELL:\fP prefix anywhere other than at the beginning of the
\fBLINKER:\fP prefix is not supported.
.UNINDENT
.UNINDENT
.SS Examples
.SS Loading a whole static library
.sp
A common need is to prevent the linker from discarding any symbols from a
static library.  Different linkers use different syntax for achieving this.
The following example shows how this may be implemented for some linkers.
Note that this is for illustration purposes only.  Projects should use the
built\-in \fBWHOLE_ARCHIVE\fP feature instead (see \fI\%Predefined Features\fP), which
provides a more complete and more robust implementation of this functionality.
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
set(CMAKE_C_LINK_LIBRARY_USING_load_archive_SUPPORTED TRUE)
if(CMAKE_C_COMPILER_ID STREQUAL \(dqAppleClang\(dq)
  set(CMAKE_C_LINK_LIBRARY_USING_load_archive \(dq\-force_load <LIB_ITEM>\(dq)
elseif(CMAKE_C_COMPILER_ID STREQUAL \(dqGNU\(dq AND CMAKE_SYSTEM_NAME STREQUAL \(dqLinux\(dq)
  set(CMAKE_C_LINK_LIBRARY_USING_load_archive
    \(dqLINKER:\-\-push\-state,\-\-whole\-archive\(dq
    \(dq<LINK_ITEM>\(dq
    \(dqLINKER:\-\-pop\-state\(dq
  )
elseif(CMAKE_C_COMPILER_ID STREQUAL \(dqMSVC\(dq)
  set(CMAKE_C_LINK_LIBRARY_USING_load_archive \(dq/WHOLEARCHIVE:<LIBRARY>\(dq)
else()
  # feature not yet supported for the other environments
  set(CMAKE_C_LINK_LIBRARY_USING_load_archive_SUPPORTED FALSE)
endif()

add_library(lib1 STATIC ...)
add_library(lib2 SHARED ...)

if(CMAKE_C_LINK_LIBRARY_USING_load_archive_SUPPORTED)
  # The \-force_load Apple linker option requires a file name
  set(external_lib
    \(dq$<IF:$<LINK_LANG_AND_ID:C,AppleClang>,libexternal.a,external>\(dq
  )
  target_link_libraries(lib2 PRIVATE
    \(dq$<LINK_LIBRARY:load_archive,lib1,${external_lib}>\(dq
  )
else()
  target_link_libraries(lib2 PRIVATE lib1 external)
endif()
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
CMake will generate the following link expressions:
.INDENT 0.0
.IP \(bu 2
\fBAppleClang\fP: \fB\-force_load /path/to/lib1.a \-force_load libexternal.a\fP
.IP \(bu 2
\fBGNU\fP: \fB\-Wl,\-\-push\-state,\-\-whole\-archive /path/to/lib1.a \-lexternal \-Wl,\-\-pop\-state\fP
.IP \(bu 2
\fBMSVC\fP: \fB/WHOLEARCHIVE:/path/to/lib1.lib /WHOLEARCHIVE:external.lib\fP
.UNINDENT
.SS Linking a library as weak
.sp
On macOS, it is possible to link a library in weak mode (the library and all
references are marked as weak imports).  Different flags must be used for a
library specified by file path compared to one specified by name.
This constraint can be solved using \fBPATH{}\fP and \fBNAME{}\fP wrappers.
Again, the following example shows how this may be implemented for some
linkers, but it is for illustration purposes only.  Projects should use the
built\-in \fBWEAK_FRAMEWORK\fP or \fBWEAK_LIBRARY\fP features instead (see
\fI\%Predefined Features\fP), which provide more complete and more robust
implementations of this functionality.
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
if (CMAKE_C_COMPILER_ID STREQUAL \(dqAppleClang\(dq)
  set(CMAKE_LINK_LIBRARY_USING_weak_library
      \(dqPATH{\-weak_library <LIBRARY>}NAME{LINKER:\-weak\-l<LIB_ITEM>}\(dq
  )
  set(CMAKE_LINK_LIBRARY_USING_weak_library_SUPPORTED TRUE)
endif()

add_library(lib SHARED ...)
add_executable(main ...)
if(CMAKE_LINK_LIBRARY_USING_weak_library_SUPPORTED)
  target_link_libraries(main PRIVATE \(dq$<LINK_LIBRARY:weak_library,lib,external>\(dq)
else()
  target_link_libraries(main PRIVATE lib external)
endif()
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
CMake will generate the following linker command line fragment when linking
\fBmain\fP using the \fBAppleClang\fP toolchain:
.sp
\fB\-weak_library /path/to/lib \-Xlinker \-weak\-lexternal\fP\&.
.SS Predefined Features
.sp
The following built\-in library features are pre\-defined by CMake:
.INDENT 0.0
.TP
.B \fBDEFAULT\fP
This feature corresponds to standard linking, essentially equivalent to
using no feature at all.  It is typically only used with the
\fI\%LINK_LIBRARY_OVERRIDE\fP and
\fI\%LINK_LIBRARY_OVERRIDE_<LIBRARY>\fP target properties.
.TP
.B \fBWHOLE_ARCHIVE\fP
Force inclusion of all members of a static library.  This feature is only
supported for the following platforms, with limitations as noted:
.INDENT 7.0
.IP \(bu 2
Linux.
.IP \(bu 2
All BSD variants.
.IP \(bu 2
SunOS.
.IP \(bu 2
All Apple variants.  The library must be specified as a CMake target name,
a library file name (such as \fBlibfoo.a\fP), or a library file path (such as
\fB/path/to/libfoo.a\fP).  Due to a limitation of the Apple linker, it
cannot be specified as a plain library name like \fBfoo\fP, where \fBfoo\fP
is not a CMake target.
.IP \(bu 2
Windows.  When using a MSVC or MSVC\-like toolchain, the MSVC version must
be greater than 1900.
.IP \(bu 2
Cygwin.
.IP \(bu 2
MSYS.
.UNINDENT
.TP
.B \fBFRAMEWORK\fP
This option tells the linker to search for the specified framework using
the \fB\-framework\fP linker option.  It can only be used on Apple platforms,
and only with a linker that understands the option used (i.e. the linker
provided with Xcode, or one compatible with it).
.sp
The framework can be specified as a CMake framework target, a bare framework
name, or a file path.  If a target is given, that target must have the
\fI\%FRAMEWORK\fP target property set to true.  For a file path, if it
contains a directory part, that directory will be added as a framework
search path.
.INDENT 7.0
.INDENT 3.5
.sp
.nf
.ft C
add_library(lib SHARED ...)
target_link_libraries(lib PRIVATE \(dq$<LINK_LIBRARY:FRAMEWORK,/path/to/my_framework>\(dq)

# The constructed linker command line will contain:
#   \-F/path/to \-framework my_framework
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
File paths must conform to one of the following patterns (\fB*\fP is a
wildcard, and optional parts are shown as \fB[...]\fP):
.INDENT 7.0
.INDENT 3.5
.INDENT 0.0
.IP \(bu 2
\fB[/path/to/]FwName[.framework]\fP
.IP \(bu 2
\fB[/path/to/]FwName.framework/FwName[suffix]\fP
.IP \(bu 2
\fB[/path/to/]FwName.framework/Versions/*/FwName[suffix]\fP
.UNINDENT
.UNINDENT
.UNINDENT
.sp
Note that CMake recognizes and automatically handles framework targets,
even without using the \fI\%$<LINK_LIBRARY:FRAMEWORK,...>\fP expression.
The generator expression can still be used with a CMake target if the
project wants to be explicit about it, but it is not required to do so.
The linker command line may have some differences between using the
generator expression or not, but the final result should be the same.
On the other hand, if a file path is given, CMake will recognize some paths
automatically, but not all cases.  The project may want to use
\fI\%$<LINK_LIBRARY:FRAMEWORK,...>\fP for file paths so that the expected
behavior is clear.
.sp
New in version 3.25: The \fI\%FRAMEWORK_MULTI_CONFIG_POSTFIX_<CONFIG>\fP target property as
well as the \fBsuffix\fP of the framework library name are now supported by
the \fBFRAMEWORK\fP features.

.TP
.B \fBNEEDED_FRAMEWORK\fP
This is similar to the \fBFRAMEWORK\fP feature, except it forces the linker
to link with the framework even if no symbols are used from it.  It uses
the \fB\-needed_framework\fP option and has the same linker constraints as
\fBFRAMEWORK\fP\&.
.TP
.B \fBREEXPORT_FRAMEWORK\fP
This is similar to the \fBFRAMEWORK\fP feature, except it tells the linker
that the framework should be available to clients linking to the library
being created.  It uses the \fB\-reexport_framework\fP option and has the
same linker constraints as \fBFRAMEWORK\fP\&.
.TP
.B \fBWEAK_FRAMEWORK\fP
This is similar to the \fBFRAMEWORK\fP feature, except it forces the linker
to mark the framework and all references to it as weak imports.  It uses
the \fB\-weak_framework\fP option and has the same linker constraints as
\fBFRAMEWORK\fP\&.
.TP
.B \fBNEEDED_LIBRARY\fP
This is similar to the \fBNEEDED_FRAMEWORK\fP feature, except it is for use
with non\-framework targets or libraries (Apple platforms only).
It uses the \fB\-needed_library\fP or \fB\-needed\-l\fP option as appropriate,
and has the same linker constraints as \fBNEEDED_FRAMEWORK\fP\&.
.TP
.B \fBREEXPORT_LIBRARY\fP
This is similar to the \fBREEXPORT_FRAMEWORK\fP feature,  except it is for use
with non\-framework targets or libraries (Apple platforms only).
It uses the \fB\-reexport_library\fP or \fB\-reexport\-l\fP option as appropriate,
and has the same linker constraints as \fBREEXPORT_FRAMEWORK\fP\&.
.TP
.B \fBWEAK_LIBRARY\fP
This is similar to the \fBWEAK_FRAMEWORK\fP feature, except it is for use
with non\-framework targets or libraries (Apple platforms only).
It uses the \fB\-weak_library\fP or \fB\-weak\-l\fP option as appropriate,
and has the same linker constraints as \fBWEAK_FRAMEWORK\fP\&.
.UNINDENT
.SS CMAKE_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED
.sp
New in version 3.24.

.sp
Set to \fBTRUE\fP if the \fB<FEATURE>\fP, as defined by variable
\fI\%CMAKE_LINK_LIBRARY_USING_<FEATURE>\fP, is supported regardless the
linker language.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
This variable is evaluated if, and only if, the variable
\fI\%CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED\fP is not
defined.
.UNINDENT
.UNINDENT
.SS CMAKE_LINK_WHAT_YOU_USE
.sp
New in version 3.7.

.sp
Default value for \fI\%LINK_WHAT_YOU_USE\fP target property.
This variable is used to initialize the property on each target as it is
created.
.SS CMAKE_LINK_WHAT_YOU_USE_CHECK
.sp
New in version 3.22.

.sp
Defines the command executed after the link step to check libraries usage.
This check is currently only defined on \fBELF\fP platforms with value
\fBldd \-u \-r\fP\&.
.sp
See also \fI\%CMAKE_<LANG>_LINK_WHAT_YOU_USE_FLAG\fP variables.
.SS CMAKE_LINKER_TYPE
.sp
New in version 3.29.

.sp
Specify which linker will be used for the link step.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
It is assumed that the linker specified is fully compatible with the standard
one. CMake will not do any options translation.
.UNINDENT
.UNINDENT
.sp
This variable is used to initialize the \fI\%LINKER_TYPE\fP target
property when they are created by calls to \fI\%add_library()\fP or
\fI\%add_executable()\fP commands. It is meaningful only for targets having a
link step. If set, its value is also used by the \fI\%try_compile()\fP
command.
.sp
Linker types are case\-sensitive and may only contain letters, numbers and
underscores. Linker types defined in all uppercase are reserved for CMake\(aqs own
built\-in types. The pre\-defined linker types are:
.INDENT 0.0
.TP
.B \fBDEFAULT\fP
This type corresponds to standard linking, essentially equivalent to
not specifying \fI\%LINKER_TYPE\fP target property.
.TP
.B \fBSYSTEM\fP
Use the standard linker delivered by the platform or the standard toolkit
(for example, \fBSYSTEM\fP imply Microsoft linker for all \fBMSVC\fP compatible
compilers). This type is supported for the following platforms/compilers:
.INDENT 7.0
.IP \(bu 2
Linux, for \fBGNU\fP, \fBClang\fP, \fBLLVMFlang\fP and \fBNVIDIA\fP compilers.
.IP \(bu 2
All Apple variants for \fBAppleClang\fP, \fBClang\fP and \fBGNU\fP compilers.
.IP \(bu 2
Windows, for \fBMSVC\fP, \fBGNU\fP, \fBClang\fP and \fBNVIDIA\fP compilers.
.UNINDENT
.TP
.B \fBLLD\fP
Use the \fBLLVM\fP linker. This type is supported for the following
platforms/compilers:
.INDENT 7.0
.IP \(bu 2
Linux, for \fBGNU\fP, \fBClang\fP, \fBLLVMFlang\fP and \fBNVIDIA\fP compilers.
.IP \(bu 2
All Apple variants for \fBClang\fP and \fBAppleClang\fP compilers.
.IP \(bu 2
Windows, for \fBGNU\fP, \fBClang\fP compilers with \fBGNU\fP front\-end and
\fBCLang\fP, \fBMSVC\fP and \fBNVIDIA\fP compilers with \fBMSVC\fP front\-end.
.UNINDENT
.TP
.B \fBBFD\fP
Use the \fBGNU\fP linker.  This type is supported for the following
platforms/compilers:
.INDENT 7.0
.IP \(bu 2
Linux, for \fBGNU\fP, \fBClang\fP, \fBLLVMFlang\fP and \fBNVIDIA\fP compilers.
.IP \(bu 2
Windows, for \fBGNU\fP, \fBClang\fP compilers with \fBGNU\fP front\-end.
.UNINDENT
.TP
.B \fBGOLD\fP
Supported on Linux platform for \fBGNU\fP, \fBClang\fP, \fBLLVMFlang\fP and
\fBNVIDIA\fP compilers.
.TP
.B \fBMOLD\fP
Use the \fI\%mold linker\fP\&. This type is
supported on the following platforms:
.INDENT 7.0
.IP \(bu 2
Linux platform for \fBGNU\fP, \fBClang\fP, \fBLLVMFlang\fP and \fBNVIDIA\fP
compilers.
.IP \(bu 2
All Apple variants for \fBClang\fP and \fBAppleClang\fP compilers as an
alias to \fBSOLD\fP\&.
.UNINDENT
.TP
.B \fBSOLD\fP
Use the \fI\%sold linker\fP\&. This type
is only supported on Apple platforms for \fBClang\fP and \fBAppleClang\fP
compilers.
.TP
.B \fBAPPLE_CLASSIC\fP
Use the Apple linker in the classic behavior (i.e. before \fBXcode 15.0\fP).
This type is only supported on Apple platforms for \fBGNU\fP, \fBClang\fP and
\fBAppleClang\fP compilers.
.TP
.B \fBMSVC\fP
Use the Microsoft linker. This type is only supported on Windows
platform for \fBMSVC\fP and \fBClang\fP compiler with \fBMSVC\fP front\-end.
.UNINDENT
.SS CMAKE_MACOSX_BUNDLE
.sp
Default value for \fI\%MACOSX_BUNDLE\fP of targets.
.sp
This variable is used to initialize the \fI\%MACOSX_BUNDLE\fP property on
all the targets.  See that target property for additional information.
.sp
This variable is set to \fBON\fP by default if \fI\%CMAKE_SYSTEM_NAME\fP
equals to \fI\%iOS, tvOS, visionOS or watchOS\fP\&.
.SS CMAKE_MACOSX_RPATH
.sp
Whether to use rpaths on macOS and iOS.
.sp
This variable is used to initialize the \fI\%MACOSX_RPATH\fP property on
all targets.
.SS CMAKE_MAP_IMPORTED_CONFIG_<CONFIG>
.sp
Default value for \fI\%MAP_IMPORTED_CONFIG_<CONFIG>\fP of targets.
.sp
This variable is used to initialize the
\fI\%MAP_IMPORTED_CONFIG_<CONFIG>\fP property on all the targets.  See
that target property for additional information.
.SS CMAKE_MODULE_LINKER_FLAGS
.sp
Linker flags to be used to create modules.
.sp
These flags will be used by the linker when creating a module.
.SS CMAKE_MODULE_LINKER_FLAGS_<CONFIG>
.sp
Flags to be used when linking a module.
.sp
Same as \fBCMAKE_C_FLAGS_*\fP but used by the linker when creating modules.
.SS CMAKE_MODULE_LINKER_FLAGS_<CONFIG>_INIT
.sp
New in version 3.7.

.sp
Value used to initialize the \fI\%CMAKE_MODULE_LINKER_FLAGS_<CONFIG>\fP
cache entry the first time a build tree is configured.
This variable is meant to be set by a \fI\%toolchain file\fP\&.  CMake may prepend or append content to
the value based on the environment and target platform.
.sp
See also \fI\%CMAKE_MODULE_LINKER_FLAGS_INIT\fP\&.
.SS CMAKE_MODULE_LINKER_FLAGS_INIT
.sp
New in version 3.7.

.sp
Value used to initialize the \fI\%CMAKE_MODULE_LINKER_FLAGS\fP
cache entry the first time a build tree is configured.
This variable is meant to be set by a \fI\%toolchain file\fP\&.  CMake may prepend or append content to
the value based on the environment and target platform.
.sp
See also the configuration\-specific variable
\fI\%CMAKE_MODULE_LINKER_FLAGS_<CONFIG>_INIT\fP\&.
.SS CMAKE_MSVC_DEBUG_INFORMATION_FORMAT
.sp
New in version 3.25.

.sp
Select the MSVC debug information format targeting the MSVC ABI.
This variable is used to initialize the
\fI\%MSVC_DEBUG_INFORMATION_FORMAT\fP property on all targets as they are
created.  It is also propagated by calls to the \fI\%try_compile()\fP command
into the test project.
.sp
The allowed values are:
.INDENT 0.0
.TP
.B \fBEmbedded\fP
Compile with \fB\-Z7\fP or equivalent flag(s) to produce object files
with full symbolic debugging information.
.TP
.B \fBProgramDatabase\fP
Compile with \fB\-Zi\fP or equivalent flag(s) to produce a program
database that contains all the symbolic debugging information.
.TP
.B \fBEditAndContinue\fP
Compile with \fB\-ZI\fP or equivalent flag(s) to produce a program
database that supports the Edit and Continue feature.
.UNINDENT
.sp
The value is ignored on compilers not targeting the MSVC ABI, but an
unsupported value will be rejected as an error when using a compiler
targeting the MSVC ABI.
.sp
The value may also be the empty string (\fB\(dq\(dq\fP), in which case no debug
information format flag will be added explicitly by CMake.
.sp
Use \fI\%generator expressions\fP to
support per\-configuration specification.  For example, the code:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT \(dq$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>\(dq)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
selects for all following targets the program database debug information format
for the Debug configuration.
.sp
If this variable is not set, the \fI\%MSVC_DEBUG_INFORMATION_FORMAT\fP
target property will not be set automatically.  If that property is not set,
CMake selects a debug information format using the default value
\fB$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>\fP, if supported by the
compiler, and otherwise \fB$<$<CONFIG:Debug,RelWithDebInfo>:Embedded>\fP\&.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
This variable has effect only when policy \fI\%CMP0141\fP is set to \fBNEW\fP
prior to the first \fI\%project()\fP or \fI\%enable_language()\fP command
that enables a language using a compiler targeting the MSVC ABI.
.UNINDENT
.UNINDENT
.SS CMAKE_MSVC_RUNTIME_LIBRARY
.sp
New in version 3.15.

.sp
Select the MSVC runtime library for use by compilers targeting the MSVC ABI.
This variable is used to initialize the \fI\%MSVC_RUNTIME_LIBRARY\fP
property on all targets as they are created.  It is also propagated by
calls to the \fI\%try_compile()\fP command into the test project.
.sp
The allowed values are:
.INDENT 0.0
.TP
.B \fBMultiThreaded\fP
Compile with \fB\-MT\fP or equivalent flag(s) to use a multi\-threaded
statically\-linked runtime library.
.TP
.B \fBMultiThreadedDLL\fP
Compile with \fB\-MD\fP or equivalent flag(s) to use a multi\-threaded
dynamically\-linked runtime library.
.TP
.B \fBMultiThreadedDebug\fP
Compile with \fB\-MTd\fP or equivalent flag(s) to use a multi\-threaded
statically\-linked runtime library.
.TP
.B \fBMultiThreadedDebugDLL\fP
Compile with \fB\-MDd\fP or equivalent flag(s) to use a multi\-threaded
dynamically\-linked runtime library.
.UNINDENT
.sp
The value is ignored on compilers not targeting the MSVC ABI, but an
unsupported value will be rejected as an error when using a compiler
targeting the MSVC ABI.
.sp
The value may also be the empty string (\fB\(dq\(dq\fP) in which case no runtime
library selection flag will be added explicitly by CMake.  Note that with
\fI\%Visual Studio Generators\fP the native build system may choose to
add its own default runtime library selection flag.
.sp
Use \fI\%generator expressions\fP to
support per\-configuration specification.  For example, the code:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
set(CMAKE_MSVC_RUNTIME_LIBRARY \(dqMultiThreaded$<$<CONFIG:Debug>:Debug>\(dq)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
selects for all following targets a multi\-threaded statically\-linked runtime
library with or without debug information depending on the configuration.
.sp
If this variable is not set then the \fI\%MSVC_RUNTIME_LIBRARY\fP target
property will not be set automatically.  If that property is not set then
CMake uses the default value \fBMultiThreaded$<$<CONFIG:Debug>:Debug>DLL\fP
to select a MSVC runtime library.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
This variable has effect only when policy \fI\%CMP0091\fP is set to \fBNEW\fP
prior to the first \fI\%project()\fP or \fI\%enable_language()\fP command
that enables a language using a compiler targeting the MSVC ABI.
.UNINDENT
.UNINDENT
.SS CMAKE_MSVCIDE_RUN_PATH
.sp
New in version 3.10.

.sp
Extra PATH locations that should be used when executing
\fI\%add_custom_command()\fP or \fI\%add_custom_target()\fP when using the
\fI\%Visual Studio 9 2008\fP (or above) generator. This allows
for running commands and using dll\(aqs that the IDE environment is not aware of.
.sp
If not set explicitly the value is initialized by the \fBCMAKE_MSVCIDE_RUN_PATH\fP
environment variable, if set, and otherwise left empty.
.SS CMAKE_NINJA_OUTPUT_PATH_PREFIX
.sp
New in version 3.6.

.sp
Tell the \fI\%Ninja Generators\fP to add a prefix to every output path in
\fBbuild.ninja\fP\&.  A trailing slash is appended to the prefix, if missing.
.sp
This is useful when the generated ninja file is meant to be embedded as a
\fBsubninja\fP file into a \fIsuper\fP ninja project.  For example, the command:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
cd super\-build\-dir &&
cmake \-G Ninja \-S /path/to/src \-B sub \-DCMAKE_NINJA_OUTPUT_PATH_PREFIX=sub/
#                                 ^^^\-\-\-\-\-\-\-\-\-\- these match \-\-\-\-\-\-\-\-\-\-\-^^^
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
generates a build directory with its top\-level (\fI\%CMAKE_BINARY_DIR\fP)
in \fBsuper\-build\-dir/sub\fP\&.  The path to the build directory ends in the
output path prefix.  This makes it suitable for use in a separately\-written
\fBsuper\-build\-dir/build.ninja\fP file with a directive like this:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
subninja sub/build.ninja
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
The \fBauto\-regeneration\fP rule in \fBsuper\-build\-dir/build.ninja\fP must
have an order\-only dependency on \fBsub/build.ninja\fP\&.
.sp
New in version 3.27: The \fI\%Ninja Multi\-Config\fP generator supports this variable.

.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
When \fBCMAKE_NINJA_OUTPUT_PATH_PREFIX\fP is set, the project generated
by CMake cannot be used as a standalone project.  No default targets
are specified.
.sp
The value of \fBCMAKE_NINJA_OUTPUT_PATH_PREFIX\fP must match one or more
path components at the \fIend\fP of \fI\%CMAKE_BINARY_DIR\fP, or the
behavior is undefined.  However, this requirement is not checked
automatically.
.UNINDENT
.UNINDENT
.SS CMAKE_NO_BUILTIN_CHRPATH
.sp
Do not use the builtin binary editor to fix runtime library search
paths on installation.
.sp
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.
.sp
For more information on RPATH handling see
the \fI\%INSTALL_RPATH\fP and \fI\%BUILD_RPATH\fP target properties.
.sp
New in version 3.20: This variable also applies to XCOFF binaries\(aq LIBPATH.  Prior to the
addition of the XCOFF editor in CMake 3.20, this variable applied only
to ELF binaries\(aq RPATH/RUNPATH.

.SS CMAKE_NO_SYSTEM_FROM_IMPORTED
.sp
Default value for \fI\%NO_SYSTEM_FROM_IMPORTED\fP of targets.
.sp
This variable is used to initialize the \fI\%NO_SYSTEM_FROM_IMPORTED\fP
property on all the targets.  See that target property for additional
information.
.SS CMAKE_OPTIMIZE_DEPENDENCIES
.sp
New in version 3.19.

.sp
Initializes the \fI\%OPTIMIZE_DEPENDENCIES\fP target property.
.SS CMAKE_OSX_ARCHITECTURES
.sp
Target specific architectures for macOS and iOS.
.sp
This variable is used to initialize the \fI\%OSX_ARCHITECTURES\fP
property on each target as it is created.  See that target property
for additional information.
.sp
The value of this variable should be set prior to the first
\fI\%project()\fP or \fI\%enable_language()\fP command invocation
because it may influence configuration of the toolchain and flags.
It is intended to be set locally by the user creating a build tree.
This variable should be set as a \fBCACHE\fP entry (or else CMake may
remove it while initializing a cache entry of the same name) unless
policy \fI\%CMP0126\fP is set to \fBNEW\fP\&.
.sp
Despite the \fBOSX\fP part in the variable name(s) they apply also to
other SDKs than macOS like iOS, tvOS, visionOS, or watchOS.
.sp
This variable is ignored on platforms other than Apple.
.SS CMAKE_OSX_DEPLOYMENT_TARGET
.sp
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 \fB\-mmacosx\-version\-min\fP 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
\fI\%CMAKE_OSX_SYSROOT\fP is unset.
.sp
If not set explicitly the value is initialized by the
\fBMACOSX_DEPLOYMENT_TARGET\fP environment variable, if set,
and otherwise computed based on the host platform.
.sp
The value of this variable should be set prior to the first
\fI\%project()\fP or \fI\%enable_language()\fP command invocation
because it may influence configuration of the toolchain and flags.
It is intended to be set locally by the user creating a build tree.
This variable should be set as a \fBCACHE\fP entry (or else CMake may
remove it while initializing a cache entry of the same name) unless
policy \fI\%CMP0126\fP is set to \fBNEW\fP\&.
.sp
Despite the \fBOSX\fP part in the variable name(s) they apply also to
other SDKs than macOS like iOS, tvOS, visionOS, or watchOS.
.sp
This variable is ignored on platforms other than Apple.
.SS CMAKE_OSX_SYSROOT
.sp
Specify the location or name of the macOS platform SDK to be used.
CMake uses this value to compute the value of the \fB\-isysroot\fP flag
or equivalent and to help the \fBfind_*\fP commands locate files in
the SDK.
.sp
If not set explicitly the value is initialized by the \fBSDKROOT\fP
environment variable, if set, and otherwise computed based on the
\fI\%CMAKE_OSX_DEPLOYMENT_TARGET\fP or the host platform.
.sp
The value of this variable should be set prior to the first
\fI\%project()\fP or \fI\%enable_language()\fP command invocation
because it may influence configuration of the toolchain and flags.
It is intended to be set locally by the user creating a build tree.
This variable should be set as a \fBCACHE\fP entry (or else CMake may
remove it while initializing a cache entry of the same name) unless
policy \fI\%CMP0126\fP is set to \fBNEW\fP\&.
.sp
Despite the \fBOSX\fP part in the variable name(s) they apply also to
other SDKs than macOS like iOS, tvOS, visionOS, or watchOS.
.sp
This variable is ignored on platforms other than Apple.
.SS CMAKE_PCH_INSTANTIATE_TEMPLATES
.sp
New in version 3.19.

.sp
This variable is used to initialize the \fI\%PCH_INSTANTIATE_TEMPLATES\fP
property of targets when they are created.
.SS CMAKE_PCH_WARN_INVALID
.sp
New in version 3.18.

.sp
This variable is used to initialize the \fI\%PCH_WARN_INVALID\fP
property of targets when they are created.
.SS CMAKE_PDB_OUTPUT_DIRECTORY
.sp
Output directory for MS debug symbol \fB\&.pdb\fP files generated by the
linker for executable and shared library targets.
.sp
This variable is used to initialize the \fI\%PDB_OUTPUT_DIRECTORY\fP
property on all the targets.  See that target property for additional
information.
.SS CMAKE_PDB_OUTPUT_DIRECTORY_<CONFIG>
.sp
Per\-configuration output directory for MS debug symbol \fB\&.pdb\fP files
generated by the linker for executable and shared library targets.
.sp
This is a per\-configuration version of \fI\%CMAKE_PDB_OUTPUT_DIRECTORY\fP\&.
This variable is used to initialize the
\fI\%PDB_OUTPUT_DIRECTORY_<CONFIG>\fP
property on all the targets.  See that target property for additional
information.
.SS CMAKE_PLATFORM_NO_VERSIONED_SONAME
.sp
New in version 3.1.

.sp
This variable is used to globally control whether the
\fI\%VERSION\fP and \fI\%SOVERSION\fP target
properties should be used for shared libraries.
When set to true, adding version information to each
shared library target is disabled.
.sp
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.
.SS CMAKE_POSITION_INDEPENDENT_CODE
.sp
Default value for \fI\%POSITION_INDEPENDENT_CODE\fP of targets.
.sp
This variable is used to initialize the
\fI\%POSITION_INDEPENDENT_CODE\fP property on all the targets.
See that target property for additional information.  If set, its
value is also used by the \fI\%try_compile()\fP command.
.SS CMAKE_RUNTIME_OUTPUT_DIRECTORY
.sp
Where to put all the \fI\%RUNTIME\fP
target files when built.
.sp
This variable is used to initialize the \fI\%RUNTIME_OUTPUT_DIRECTORY\fP
property on all the targets.  See that target property for additional
information.
.SS CMAKE_RUNTIME_OUTPUT_DIRECTORY_<CONFIG>
.sp
New in version 3.3.

.sp
Where to put all the \fI\%RUNTIME\fP
target files when built for a specific configuration.
.sp
This variable is used to initialize the
\fI\%RUNTIME_OUTPUT_DIRECTORY_<CONFIG>\fP property on all the targets.
See that target property for additional information.
.SS CMAKE_SHARED_LIBRARY_ENABLE_EXPORTS
.sp
New in version 3.27.

.sp
Specify whether shared library generates an import file.
.sp
This variable is used to initialize the \fI\%ENABLE_EXPORTS\fP target
property for shared library targets when they are created by calls to the
\fI\%add_library()\fP command.  See the property documentation for details.
.SS CMAKE_SHARED_LINKER_FLAGS
.sp
Linker flags to be used to create shared libraries.
.sp
These flags will be used by the linker when creating a shared library.
.SS CMAKE_SHARED_LINKER_FLAGS_<CONFIG>
.sp
Flags to be used when linking a shared library.
.sp
Same as \fBCMAKE_C_FLAGS_*\fP but used by the linker when creating shared
libraries.
.SS CMAKE_SHARED_LINKER_FLAGS_<CONFIG>_INIT
.sp
New in version 3.7.

.sp
Value used to initialize the \fI\%CMAKE_SHARED_LINKER_FLAGS_<CONFIG>\fP
cache entry the first time a build tree is configured.
This variable is meant to be set by a \fI\%toolchain file\fP\&.  CMake may prepend or append content to
the value based on the environment and target platform.
.sp
See also \fI\%CMAKE_SHARED_LINKER_FLAGS_INIT\fP\&.
.SS CMAKE_SHARED_LINKER_FLAGS_INIT
.sp
New in version 3.7.

.sp
Value used to initialize the \fI\%CMAKE_SHARED_LINKER_FLAGS\fP
cache entry the first time a build tree is configured.
This variable is meant to be set by a \fI\%toolchain file\fP\&.  CMake may prepend or append content to
the value based on the environment and target platform.
.sp
See also the configuration\-specific variable
\fI\%CMAKE_SHARED_LINKER_FLAGS_<CONFIG>_INIT\fP\&.
.SS CMAKE_SKIP_BUILD_RPATH
.sp
Do not include RPATHs in the build tree.
.sp
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 \fBTRUE\fP then the software is
always built with no RPATH.
.sp
This is used to initialize the \fI\%SKIP_BUILD_RPATH\fP target property
for all targets. For more information on RPATH handling see
the \fI\%INSTALL_RPATH\fP and \fI\%BUILD_RPATH\fP target properties.
.sp
See also the \fI\%CMAKE_SKIP_INSTALL_RPATH\fP variable.
To omit RPATH in both the build and install steps, use
\fI\%CMAKE_SKIP_RPATH\fP instead.
.SS CMAKE_SKIP_INSTALL_RPATH
.sp
Do not include RPATHs in the install tree.
.sp
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.
.sp
See also the \fI\%CMAKE_SKIP_BUILD_RPATH\fP variable.
To omit RPATH in both the build and install steps, use
\fI\%CMAKE_SKIP_RPATH\fP instead.
.sp
For more information on RPATH handling see the \fI\%INSTALL_RPATH\fP
and \fI\%BUILD_RPATH\fP target properties.
.SS CMAKE_STATIC_LINKER_FLAGS
.sp
Flags to be used to create static libraries.  These flags will be passed
to the archiver when creating a static library.
.sp
See also \fI\%CMAKE_STATIC_LINKER_FLAGS_<CONFIG>\fP\&.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
Static libraries do not actually link.  They are essentially archives
of object files.  The use of the name \(dqlinker\(dq in the name of this
variable is kept for compatibility.
.UNINDENT
.UNINDENT
.SS CMAKE_STATIC_LINKER_FLAGS_<CONFIG>
.sp
Flags to be used to create static libraries.  These flags will be passed
to the archiver when creating a static library in the \fB<CONFIG>\fP
configuration.
.sp
See also \fI\%CMAKE_STATIC_LINKER_FLAGS\fP\&.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
Static libraries do not actually link.  They are essentially archives
of object files.  The use of the name \(dqlinker\(dq in the name of this
variable is kept for compatibility.
.UNINDENT
.UNINDENT
.SS CMAKE_STATIC_LINKER_FLAGS_<CONFIG>_INIT
.sp
New in version 3.7.

.sp
Value used to initialize the \fI\%CMAKE_STATIC_LINKER_FLAGS_<CONFIG>\fP
cache entry the first time a build tree is configured.
This variable is meant to be set by a \fI\%toolchain file\fP\&.  CMake may prepend or append content to
the value based on the environment and target platform.
.sp
See also \fI\%CMAKE_STATIC_LINKER_FLAGS_INIT\fP\&.
.SS CMAKE_STATIC_LINKER_FLAGS_INIT
.sp
New in version 3.7.

.sp
Value used to initialize the \fI\%CMAKE_STATIC_LINKER_FLAGS\fP
cache entry the first time a build tree is configured.
This variable is meant to be set by a \fI\%toolchain file\fP\&.  CMake may prepend or append content to
the value based on the environment and target platform.
.sp
See also the configuration\-specific variable
\fI\%CMAKE_STATIC_LINKER_FLAGS_<CONFIG>_INIT\fP\&.
.SS CMAKE_TASKING_TOOLSET
.sp
New in version 3.25.

.sp
Select the Tasking toolset which provides the compiler
.sp
Architecture compilers are provided by different toolchains with
incompatible versioning schemes.  Set this variable in a
\fI\%toolchain file\fP so CMake can detect
the compiler features correctly. If no toolset is specified,
\fBStandalone\fP is assumed.
.sp
Due to the different versioning schemes, the compiler version
(\fI\%CMAKE_<LANG>_COMPILER_VERSION\fP) depends on the toolset and
architecture in use. If projects can be built with multiple toolsets or
architectures, the specified \fBCMAKE_TASKING_TOOLSET\fP and the
automatically determined \fI\%CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID\fP
must be taken into account when comparing against the
\fI\%CMAKE_<LANG>_COMPILER_VERSION\fP\&.
.INDENT 0.0
.TP
.B \fBTriCore\fP
Compilers are provided by the TriCore toolset.
.TP
.B \fBSmartCode\fP
Compilers are provided by the SmartCode toolset.
.TP
.B \fBStandalone\fP
Compilers are provided by the standalone toolsets.
.sp
\fBNOTE:\fP
.INDENT 7.0
.INDENT 3.5
For the TriCore architecture, the compiler from the TriCore toolset is
selected as standalone compiler.
.UNINDENT
.UNINDENT
.UNINDENT
.SS CMAKE_TRY_COMPILE_CONFIGURATION
.sp
Build configuration used for \fI\%try_compile()\fP and \fI\%try_run()\fP
projects.
.sp
Projects built by \fI\%try_compile()\fP and \fI\%try_run()\fP 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.
.SS CMAKE_TRY_COMPILE_NO_PLATFORM_VARIABLES
.sp
New in version 3.24.

.sp
Set to a true value to tell the \fI\%try_compile()\fP command not
to propagate any platform variables into the test project.
.sp
The \fI\%try_compile()\fP command normally passes some CMake variables
that configure the platform and toolchain behavior into test projects.
See policy \fI\%CMP0137\fP\&.  This variable may be set to disable
that behavior.
.SS CMAKE_TRY_COMPILE_PLATFORM_VARIABLES
.sp
New in version 3.6.

.sp
List of variables that the \fI\%try_compile()\fP command source file signature
must propagate into the test project in order to target the same platform as
the host project.
.sp
This variable should not be set by project code.  It is meant to be set by
CMake\(aqs platform information modules for the current toolchain, or by a
toolchain file when used with \fI\%CMAKE_TOOLCHAIN_FILE\fP\&.
.sp
Variables meaningful to CMake, such as \fI\%CMAKE_<LANG>_FLAGS\fP, are
propagated automatically.  The \fBCMAKE_TRY_COMPILE_PLATFORM_VARIABLES\fP
variable may be set to pass custom variables meaningful to a toolchain file.
For example, a toolchain file may contain:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
set(CMAKE_SYSTEM_NAME ...)
set(CMAKE_TRY_COMPILE_PLATFORM_VARIABLES MY_CUSTOM_VARIABLE)
# ... use MY_CUSTOM_VARIABLE ...
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
If a user passes \fB\-DMY_CUSTOM_VARIABLE=SomeValue\fP to CMake then this
setting will be made visible to the toolchain file both for the main
project and for test projects generated by the \fI\%try_compile()\fP
command source file signature.
.sp
Changed in version 3.24: Listed variables are propagated to the \fI\%try_compile()\fP
\fI\%whole\-project\fP signature too.
See \fI\%CMP0137\fP\&.

.sp
New in version 3.24: The \fI\%CMAKE_TRY_COMPILE_NO_PLATFORM_VARIABLES\fP variable may be
set to disable passing platform variables into the test project.

.SS CMAKE_TRY_COMPILE_TARGET_TYPE
.sp
New in version 3.6.

.sp
Type of target generated for \fI\%try_compile()\fP calls using the
source file signature.  Valid values are:
.INDENT 0.0
.TP
.B \fBEXECUTABLE\fP
Use \fI\%add_executable()\fP to name the source file in the
generated project.  This is the default if no value is given.
.TP
.B \fBSTATIC_LIBRARY\fP
Use \fI\%add_library()\fP with the \fBSTATIC\fP option to name the
source file in the generated project.  This avoids running the
linker and is intended for use with cross\-compiling toolchains
that cannot link without custom flags or linker scripts.
.UNINDENT
.SS CMAKE_UNITY_BUILD
.sp
New in version 3.16.

.sp
This variable is used to initialize the \fI\%UNITY_BUILD\fP
property of targets when they are created.  Setting it to true
enables batch compilation of multiple sources within each target.
This feature is known as a \fIUnity\fP or \fIJumbo\fP build.
.sp
Projects should not set this variable, it is intended as a developer
control to be set on the \fI\%cmake(1)\fP command line or other
equivalent methods.  The developer must have the ability to enable or
disable unity builds according to the capabilities of their own machine
and compiler.
.sp
By default, this variable is not set, which will result in unity builds
being disabled.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
This option currently does not work well in combination with
the \fI\%CMAKE_EXPORT_COMPILE_COMMANDS\fP variable.
.UNINDENT
.UNINDENT
.SS CMAKE_UNITY_BUILD_BATCH_SIZE
.sp
New in version 3.16.

.sp
This variable is used to initialize the \fI\%UNITY_BUILD_BATCH_SIZE\fP
property of targets when they are created.  It specifies the default upper
limit on the number of source files that may be combined in any one unity
source file when unity builds are enabled for a target.
.SS CMAKE_UNITY_BUILD_UNIQUE_ID
.sp
New in version 3.20.

.sp
This variable is used to initialize the \fI\%UNITY_BUILD_UNIQUE_ID\fP
property of targets when they are created.  It specifies the name of the
unique identifier generated per file in a unity build.
.SS CMAKE_VERIFY_INTERFACE_HEADER_SETS
.sp
New in version 3.24.

.sp
This variable is used to initialize the
\fI\%VERIFY_INTERFACE_HEADER_SETS\fP property of targets when they are
created.  Setting it to true enables header set verification.
.sp
Projects should not normally set this variable, it is intended as a developer
control to be set on the \fI\%cmake(1)\fP command line or other
equivalent methods.  The developer must have the ability to enable or
disable header set verification according to the capabilities of their own
machine and compiler.
.sp
Verification of a dependency\(aqs header sets is not typically of interest
to developers.  Therefore, \fI\%FetchContent_MakeAvailable()\fP explicitly
sets \fBCMAKE_VERIFY_INTERFACE_HEADER_SETS\fP to false for the duration of its
call, but restores its original value before returning.  If a project brings
a dependency directly into the main build (e.g. calling
\fI\%add_subdirectory()\fP on a vendored project from a git submodule), it
should also do likewise.  For example:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
# Save original setting so we can restore it later
set(want_header_set_verification ${CMAKE_VERIFY_INTERFACE_HEADER_SETS})

# Include the vendored dependency with header set verification disabled
set(CMAKE_VERIFY_INTERFACE_HEADER_SETS OFF)
add_subdirectory(...)   # Vendored sources, e.g. from git submodules

# Add the project\(aqs own sources. Restore the developer\(aqs original choice
# for whether to enable header set verification.
set(CMAKE_VERIFY_INTERFACE_HEADER_SETS ${want_header_set_verification})
add_subdirectory(src)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
By default, this variable is not set, which will result in header set
verification being disabled.
.SS CMAKE_VISIBILITY_INLINES_HIDDEN
.sp
Default value for the \fI\%VISIBILITY_INLINES_HIDDEN\fP target
property when a target is created.
.SS CMAKE_VS_DEBUGGER_COMMAND
.sp
New in version 3.27.

.sp
This variable is used to initialize the \fI\%VS_DEBUGGER_COMMAND\fP
property on each target as it is created.  See that target property
for additional information.
.SS CMAKE_VS_DEBUGGER_COMMAND_ARGUMENTS
.sp
New in version 3.27.

.sp
This variable is used to initialize the \fI\%VS_DEBUGGER_COMMAND_ARGUMENTS\fP
property on each target as it is created.  See that target property
for additional information.
.SS CMAKE_VS_DEBUGGER_ENVIRONMENT
.sp
New in version 3.27.

.sp
This variable is used to initialize the \fI\%VS_DEBUGGER_ENVIRONMENT\fP
property on each target as it is created.  See that target property
for additional information.
.SS CMAKE_VS_DEBUGGER_WORKING_DIRECTORY
.sp
New in version 3.27.

.sp
This variable is used to initialize the \fI\%VS_DEBUGGER_WORKING_DIRECTORY\fP
property on each target as it is created.  See that target property
for additional information.
.SS CMAKE_VS_GLOBALS
.sp
New in version 3.13.

.sp
List of \fBKey=Value\fP records to be set per target as target properties
\fI\%VS_GLOBAL_<variable>\fP with \fBvariable=Key\fP and value \fBValue\fP\&.
.sp
For example:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
set(CMAKE_VS_GLOBALS
  \(dqDefaultLanguage=en\-US\(dq
  \(dqMinimumVisualStudioVersion=14.0\(dq
  )
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
will set properties \fBVS_GLOBAL_DefaultLanguage\fP to \fBen\-US\fP and
\fBVS_GLOBAL_MinimumVisualStudioVersion\fP to \fB14.0\fP for all targets
(except for \fBINTERFACE\fP libraries).
.sp
This variable is meant to be set by a
\fI\%toolchain file\fP\&.
.SS CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD
.sp
New in version 3.3.

.sp
Include \fBINSTALL\fP target to default build.
.sp
In Visual Studio solution, by default the \fBINSTALL\fP target will not be part
of the default build. Setting this variable will enable the \fBINSTALL\fP target
to be part of the default build.
.SS CMAKE_VS_INCLUDE_PACKAGE_TO_DEFAULT_BUILD
.sp
New in version 3.8.

.sp
Include \fBPACKAGE\fP target to default build.
.sp
In Visual Studio solution, by default the \fBPACKAGE\fP target will not be part
of the default build. Setting this variable will enable the \fBPACKAGE\fP target
to be part of the default build.
.SS CMAKE_VS_JUST_MY_CODE_DEBUGGING
.sp
New in version 3.15.

.sp
Enable Just My Code with Visual Studio debugger.
.sp
This variable is used to initialize the \fI\%VS_JUST_MY_CODE_DEBUGGING\fP
property on all targets when they are created.  See that target property for
additional information.
.SS CMAKE_VS_NO_COMPILE_BATCHING
.sp
New in version 3.24.

.sp
Turn off compile batching when using \fI\%Visual Studio Generators\fP\&.
.sp
This variable is used to initialize the \fI\%VS_NO_COMPILE_BATCHING\fP
property on all targets when they are created.  See that target property for
additional information.
.SS Example
.sp
This shows setting the property for the target \fBfoo\fP using the variable.
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
set(CMAKE_VS_NO_COMPILE_BATCHING ON)
add_library(foo SHARED foo.cpp)
.ft P
.fi
.UNINDENT
.UNINDENT
.SS CMAKE_VS_SDK_EXCLUDE_DIRECTORIES
.sp
New in version 3.12.

.sp
This variable allows to override Visual Studio default Exclude Directories.
.SS CMAKE_VS_SDK_EXECUTABLE_DIRECTORIES
.sp
New in version 3.12.

.sp
This variable allows to override Visual Studio default Executable Directories.
.SS CMAKE_VS_SDK_INCLUDE_DIRECTORIES
.sp
New in version 3.12.

.sp
This variable allows to override Visual Studio default Include Directories.
.SS CMAKE_VS_SDK_LIBRARY_DIRECTORIES
.sp
New in version 3.12.

.sp
This variable allows to override Visual Studio default Library Directories.
.SS CMAKE_VS_SDK_LIBRARY_WINRT_DIRECTORIES
.sp
New in version 3.12.

.sp
This variable allows to override Visual Studio default Library WinRT
Directories.
.SS CMAKE_VS_SDK_REFERENCE_DIRECTORIES
.sp
New in version 3.12.

.sp
This variable allows to override Visual Studio default Reference Directories.
.SS CMAKE_VS_SDK_SOURCE_DIRECTORIES
.sp
New in version 3.12.

.sp
This variable allows to override Visual Studio default Source Directories.
.SS CMAKE_VS_WINRT_BY_DEFAULT
.sp
New in version 3.13.

.sp
Inform \fI\%Visual Studio Generators\fP for VS 2010 and above that the
target platform enables WinRT compilation by default and it needs to
be explicitly disabled if \fB/ZW\fP or \fI\%VS_WINRT_COMPONENT\fP is
omitted (as opposed to enabling it when either of those options is
present)
.sp
This makes cmake configuration consistent in terms of WinRT among
platforms \- if you did not enable the WinRT compilation explicitly, it
will be disabled (by either not enabling it or explicitly disabling it)
.sp
Note: WinRT compilation is always explicitly disabled for C language
source files, even if it is expliclty enabled for a project
.sp
This variable is meant to be set by a
\fI\%toolchain file\fP for such platforms.
.SS CMAKE_WATCOM_RUNTIME_LIBRARY
.sp
New in version 3.24.

.sp
Select the Watcom runtime library for use by compilers targeting the Watcom ABI.
This variable is used to initialize the \fI\%WATCOM_RUNTIME_LIBRARY\fP
property on all targets as they are created.  It is also propagated by
calls to the \fI\%try_compile()\fP command into the test project.
.sp
The allowed values are:
.INDENT 0.0
.TP
.B \fBSingleThreaded\fP
Compile without additional flags to use a single\-threaded
statically\-linked runtime library.
.TP
.B \fBSingleThreadedDLL\fP
Compile with \fB\-br\fP or equivalent flag(s) to use a single\-threaded
dynamically\-linked runtime library. This is not available for Linux
targets.
.TP
.B \fBMultiThreaded\fP
Compile with \fB\-bm\fP or equivalent flag(s) to use a multi\-threaded
statically\-linked runtime library.
.TP
.B \fBMultiThreadedDLL\fP
Compile with \fB\-bm \-br\fP or equivalent flag(s) to use a multi\-threaded
dynamically\-linked runtime library. This is not available for Linux
targets.
.UNINDENT
.sp
The value is ignored on non\-Watcom compilers but an unsupported value will
be rejected as an error when using a compiler targeting the Watcom ABI.
.sp
The value may also be the empty string (\fB\(dq\(dq\fP) in which case no runtime
library selection flag will be added explicitly by CMake.
.sp
Use \fI\%generator expressions\fP to
support per\-configuration specification.
.sp
For example, the code:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
set(CMAKE_WATCOM_RUNTIME_LIBRARY \(dqMultiThreaded\(dq)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
selects for all following targets a multi\-threaded statically\-linked runtime
library.
.sp
If this variable is not set then the \fI\%WATCOM_RUNTIME_LIBRARY\fP target
property will not be set automatically.  If that property is not set then
CMake uses the default value \fBMultiThreadedDLL\fP on Windows and
\fBSingleThreaded\fP on other platforms to select a Watcom runtime library.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
This variable has effect only when policy \fI\%CMP0136\fP is set to \fBNEW\fP
prior to the first \fI\%project()\fP or \fI\%enable_language()\fP command
that enables a language using a compiler targeting the Watcom ABI.
.UNINDENT
.UNINDENT
.SS CMAKE_WIN32_EXECUTABLE
.sp
Default value for \fI\%WIN32_EXECUTABLE\fP of targets.
.sp
This variable is used to initialize the \fI\%WIN32_EXECUTABLE\fP property
on all the targets.  See that target property for additional information.
.SS CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS
.sp
New in version 3.4.

.sp
Default value for \fI\%WINDOWS_EXPORT_ALL_SYMBOLS\fP target property.
This variable is used to initialize the property on each target as it is
created.
.SS CMAKE_XCODE_ATTRIBUTE_<an\-attribute>
.sp
New in version 3.1.

.sp
Set Xcode target attributes directly.
.sp
Tell the \fI\%Xcode\fP generator to set \fB<an\-attribute>\fP to a given
value in the generated Xcode project.  Ignored on other generators.
.sp
This offers low\-level control over the generated Xcode project file.
It is meant as a last resort for specifying settings that CMake does
not otherwise have a way to control.  Although this can override a
setting CMake normally produces on its own, doing so bypasses CMake\(aqs
model of the project and can break things.
.sp
See the \fI\%XCODE_ATTRIBUTE_<an\-attribute>\fP target property
to set attributes on a specific target.
.sp
Contents of \fBCMAKE_XCODE_ATTRIBUTE_<an\-attribute>\fP may use
\(dqgenerator expressions\(dq with the syntax \fB$<...>\fP\&.  See the
\fI\%cmake\-generator\-expressions(7)\fP manual for available
expressions.  See the \fI\%cmake\-buildsystem(7)\fP manual
for more on defining buildsystem properties.
.SS EXECUTABLE_OUTPUT_PATH
.sp
Old executable location variable.
.sp
The target property \fI\%RUNTIME_OUTPUT_DIRECTORY\fP supersedes this
variable for a target if it is set.  Executable targets are otherwise placed in
this directory.
.SS LIBRARY_OUTPUT_PATH
.sp
Old library location variable.
.sp
The target properties \fI\%ARCHIVE_OUTPUT_DIRECTORY\fP,
\fI\%LIBRARY_OUTPUT_DIRECTORY\fP, and \fI\%RUNTIME_OUTPUT_DIRECTORY\fP
supersede this variable for a target if they are set.  Library targets are
otherwise placed in this directory.
.SH VARIABLES FOR LANGUAGES
.SS CMAKE_C_COMPILE_FEATURES
.sp
New in version 3.1.

.sp
List of features known to the C compiler
.sp
These features are known to be available for use with the C compiler. This
list is a subset of the features listed in the
\fI\%CMAKE_C_KNOWN_FEATURES\fP global property.
.sp
See the \fI\%cmake\-compile\-features(7)\fP manual for information on
compile features and a list of supported compilers.
.SS CMAKE_C_EXTENSIONS
.sp
New in version 3.1.

.sp
Default value for \fI\%C_EXTENSIONS\fP target property if set when a target
is created.
.sp
See the \fI\%cmake\-compile\-features(7)\fP manual for information on
compile features and a list of supported compilers.
.SS CMAKE_C_STANDARD
.sp
New in version 3.1.

.sp
Default value for \fI\%C_STANDARD\fP target property if set when a target
is created.
.sp
See the \fI\%cmake\-compile\-features(7)\fP manual for information on
compile features and a list of supported compilers.
.SS CMAKE_C_STANDARD_REQUIRED
.sp
New in version 3.1.

.sp
Default value for \fI\%C_STANDARD_REQUIRED\fP target property if set when
a target is created.
.sp
See the \fI\%cmake\-compile\-features(7)\fP manual for information on
compile features and a list of supported compilers.
.SS CMAKE_CUDA_ARCHITECTURES
.sp
New in version 3.18.

.sp
Default value for \fI\%CUDA_ARCHITECTURES\fP property of targets.
.sp
Initialized by the \fI\%CUDAARCHS\fP environment variable if set.
Otherwise as follows depending on \fI\%CMAKE_CUDA_COMPILER_ID\fP:
.INDENT 0.0
.IP \(bu 2
For \fBClang\fP: the oldest architecture that works.
.IP \(bu 2
For \fBNVIDIA\fP: the default architecture chosen by the compiler.
See policy \fI\%CMP0104\fP\&.
.UNINDENT
.sp
Users are encouraged to override this, as the default varies across compilers
and compiler versions.
.sp
This variable is used to initialize the \fI\%CUDA_ARCHITECTURES\fP property
on all targets. See the target property for additional information.
.SS Examples
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
cmake_minimum_required(VERSION)

if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
  set(CMAKE_CUDA_ARCHITECTURES 75)
endif()

project(example LANGUAGES CUDA)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
\fBCMAKE_CUDA_ARCHITECTURES\fP will default to \fB75\fP unless overridden by the user.
.SS CMAKE_CUDA_COMPILE_FEATURES
.sp
New in version 3.17.

.sp
List of features known to the CUDA compiler
.sp
These features are known to be available for use with the CUDA compiler. This
list is a subset of the features listed in the
\fI\%CMAKE_CUDA_KNOWN_FEATURES\fP global property.
.sp
See the \fI\%cmake\-compile\-features(7)\fP manual for information on
compile features and a list of supported compilers.
.SS CMAKE_CUDA_EXTENSIONS
.sp
New in version 3.8.

.sp
Default value for \fI\%CUDA_EXTENSIONS\fP target property if set when a
target is created.
.sp
See the \fI\%cmake\-compile\-features(7)\fP manual for information on
compile features and a list of supported compilers.
.SS CMAKE_CUDA_HOST_COMPILER
.sp
New in version 3.10.

.sp
This is the original CUDA\-specific name for the more general
\fI\%CMAKE_<LANG>_HOST_COMPILER\fP variable.  See the latter
for details.
.SS CMAKE_CUDA_STANDARD
.sp
New in version 3.8.

.sp
Default value for \fI\%CUDA_STANDARD\fP target property if set when a
target is created.
.sp
See the \fI\%cmake\-compile\-features(7)\fP manual for information on
compile features and a list of supported compilers.
.SS CMAKE_CUDA_STANDARD_REQUIRED
.sp
New in version 3.8.

.sp
Default value for \fI\%CUDA_STANDARD_REQUIRED\fP target property if set
when a target is created.
.sp
See the \fI\%cmake\-compile\-features(7)\fP manual for information on
compile features and a list of supported compilers.
.SS CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES
.sp
New in version 3.8.

.sp
When the \fBCUDA\fP language has been enabled, this provides a
\fI\%semicolon\-separated list\fP of include directories provided
by the CUDA Toolkit.  The value may be useful for C++ source files
to include CUDA headers.
.SS CMAKE_CXX_COMPILE_FEATURES
.sp
New in version 3.1.

.sp
List of features known to the C++ compiler
.sp
These features are known to be available for use with the C++ compiler. This
list is a subset of the features listed in the
\fI\%CMAKE_CXX_KNOWN_FEATURES\fP global property.
.sp
See the \fI\%cmake\-compile\-features(7)\fP manual for information on
compile features and a list of supported compilers.
.SS CMAKE_CXX_EXTENSIONS
.sp
New in version 3.1.

.sp
Default value for \fI\%CXX_EXTENSIONS\fP target property if set when a
target is created.
.sp
See the \fI\%cmake\-compile\-features(7)\fP manual for information on
compile features and a list of supported compilers.
.SS CMAKE_CXX_STANDARD
.sp
New in version 3.1.

.sp
Default value for \fI\%CXX_STANDARD\fP target property if set when a target
is created.
.sp
See the \fI\%cmake\-compile\-features(7)\fP manual for information on
compile features and a list of supported compilers.
.SS CMAKE_CXX_STANDARD_REQUIRED
.sp
New in version 3.1.

.sp
Default value for \fI\%CXX_STANDARD_REQUIRED\fP target property if set when
a target is created.
.sp
See the \fI\%cmake\-compile\-features(7)\fP manual for information on
compile features and a list of supported compilers.
.SS CMAKE_Fortran_MODDIR_DEFAULT
.sp
Fortran default module output directory.
.sp
Most Fortran compilers write \fB\&.mod\fP files to the current working
directory.  For those that do not, this is set to \fB\&.\fP and used when
the \fI\%Fortran_MODULE_DIRECTORY\fP target property is not set.
.SS CMAKE_Fortran_MODDIR_FLAG
.sp
Fortran flag for module output directory.
.sp
This stores the flag needed to pass the value of the
\fI\%Fortran_MODULE_DIRECTORY\fP target property to the compiler.
.SS CMAKE_Fortran_MODOUT_FLAG
.sp
Fortran flag to enable module output.
.sp
Most Fortran compilers write \fB\&.mod\fP files out by default.  For others,
this stores the flag needed to enable module output.
.SS CMAKE_HIP_ARCHITECTURES
.sp
New in version 3.21.

.sp
List of GPU architectures to for which to generate device code.
Architecture names are interpreted based on \fI\%CMAKE_HIP_PLATFORM\fP\&.
.sp
This is initialized based on the value of \fI\%CMAKE_HIP_PLATFORM\fP:
.INDENT 0.0
.TP
.B \fBamd\fP
Uses architectures reported by \fBrocm_agent_enumerator\fP, if available,
and otherwise to a default chosen by the compiler.
.UNINDENT
.sp
This variable is used to initialize the \fI\%HIP_ARCHITECTURES\fP property
on all targets. See the target property for additional information.
.SS CMAKE_HIP_EXTENSIONS
.sp
New in version 3.21.

.sp
Default value for \fI\%HIP_EXTENSIONS\fP target property if set when a
target is created.
.sp
See the \fI\%cmake\-compile\-features(7)\fP manual for information on
compile features and a list of supported compilers.
.SS CMAKE_HIP_PLATFORM
.sp
New in version 3.28.

.sp
GPU platform for which HIP language sources are to be compiled.
.sp
The value must be one of:
.INDENT 0.0
.TP
.B \fBamd\fP
AMD GPUs
.TP
.B \fBnvidia\fP
NVIDIA GPUs
.UNINDENT
.sp
If not specified, a default is computed via \fBhipconfig \-\-platform\fP\&.
.sp
\fI\%CMAKE_HIP_ARCHITECTURES\fP entries are interpreted with
as architectures of the GPU platform.
.sp
\fI\%CMAKE_HIP_COMPILER\fP must target
the same GPU platform.
.SS CMAKE_HIP_STANDARD
.sp
New in version 3.21.

.sp
Default value for \fI\%HIP_STANDARD\fP target property if set when a target
is created.
.sp
See the \fI\%cmake\-compile\-features(7)\fP manual for information on
compile features and a list of supported compilers.
.SS CMAKE_HIP_STANDARD_REQUIRED
.sp
New in version 3.21.

.sp
Default value for \fI\%HIP_STANDARD_REQUIRED\fP target property if set when
a target is created.
.sp
See the \fI\%cmake\-compile\-features(7)\fP manual for information on
compile features and a list of supported compilers.
.SS CMAKE_ISPC_HEADER_DIRECTORY
.sp
New in version 3.19.

.sp
ISPC generated header output directory.
.sp
This variable is used to initialize the \fI\%ISPC_HEADER_DIRECTORY\fP
property on all the targets.  See the target property for additional
information.
.SS CMAKE_ISPC_HEADER_SUFFIX
.sp
New in version 3.19.2.

.sp
Output suffix to be used for ISPC generated headers.
.sp
This variable is used to initialize the \fI\%ISPC_HEADER_SUFFIX\fP
property on all the targets.  See the target property for additional
information.
.SS CMAKE_ISPC_INSTRUCTION_SETS
.sp
New in version 3.19.

.sp
Default value for \fI\%ISPC_INSTRUCTION_SETS\fP property of targets.
.sp
This variable is used to initialize the \fI\%ISPC_INSTRUCTION_SETS\fP property
on all targets. See the target property for additional information.
.SS CMAKE_<LANG>_ANDROID_TOOLCHAIN_MACHINE
.sp
New in version 3.7.1.

.sp
When \fI\%Cross Compiling for Android\fP this variable contains the
toolchain binutils machine name (e.g. \fBgcc \-dumpmachine\fP).  The
binutils typically have a \fB<machine>\-\fP prefix on their name.
.sp
See also \fI\%CMAKE_<LANG>_ANDROID_TOOLCHAIN_PREFIX\fP
and \fI\%CMAKE_<LANG>_ANDROID_TOOLCHAIN_SUFFIX\fP\&.
.SS CMAKE_<LANG>_ANDROID_TOOLCHAIN_PREFIX
.sp
New in version 3.7.

.sp
When \fI\%Cross Compiling for Android\fP this variable contains the absolute
path prefixing the toolchain GNU compiler and its binutils.
.sp
See also \fI\%CMAKE_<LANG>_ANDROID_TOOLCHAIN_SUFFIX\fP
and \fI\%CMAKE_<LANG>_ANDROID_TOOLCHAIN_MACHINE\fP\&.
.sp
For example, the path to the linker is:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
${CMAKE_CXX_ANDROID_TOOLCHAIN_PREFIX}ld${CMAKE_CXX_ANDROID_TOOLCHAIN_SUFFIX}
.ft P
.fi
.UNINDENT
.UNINDENT
.SS CMAKE_<LANG>_ANDROID_TOOLCHAIN_SUFFIX
.sp
New in version 3.7.

.sp
When \fI\%Cross Compiling for Android\fP this variable contains the
host platform suffix of the toolchain GNU compiler and its binutils.
.sp
See also \fI\%CMAKE_<LANG>_ANDROID_TOOLCHAIN_PREFIX\fP
and \fI\%CMAKE_<LANG>_ANDROID_TOOLCHAIN_MACHINE\fP\&.
.SS CMAKE_<LANG>_ARCHIVE_APPEND
.sp
Rule variable to append to a static archive.
.sp
This is a rule variable that tells CMake how to append to a static
archive.  It is used in place of \fI\%CMAKE_<LANG>_CREATE_STATIC_LIBRARY\fP
on some platforms in order to support large object counts.  See also
\fI\%CMAKE_<LANG>_ARCHIVE_CREATE\fP and
\fI\%CMAKE_<LANG>_ARCHIVE_FINISH\fP\&.
.SS CMAKE_<LANG>_ARCHIVE_CREATE
.sp
Rule variable to create a new static archive.
.sp
This is a rule variable that tells CMake how to create a static
archive.  It is used in place of \fI\%CMAKE_<LANG>_CREATE_STATIC_LIBRARY\fP
on some platforms in order to support large object counts.  See also
\fI\%CMAKE_<LANG>_ARCHIVE_APPEND\fP and
\fI\%CMAKE_<LANG>_ARCHIVE_FINISH\fP\&.
.SS CMAKE_<LANG>_ARCHIVE_FINISH
.sp
Rule variable to finish an existing static archive.
.sp
This is a rule variable that tells CMake how to finish a static
archive.  It is used in place of \fI\%CMAKE_<LANG>_CREATE_STATIC_LIBRARY\fP
on some platforms in order to support large object counts.  See also
\fI\%CMAKE_<LANG>_ARCHIVE_CREATE\fP and
\fI\%CMAKE_<LANG>_ARCHIVE_APPEND\fP\&.
.SS CMAKE_<LANG>_BYTE_ORDER
.sp
New in version 3.20.

.sp
Byte order of \fB<LANG>\fP compiler target architecture, if known.
If defined and not empty, the value is one of:
.INDENT 0.0
.TP
.B \fBBIG_ENDIAN\fP
The target architecture is Big Endian.
.TP
.B \fBLITTLE_ENDIAN\fP
The target architecture is Little Endian.
.UNINDENT
.sp
This is defined for languages \fBC\fP, \fBCXX\fP, \fBOBJC\fP, \fBOBJCXX\fP,
and \fBCUDA\fP\&.
.sp
If \fI\%CMAKE_OSX_ARCHITECTURES\fP specifies multiple architectures, the
value of \fBCMAKE_<LANG>_BYTE_ORDER\fP is non\-empty only if all architectures
share the same byte order.
.SS CMAKE_<LANG>_COMPILE_OBJECT
.sp
Rule variable to compile a single object file.
.sp
This is a rule variable that tells CMake how to compile a single
object file for the language \fB<LANG>\fP\&.
.SS CMAKE_<LANG>_COMPILER
.sp
The full path to the compiler for \fBLANG\fP\&.
.sp
This is the command that will be used as the \fB<LANG>\fP compiler.  Once
set, you can not change this variable.
.SS Usage
.sp
This variable can be set by the user during the first time a build tree is configured.
.sp
If a non\-full path value is supplied then CMake will resolve the full path of
the compiler.
.sp
The variable could be set in a user supplied toolchain file or via
\fI\%\-D\fP on the command line.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
Options that are required to make the compiler work correctly can be included
as items in a list; they can not be changed.
.UNINDENT
.UNINDENT
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
#set within user supplied toolchain file
set(CMAKE_C_COMPILER /full/path/to/qcc \-\-arg1 \-\-arg2)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
or
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
$ cmake ... \-DCMAKE_C_COMPILER=\(aqqcc;\-\-arg1;\-\-arg2\(aq
.ft P
.fi
.UNINDENT
.UNINDENT
.SS CMAKE_<LANG>_COMPILER_EXTERNAL_TOOLCHAIN
.sp
The external toolchain for cross\-compiling, if supported.
.sp
Some compiler toolchains do not ship their own auxiliary utilities such as
archivers and linkers.  The compiler driver may support a command\-line argument
to specify the location of such tools.
\fBCMAKE_<LANG>_COMPILER_EXTERNAL_TOOLCHAIN\fP may be set to a path to
the external toolchain and will be passed to the compiler driver if supported.
.sp
This variable may only be set in a toolchain file specified by
the \fI\%CMAKE_TOOLCHAIN_FILE\fP variable.
.SS CMAKE_<LANG>_COMPILER_ID
.sp
Compiler identification string.
.sp
A short string unique to the compiler vendor.  Possible values
include:
.TS
center;
|l|l|.
_
T{
Value
T}	T{
Name
T}
_
T{
\fBAbsoft\fP
T}	T{
Absoft Fortran
T}
_
T{
\fBADSP\fP
T}	T{
Analog VisualDSP++
T}
_
T{
\fBAppleClang\fP
T}	T{
Apple Clang
T}
_
T{
\fBARMCC\fP
T}	T{
ARM Compiler
T}
_
T{
\fBARMClang\fP
T}	T{
ARM Compiler based on Clang
T}
_
T{
\fBBruce\fP
T}	T{
Bruce C Compiler
T}
_
T{
\fBCCur\fP
T}	T{
Concurrent Fortran
T}
_
T{
\fBClang\fP
T}	T{
\fI\%LLVM Clang\fP
T}
_
T{
\fBCray\fP
T}	T{
Cray Compiler
T}
_
T{
\fBCrayClang\fP
T}	T{
Cray Clang\-based Compiler
T}
_
T{
\fBEmbarcadero\fP, \fBBorland\fP
T}	T{
\fI\%Embarcadero\fP
T}
_
T{
\fBFlang\fP
T}	T{
\fI\%Classic Flang Fortran Compiler\fP
T}
_
T{
\fBLLVMFlang\fP
T}	T{
\fI\%LLVM Flang Fortran Compiler\fP
T}
_
T{
\fBFujitsu\fP
T}	T{
Fujitsu HPC compiler (Trad mode)
T}
_
T{
\fBFujitsuClang\fP
T}	T{
Fujitsu HPC compiler (Clang mode)
T}
_
T{
\fBG95\fP
T}	T{
\fI\%G95 Fortran\fP
T}
_
T{
\fBGNU\fP
T}	T{
\fI\%GNU Compiler Collection\fP
T}
_
T{
\fBGHS\fP
T}	T{
\fI\%Green Hills Software\fP
T}
_
T{
\fBHP\fP
T}	T{
Hewlett\-Packard Compiler
T}
_
T{
\fBIAR\fP
T}	T{
IAR Systems
T}
_
T{
\fBIntel\fP
T}	T{
Intel Classic Compiler
T}
_
T{
\fBIntelLLVM\fP
T}	T{
\fI\%Intel LLVM\-Based Compiler\fP
T}
_
T{
\fBLCC\fP
T}	T{
MCST Elbrus C/C++/Fortran Compiler
T}
_
T{
\fBMSVC\fP
T}	T{
\fI\%Microsoft Visual Studio\fP
T}
_
T{
\fBNVHPC\fP
T}	T{
\fI\%NVIDIA HPC Compiler\fP
T}
_
T{
\fBNVIDIA\fP
T}	T{
\fI\%NVIDIA CUDA Compiler\fP
T}
_
T{
\fBOrangeC\fP
T}	T{
\fI\%OrangeC Compiler\fP
T}
_
T{
\fBOpenWatcom\fP
T}	T{
\fI\%Open Watcom\fP
T}
_
T{
\fBPGI\fP
T}	T{
The Portland Group
T}
_
T{
\fBPathScale\fP
T}	T{
PathScale
T}
_
T{
\fBSDCC\fP
T}	T{
\fI\%Small Device C Compiler\fP
T}
_
T{
\fBSunPro\fP
T}	T{
Oracle Solaris Studio
T}
_
T{
\fBTasking\fP
T}	T{
\fI\%Tasking Compiler Toolsets\fP
T}
_
T{
\fBTI\fP
T}	T{
Texas Instruments
T}
_
T{
\fBTIClang\fP
T}	T{
\fI\%Texas Instruments Clang\-based Compilers\fP
T}
_
T{
\fBTinyCC\fP
T}	T{
\fI\%Tiny C Compiler\fP
T}
_
T{
\fBXL\fP, \fBVisualAge\fP, \fBzOS\fP
T}	T{
IBM XL
T}
_
T{
\fBXLClang\fP
T}	T{
IBM Clang\-based XL
T}
_
T{
\fBIBMClang\fP
T}	T{
IBM LLVM\-based Compiler
T}
_
.TE
.sp
This variable is not guaranteed to be defined for all compilers or
languages.
.SS CMAKE_<LANG>_COMPILER_LOADED
.sp
Defined to true if the language is enabled.
.sp
When language \fB<LANG>\fP is enabled by \fI\%project()\fP or
\fI\%enable_language()\fP this variable is defined to \fB1\fP\&.
.SS CMAKE_<LANG>_COMPILER_PREDEFINES_COMMAND
.sp
New in version 3.10.

.sp
Command that outputs the compiler pre definitions.
.sp
See \fI\%AUTOMOC\fP which uses
\fI\%CMAKE_CXX_COMPILER_PREDEFINES_COMMAND\fP
to generate the \fI\%AUTOMOC_COMPILER_PREDEFINES\fP\&.
.SS CMAKE_<LANG>_COMPILER_TARGET
.sp
The target for cross\-compiling, if supported.
.sp
Some compiler drivers are inherently cross\-compilers, such as clang and
QNX qcc. These compiler drivers support a command\-line argument to specify
the target to cross\-compile for.
.sp
This variable may only be set in a toolchain file specified by
the \fI\%CMAKE_TOOLCHAIN_FILE\fP variable.
.SS CMAKE_<LANG>_COMPILER_VERSION
.sp
Compiler version string.
.sp
Compiler version in major[.minor[.patch[.tweak]]] format.  This
variable is not guaranteed to be defined for all compilers or
languages.
.sp
For example \fBCMAKE_C_COMPILER_VERSION\fP and
\fBCMAKE_CXX_COMPILER_VERSION\fP might indicate the respective C and C++
compiler version.
.SS CMAKE_<LANG>_CREATE_SHARED_LIBRARY
.sp
Rule variable to create a shared library.
.sp
This is a rule variable that tells CMake how to create a shared
library for the language \fB<LANG>\fP\&.  This rule variable is a \fB;\fP delimited
list of commands to run to perform the linking step.
.SS CMAKE_<LANG>_CREATE_SHARED_MODULE
.sp
Rule variable to create a shared module.
.sp
This is a rule variable that tells CMake how to create a shared
library for the language \fB<LANG>\fP\&.  This rule variable is a \fB;\fP delimited
list of commands to run.
.SS CMAKE_<LANG>_CREATE_STATIC_LIBRARY
.sp
Rule variable to create a static library.
.sp
This is a rule variable that tells CMake how to create a static
library for the language \fB<LANG>\fP\&.
.SS CMAKE_<LANG>_EXTENSIONS
.sp
The variations are:
.INDENT 0.0
.IP \(bu 2
\fI\%CMAKE_C_EXTENSIONS\fP
.IP \(bu 2
\fI\%CMAKE_CXX_EXTENSIONS\fP
.IP \(bu 2
\fI\%CMAKE_CUDA_EXTENSIONS\fP
.IP \(bu 2
\fI\%CMAKE_HIP_EXTENSIONS\fP
.IP \(bu 2
\fI\%CMAKE_OBJC_EXTENSIONS\fP
.IP \(bu 2
\fI\%CMAKE_OBJCXX_EXTENSIONS\fP
.UNINDENT
.sp
Default values for \fI\%<LANG>_EXTENSIONS\fP target properties if set when
a target is created.  For the compiler\(aqs default setting see
\fI\%CMAKE_<LANG>_EXTENSIONS_DEFAULT\fP\&.
.sp
For supported CMake versions see the respective pages.
.sp
See the \fI\%cmake\-compile\-features(7)\fP manual for information on
compile features and a list of supported compilers.
.SS CMAKE_<LANG>_EXTENSIONS_DEFAULT
.sp
New in version 3.22.

.sp
Compiler\(aqs default extensions mode. Used as the default for the
\fI\%<LANG>_EXTENSIONS\fP target property when
\fI\%CMAKE_<LANG>_EXTENSIONS\fP is not set (see \fI\%CMP0128\fP).
.sp
This variable is read\-only.  Modifying it is undefined behavior.
.SS CMAKE_<LANG>_FLAGS
.sp
Language\-wide flags for language \fB<LANG>\fP used when building for
all configurations.  These flags will be passed to all invocations
of the compiler.  This includes invocations that drive compiling
and those that drive linking.
.sp
For each language, if this variable is not defined, it is initialized
and stored in the cache using values from environment variables in
combination with CMake\(aqs builtin defaults for the toolchain:
.INDENT 0.0
.IP \(bu 2
\fBCMAKE_C_FLAGS\fP:
Initialized by the \fI\%CFLAGS\fP environment variable.
.IP \(bu 2
\fBCMAKE_CXX_FLAGS\fP:
Initialized by the \fI\%CXXFLAGS\fP environment variable.
.IP \(bu 2
\fBCMAKE_CUDA_FLAGS\fP:
Initialized by the \fI\%CUDAFLAGS\fP environment variable.
.IP \(bu 2
\fBCMAKE_Fortran_FLAGS\fP:
Initialized by the \fI\%FFLAGS\fP environment variable.
.IP \(bu 2
\fBCMAKE_CSharp_FLAGS\fP:
Initialized by the \fI\%CSFLAGS\fP environment variable.
.IP \(bu 2
\fBCMAKE_HIP_FLAGS\fP:
Initialized by the \fI\%HIPFLAGS\fP environment variable.
.IP \(bu 2
\fBCMAKE_ISPC_FLAGS\fP:
Initialized by the \fI\%ISPCFLAGS\fP environment variable.
.UNINDENT
.sp
This value is a command\-line string fragment. Therefore, multiple options
should be separated by spaces, and options with spaces should be quoted.
.sp
The flags in this variable will be passed before those in the
per\-configuration \fI\%CMAKE_<LANG>_FLAGS_<CONFIG>\fP variable.
On invocations driving compiling, flags from both variables will be passed
before flags added by commands such as \fI\%add_compile_options()\fP and
\fI\%target_compile_options()\fP\&. On invocations driving linking,
they will be passed before flags added by commands such as
\fI\%add_link_options()\fP and \fI\%target_link_options()\fP\&.
.SS CMAKE_<LANG>_FLAGS_<CONFIG>
.sp
Language\-wide flags for language \fB<LANG>\fP used when building for
the \fB<CONFIG>\fP configuration.  These flags will be passed to all
invocations of the compiler in the corresponding configuration.
This includes invocations that drive compiling and those that drive
linking.
.sp
The flags in this variable will be passed after those in the
\fI\%CMAKE_<LANG>_FLAGS\fP variable.  On invocations driving compiling,
flags from both variables will be passed before flags added by commands
such as \fI\%add_compile_options()\fP and \fI\%target_compile_options()\fP\&.
On invocations driving linking, they will be passed before flags added by
commands such as \fI\%add_link_options()\fP and
\fI\%target_link_options()\fP\&.
.SS CMAKE_<LANG>_FLAGS_<CONFIG>_INIT
.sp
New in version 3.11.

.sp
Value used to initialize the \fI\%CMAKE_<LANG>_FLAGS_<CONFIG>\fP cache
entry the first time a build tree is configured for language \fB<LANG>\fP\&.
This variable is meant to be set by a \fI\%toolchain file\fP\&.  CMake may prepend or append content to
the value based on the environment and target platform.
.sp
See also \fI\%CMAKE_<LANG>_FLAGS_INIT\fP\&.
.SS CMAKE_<LANG>_FLAGS_DEBUG
.sp
This variable is the \fBDebug\fP variant of the
\fI\%CMAKE_<LANG>_FLAGS_<CONFIG>\fP variable.
.SS CMAKE_<LANG>_FLAGS_DEBUG_INIT
.sp
New in version 3.7.

.sp
This variable is the \fBDebug\fP variant of the
\fI\%CMAKE_<LANG>_FLAGS_<CONFIG>_INIT\fP variable.
.SS CMAKE_<LANG>_FLAGS_INIT
.sp
New in version 3.7.

.sp
Value used to initialize the \fI\%CMAKE_<LANG>_FLAGS\fP cache entry
the first time a build tree is configured for language \fB<LANG>\fP\&.
This variable is meant to be set by a \fI\%toolchain file\fP\&.  CMake may prepend or append content to
the value based on the environment and target platform.  For example,
the contents of a \fBxxxFLAGS\fP environment variable will be prepended,
where \fBxxx\fP will be language\-specific but not necessarily the same as
\fB<LANG>\fP (e.g. \fI\%CXXFLAGS\fP for \fBCXX\fP, \fI\%FFLAGS\fP for
\fBFortran\fP, and so on).
This value is a command\-line string fragment. Therefore, multiple options
should be separated by spaces, and options with spaces should be quoted.
.sp
See also the configuration\-specific
\fI\%CMAKE_<LANG>_FLAGS_<CONFIG>_INIT\fP variable.
.SS CMAKE_<LANG>_FLAGS_MINSIZEREL
.sp
This variable is the \fBMinSizeRel\fP variant of the
\fI\%CMAKE_<LANG>_FLAGS_<CONFIG>\fP variable.
.SS CMAKE_<LANG>_FLAGS_MINSIZEREL_INIT
.sp
New in version 3.7.

.sp
This variable is the \fBMinSizeRel\fP variant of the
\fI\%CMAKE_<LANG>_FLAGS_<CONFIG>_INIT\fP variable.
.SS CMAKE_<LANG>_FLAGS_RELEASE
.sp
This variable is the \fBRelease\fP variant of the
\fI\%CMAKE_<LANG>_FLAGS_<CONFIG>\fP variable.
.SS CMAKE_<LANG>_FLAGS_RELEASE_INIT
.sp
New in version 3.7.

.sp
This variable is the \fBRelease\fP variant of the
\fI\%CMAKE_<LANG>_FLAGS_<CONFIG>_INIT\fP variable.
.SS CMAKE_<LANG>_FLAGS_RELWITHDEBINFO
.sp
This variable is the \fBRelWithDebInfo\fP variant of the
\fI\%CMAKE_<LANG>_FLAGS_<CONFIG>\fP variable.
.SS CMAKE_<LANG>_FLAGS_RELWITHDEBINFO_INIT
.sp
New in version 3.7.

.sp
This variable is the \fBRelWithDebInfo\fP variant of the
\fI\%CMAKE_<LANG>_FLAGS_<CONFIG>_INIT\fP variable.
.SS CMAKE_<LANG>_HOST_COMPILER
.sp
New in version 3.10: \fBCMAKE_CUDA_HOST_COMPILER\fP

.sp
New in version 3.28: \fBCMAKE_HIP_HOST_COMPILER\fP

.sp
This variable is available when \fB<LANG>\fP is \fBCUDA\fP or \fBHIP\fP\&.
.sp
When \fI\%CMAKE_<LANG>_COMPILER_ID\fP is
\fBNVIDIA\fP, \fBCMAKE_<LANG>_HOST_COMPILER\fP selects the compiler executable
to use when compiling host code for \fBCUDA\fP or \fBHIP\fP language files.
This maps to the \fBnvcc \-ccbin\fP option.
.sp
The \fBCMAKE_<LANG>_HOST_COMPILER\fP variable may be set explicitly before CUDA
or HIP is first enabled by a \fI\%project()\fP or \fI\%enable_language()\fP
command.
This can be done via \fB\-DCMAKE_<LANG>_HOST_COMPILER=...\fP on the command line
or in a \fI\%toolchain file\fP\&.  Or, one may set
the \fI\%CUDAHOSTCXX\fP or \fI\%HIPHOSTCXX\fP environment variable to
provide a default value.
.sp
Once the CUDA or HIP language is enabled, the \fBCMAKE_<LANG>_HOST_COMPILER\fP
variable is read\-only and changes to it are undefined behavior.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
Since \fBCMAKE_<LANG>_HOST_COMPILER\fP is meaningful only when the
\fI\%CMAKE_<LANG>_COMPILER_ID\fP is \fBNVIDIA\fP,
it does not make sense to set \fBCMAKE_<LANG>_HOST_COMPILER\fP without also
setting \fBCMAKE_<LANG>_COMPILER\fP to NVCC.
.UNINDENT
.UNINDENT
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
Projects should not try to set \fBCMAKE_<LANG>_HOST_COMPILER\fP to match
\fI\%CMAKE_CXX_COMPILER\fP themselves.
It is the end\-user\(aqs responsibility, not the project\(aqs, to ensure that
NVCC targets the same ABI as the C++ compiler.
.UNINDENT
.UNINDENT
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
Ignored when using \fI\%Visual Studio Generators\fP\&.
.UNINDENT
.UNINDENT
.SS CMAKE_<LANG>_IGNORE_EXTENSIONS
.sp
File extensions that should be ignored by the build.
.sp
This is a list of file extensions that may be part of a project for a
given language but are not compiled.
.SS CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES
.sp
Directories implicitly searched by the compiler for header files.
.sp
CMake does not explicitly specify these directories on compiler
command lines for language \fB<LANG>\fP\&.  This prevents system include
directories from being treated as user include directories on some
compilers, which is important for \fBC\fP, \fBCXX\fP, and \fBCUDA\fP to
avoid overriding standard library headers.
.sp
This value is not used for \fBFortran\fP because it has no standard
library headers and some compilers do not search their implicit
include directories for module \fB\&.mod\fP files.
.SS CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES
.sp
Implicit linker search path detected for language \fB<LANG>\fP\&.
.sp
Compilers typically pass directories containing language runtime
libraries and default library search paths when they invoke a linker.
These paths are implicit linker search directories for the compiler\(aqs
language.
.sp
For each language enabled by the \fI\%project()\fP or
\fI\%enable_language()\fP command, CMake automatically detects these
directories and reports the results in this variable.
The \fI\%CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES_EXCLUDE\fP environment
variable may be set to exclude specific directories from the automatically
detected results.
.sp
When linking to a static library, CMake adds the implicit link directories
from this variable for each language used in the static library (except
the language whose compiler is used to drive linking).  In the case of an
imported static library, the \fI\%IMPORTED_LINK_INTERFACE_LANGUAGES\fP
target property lists the languages whose implicit link information is
needed.  If any of the languages is not enabled, its value for the
\fBCMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES\fP variable may instead be provided
by the project.  Or, a \fI\%toolchain file\fP
may set the variable to a value known for the specified toolchain.  It will
either be overridden when the language is enabled, or used as a fallback.
.sp
Some toolchains read implicit directories from an environment variable such as
\fBLIBRARY_PATH\fP\&.  If using such an environment variable, keep its value
consistent when operating in a given build tree because CMake saves the value
detected when first creating a build tree.
.sp
If policy \fI\%CMP0060\fP is not set to \fBNEW\fP, then when a library in one
of these directories is given by full path to \fI\%target_link_libraries()\fP
CMake will generate the \fB\-l<name>\fP form on link lines for historical
purposes.
.sp
See also the \fI\%CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES\fP variable.
.SS CMAKE_<LANG>_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES
.sp
Implicit linker framework search path detected for language \fB<LANG>\fP\&.
.sp
These paths are implicit linker framework search directories for the
compiler\(aqs language.  CMake automatically detects these directories
for each language and reports the results in this variable.
.SS CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES
.sp
Implicit link libraries and flags detected for language \fB<LANG>\fP\&.
.sp
Compilers typically pass language runtime library names and other
flags when they invoke a linker.  These flags are implicit link
options for the compiler\(aqs language.  For each language enabled
by the \fI\%project()\fP or \fI\%enable_language()\fP command,
CMake automatically detects these libraries and flags and reports
the results in this variable.
.sp
When linking to a static library, CMake adds the implicit link libraries and
flags from this variable for each language used in the static library (except
the language whose compiler is used to drive linking).  In the case of an
imported static library, the \fI\%IMPORTED_LINK_INTERFACE_LANGUAGES\fP
target property lists the languages whose implicit link information is
needed.  If any of the languages is not enabled, its value for the
\fBCMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES\fP variable may instead be provided
by the project.  Or, a \fI\%toolchain file\fP
may set the variable to a value known for the specified toolchain.  It will
either be overridden when the language is enabled, or used as a fallback.
.sp
See also the \fI\%CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES\fP variable.
.SS CMAKE_<LANG>_LIBRARY_ARCHITECTURE
.sp
Target architecture library directory name detected for \fB<LANG>\fP\&.
.sp
If the \fB<LANG>\fP compiler passes to the linker an architecture\-specific
system library search directory such as \fB<prefix>/lib/<arch>\fP this
variable contains the \fB<arch>\fP name if/as detected by CMake.
.SS CMAKE_<LANG>_LINK_EXECUTABLE
.sp
Rule variable to link an executable.
.sp
Rule variable to link an executable for the given language.
.SS CMAKE_<LANG>_LINKER_WRAPPER_FLAG
.sp
New in version 3.13.

.sp
Defines the syntax of compiler driver option to pass options to the linker
tool. It will be used to translate the \fBLINKER:\fP prefix in the link options
(see \fI\%add_link_options()\fP and \fI\%target_link_options()\fP).
.sp
This variable holds a \fI\%semicolon\-separated list\fP of tokens.
If a space (i.e. \(dq \(dq) is specified as last token, flag and \fBLINKER:\fP
arguments will be specified as separate arguments to the compiler driver.
The \fI\%CMAKE_<LANG>_LINKER_WRAPPER_FLAG_SEP\fP variable can be specified
to manage concatenation of arguments.
.sp
For example, for \fBClang\fP we have:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
set (CMAKE_C_LINKER_WRAPPER_FLAG \(dq\-Xlinker\(dq \(dq \(dq)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Specifying \fB\(dqLINKER:\-z,defs\(dq\fP will be transformed in
\fB\-Xlinker \-z \-Xlinker defs\fP\&.
.sp
For \fBGNU GCC\fP:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
set (CMAKE_C_LINKER_WRAPPER_FLAG \(dq\-Wl,\(dq)
set (CMAKE_C_LINKER_WRAPPER_FLAG_SEP \(dq,\(dq)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Specifying \fB\(dqLINKER:\-z,defs\(dq\fP will be transformed in \fB\-Wl,\-z,defs\fP\&.
.sp
And for \fBSunPro\fP:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
set (CMAKE_C_LINKER_WRAPPER_FLAG \(dq\-Qoption\(dq \(dqld\(dq \(dq \(dq)
set (CMAKE_C_LINKER_WRAPPER_FLAG_SEP \(dq,\(dq)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Specifying \fB\(dqLINKER:\-z,defs\(dq\fP will be transformed in \fB\-Qoption ld \-z,defs\fP\&.
.SS CMAKE_<LANG>_LINKER_WRAPPER_FLAG_SEP
.sp
New in version 3.13.

.sp
This variable is used with \fI\%CMAKE_<LANG>_LINKER_WRAPPER_FLAG\fP
variable to format \fBLINKER:\fP prefix in the link options
(see \fI\%add_link_options()\fP and \fI\%target_link_options()\fP).
.sp
When specified, arguments of the \fBLINKER:\fP prefix will be concatenated using
this value as separator.
.SS CMAKE_<LANG>_OUTPUT_EXTENSION
.sp
Extension for the output of a compile for a single file.
.sp
This is the extension for an object file for the given \fB<LANG>\fP\&.  For
example \fB\&.obj\fP for C on Windows.
.SS CMAKE_<LANG>_SIMULATE_ID
.sp
Identification string of the \(dqsimulated\(dq compiler.
.sp
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 \fI\%CMAKE_<LANG>_COMPILER_ID\fP for
the simulated compiler.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
In other words, this variable describes the ABI compatibility
of the generated code.
.UNINDENT
.UNINDENT
.SS CMAKE_<LANG>_SIMULATE_VERSION
.sp
Version string of \(dqsimulated\(dq compiler.
.sp
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 \fI\%CMAKE_<LANG>_COMPILER_VERSION\fP
for the simulated compiler.
.SS CMAKE_<LANG>_SIZEOF_DATA_PTR
.sp
Size of pointer\-to\-data types for language \fB<LANG>\fP\&.
.sp
This holds the size (in bytes) of pointer\-to\-data types in the target
platform ABI.  It is defined for languages \fBC\fP and \fBCXX\fP (C++).
.SS CMAKE_<LANG>_SOURCE_FILE_EXTENSIONS
.sp
Extensions of source files for the given language.
.sp
This is the list of extensions for a given language\(aqs source files.
.SS CMAKE_<LANG>_STANDARD
.sp
The variations are:
.INDENT 0.0
.IP \(bu 2
\fI\%CMAKE_C_STANDARD\fP
.IP \(bu 2
\fI\%CMAKE_CXX_STANDARD\fP
.IP \(bu 2
\fI\%CMAKE_CUDA_STANDARD\fP
.IP \(bu 2
\fI\%CMAKE_HIP_STANDARD\fP
.IP \(bu 2
\fI\%CMAKE_OBJC_STANDARD\fP
.IP \(bu 2
\fI\%CMAKE_OBJCXX_STANDARD\fP
.UNINDENT
.sp
Default values for \fI\%<LANG>_STANDARD\fP target properties if set when a
target is created.
.sp
For supported CMake versions see the respective pages.
.sp
See the \fI\%cmake\-compile\-features(7)\fP manual for information on
compile features and a list of supported compilers.
.SS CMAKE_<LANG>_STANDARD_DEFAULT
.sp
New in version 3.9.

.sp
The compiler\(aqs default standard for the language \fB<LANG>\fP\&. Empty if the
compiler has no conception of standard levels.
.SS CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES
.sp
New in version 3.6.

.sp
Include directories to be used for every source file compiled with
the \fB<LANG>\fP 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.
.sp
This variable should not be set by project code.  It is meant to be set by
CMake\(aqs platform information modules for the current toolchain, or by a
toolchain file when used with \fI\%CMAKE_TOOLCHAIN_FILE\fP\&.
.sp
See also \fI\%CMAKE_<LANG>_STANDARD_LIBRARIES\fP\&.
.SS CMAKE_<LANG>_STANDARD_LIBRARIES
.sp
New in version 3.6.

.sp
Libraries linked into every executable and shared library linked
for language \fB<LANG>\fP\&.  This is meant for specification of system
libraries needed by the language for the current platform.
.sp
This variable should not be set by project code.  It is meant to be set by
CMake\(aqs platform information modules for the current toolchain, or by a
toolchain file when used with \fI\%CMAKE_TOOLCHAIN_FILE\fP\&.
.sp
See also \fI\%CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES\fP\&.
.SS CMAKE_<LANG>_STANDARD_REQUIRED
.sp
The variations are:
.INDENT 0.0
.IP \(bu 2
\fI\%CMAKE_C_STANDARD_REQUIRED\fP
.IP \(bu 2
\fI\%CMAKE_CXX_STANDARD_REQUIRED\fP
.IP \(bu 2
\fI\%CMAKE_CUDA_STANDARD_REQUIRED\fP
.IP \(bu 2
\fI\%CMAKE_HIP_STANDARD_REQUIRED\fP
.IP \(bu 2
\fI\%CMAKE_OBJC_STANDARD_REQUIRED\fP
.IP \(bu 2
\fI\%CMAKE_OBJCXX_STANDARD_REQUIRED\fP
.UNINDENT
.sp
Default values for \fI\%<LANG>_STANDARD_REQUIRED\fP target properties if
set when a target is created.
.sp
For supported CMake versions see the respective pages.
.sp
See the \fI\%cmake\-compile\-features(7)\fP manual for information on
compile features and a list of supported compilers.
.SS CMAKE_OBJC_EXTENSIONS
.sp
New in version 3.16.

.sp
Default value for \fI\%OBJC_EXTENSIONS\fP target property if set when a
target is created.
.sp
See the \fI\%cmake\-compile\-features(7)\fP manual for information on
compile features and a list of supported compilers.
.SS CMAKE_OBJC_STANDARD
.sp
New in version 3.16.

.sp
Default value for \fI\%OBJC_STANDARD\fP target property if set when a
target is created.
.sp
See the \fI\%cmake\-compile\-features(7)\fP manual for information on
compile features and a list of supported compilers.
.SS CMAKE_OBJC_STANDARD_REQUIRED
.sp
New in version 3.16.

.sp
Default value for \fI\%OBJC_STANDARD_REQUIRED\fP target property if set
when a target is created.
.sp
See the \fI\%cmake\-compile\-features(7)\fP manual for information on
compile features and a list of supported compilers.
.SS CMAKE_OBJCXX_EXTENSIONS
.sp
New in version 3.16.

.sp
Default value for \fI\%OBJCXX_EXTENSIONS\fP target property if set when a
target is created.
.sp
See the \fI\%cmake\-compile\-features(7)\fP manual for information on
compile features and a list of supported compilers.
.SS CMAKE_OBJCXX_STANDARD
.sp
New in version 3.16.

.sp
Default value for \fI\%OBJCXX_STANDARD\fP target property if set when a
target is created.
.sp
See the \fI\%cmake\-compile\-features(7)\fP manual for information on
compile features and a list of supported compilers.
.SS CMAKE_OBJCXX_STANDARD_REQUIRED
.sp
New in version 3.16.

.sp
Default value for \fI\%OBJCXX_STANDARD_REQUIRED\fP target property if set
when a target is created.
.sp
See the \fI\%cmake\-compile\-features(7)\fP manual for information on
compile features and a list of supported compilers.
.SS CMAKE_Swift_LANGUAGE_VERSION
.sp
New in version 3.7.

.sp
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:
.INDENT 0.0
.IP \(bu 2
Swift \fB4.0\fP for Xcode 10.2 and above.
.IP \(bu 2
Swift \fB3.0\fP for Xcode 8.3 and above.
.IP \(bu 2
Swift \fB2.3\fP for Xcode 8.2 and below.
.UNINDENT
.SS CMAKE_USER_MAKE_RULES_OVERRIDE_<LANG>
.sp
Specify a CMake file that overrides platform information for \fB<LANG>\fP\&.
.sp
This is a language\-specific version of
\fI\%CMAKE_USER_MAKE_RULES_OVERRIDE\fP loaded only when enabling language
\fB<LANG>\fP\&.
.SH VARIABLES FOR CTEST
.SS CTEST_BINARY_DIRECTORY
.sp
New in version 3.1.

.sp
Specify the CTest \fBBuildDirectory\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_BUILD_COMMAND
.sp
New in version 3.1.

.sp
Specify the CTest \fBMakeCommand\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_BUILD_NAME
.sp
New in version 3.1.

.sp
Specify the CTest \fBBuildName\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_BZR_COMMAND
.sp
New in version 3.1.

.sp
Specify the CTest \fBBZRCommand\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_BZR_UPDATE_OPTIONS
.sp
New in version 3.1.

.sp
Specify the CTest \fBBZRUpdateOptions\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_CHANGE_ID
.sp
New in version 3.4.

.sp
Specify the CTest \fBChangeId\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.sp
This setting allows CTest to pass arbitrary information about this
build up to CDash.  One use of this feature is to allow CDash to
post comments on your pull request if anything goes wrong with your build.
.SS CTEST_CHECKOUT_COMMAND
.sp
New in version 3.1.

.sp
Tell the \fI\%ctest_start()\fP command how to checkout or initialize
the source directory in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_CONFIGURATION_TYPE
.sp
New in version 3.1.

.sp
Specify the CTest \fBDefaultCTestConfigurationType\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.sp
If the configuration type is set via \fI\%\-C <cfg>\fP from the command line
then this variable is populated accordingly.
.SS CTEST_CONFIGURE_COMMAND
.sp
New in version 3.1.

.sp
Specify the CTest \fBConfigureCommand\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_COVERAGE_COMMAND
.sp
New in version 3.1.

.sp
Specify the CTest \fBCoverageCommand\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS Cobertura
.sp
Using \fI\%Cobertura\fP as the coverage generation within your multi\-module
Java project can generate a series of XML files.
.sp
The Cobertura Coverage parser expects to read the coverage data from a
single XML file which contains the coverage data for all modules.
Cobertura has a program with the ability to merge given \fBcobertura.ser\fP files
and then another program to generate a combined XML file from the previous
merged file.  For command line testing, this can be done by hand prior to
CTest looking for the coverage files. For script builds,
set the \fBCTEST_COVERAGE_COMMAND\fP variable to point to a file which will
perform these same steps, such as a \fB\&.sh\fP or \fB\&.bat\fP file.
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
set(CTEST_COVERAGE_COMMAND .../run\-coverage\-and\-consolidate.sh)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
where the \fBrun\-coverage\-and\-consolidate.sh\fP script is perhaps created by
the \fI\%configure_file()\fP command and might contain the following code:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
#!/usr/bin/env bash
CoberturaFiles=\(dq$(find \(dq/path/to/source\(dq \-name \(dqcobertura.ser\(dq)\(dq
SourceDirs=\(dq$(find \(dq/path/to/source\(dq \-name \(dqjava\(dq \-type d)\(dq
cobertura\-merge \-\-datafile coberturamerge.ser $CoberturaFiles
cobertura\-report \-\-datafile coberturamerge.ser \-\-destination . \e
                 \-\-format xml $SourceDirs
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
The script uses \fBfind\fP to capture the paths to all of the \fBcobertura.ser\fP
files found below the project\(aqs source directory.  It keeps the list of files
and supplies it as an argument to the \fBcobertura\-merge\fP program. The
\fB\-\-datafile\fP argument signifies where the result of the merge will be kept.
.sp
The combined \fBcoberturamerge.ser\fP file is then used to generate the XML report
using the \fBcobertura\-report\fP program.  The call to the cobertura\-report
program requires some named arguments.
.INDENT 0.0
.TP
.B \fB\-\-datafila\fP
path to the merged \fB\&.ser\fP file
.TP
.B \fB\-\-destination\fP
path to put the output files(s)
.TP
.B \fB\-\-format\fP
file format to write output in: xml or html
.UNINDENT
.sp
The rest of the supplied arguments consist of the full paths to the
\fB/src/main/java\fP directories of each module within the source tree. These
directories are needed and should not be forgotten.
.SS CTEST_COVERAGE_EXTRA_FLAGS
.sp
New in version 3.1.

.sp
Specify the CTest \fBCoverageExtraFlags\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_CURL_OPTIONS
.sp
New in version 3.1.

.sp
Specify the CTest \fBCurlOptions\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_CUSTOM_COVERAGE_EXCLUDE
.sp
A list of regular expressions which will be used to exclude files by their
path from coverage output by the \fI\%ctest_coverage()\fP command.
.sp
It is initialized by \fI\%ctest(1)\fP, but may be edited in a \fBCTestCustom\fP
file. See \fI\%ctest_read_custom_files()\fP documentation.
.SS CTEST_CUSTOM_ERROR_EXCEPTION
.sp
A list of regular expressions which will be used to exclude when detecting
error messages in build outputs by the \fI\%ctest_build()\fP command.
.sp
It is initialized by \fI\%ctest(1)\fP, but may be edited in a \fBCTestCustom\fP
file. See \fI\%ctest_read_custom_files()\fP documentation.
.SS CTEST_CUSTOM_ERROR_MATCH
.sp
A list of regular expressions which will be used to detect error messages in
build outputs by the \fI\%ctest_build()\fP command.
.sp
It is initialized by \fI\%ctest(1)\fP, but may be edited in a \fBCTestCustom\fP
file. See \fI\%ctest_read_custom_files()\fP documentation.
.SS CTEST_CUSTOM_ERROR_POST_CONTEXT
.sp
The number of lines to include as context which follow an error message by the
\fI\%ctest_build()\fP command. The default is 10.
.sp
It is initialized by \fI\%ctest(1)\fP, but may be edited in a \fBCTestCustom\fP
file. See \fI\%ctest_read_custom_files()\fP documentation.
.SS CTEST_CUSTOM_ERROR_PRE_CONTEXT
.sp
The number of lines to include as context which precede an error message by
the \fI\%ctest_build()\fP command. The default is 10.
.sp
It is initialized by \fI\%ctest(1)\fP, but may be edited in a \fBCTestCustom\fP
file. See \fI\%ctest_read_custom_files()\fP documentation.
.SS CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE
.sp
When saving a failing test\(aqs output, this is the maximum size, in bytes, that
will be collected by the \fI\%ctest_test()\fP command. Defaults to 307200
(300 KiB). See \fI\%CTEST_CUSTOM_TEST_OUTPUT_TRUNCATION\fP for possible
truncation modes.
.sp
If a test\(aqs output contains the literal string \(dqCTEST_FULL_OUTPUT\(dq,
the output will not be truncated and may exceed the maximum size.
.sp
It is initialized by \fI\%ctest(1)\fP, but may be edited in a \fBCTestCustom\fP
file. See \fI\%ctest_read_custom_files()\fP documentation.
.sp
For controlling the output collection of passing tests, see
\fI\%CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE\fP\&.
.SS CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS
.sp
The maximum number of errors in a single build step which will be detected.
After this, the \fI\%ctest_test()\fP command will truncate the output.
Defaults to 50.
.sp
It is initialized by \fI\%ctest(1)\fP, but may be edited in a \fBCTestCustom\fP
file. See \fI\%ctest_read_custom_files()\fP documentation.
.SS CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS
.sp
The maximum number of warnings in a single build step which will be detected.
After this, the \fI\%ctest_test()\fP command will truncate the output.
Defaults to 50.
.sp
It is initialized by \fI\%ctest(1)\fP, but may be edited in a \fBCTestCustom\fP
file. See \fI\%ctest_read_custom_files()\fP documentation.
.SS CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE
.sp
When saving a passing test\(aqs output, this is the maximum size, in bytes, that
will be collected by the \fI\%ctest_test()\fP command. Defaults to 1024
(1 KiB). See \fI\%CTEST_CUSTOM_TEST_OUTPUT_TRUNCATION\fP for possible
truncation modes.
.sp
If a test\(aqs output contains the literal string \(dqCTEST_FULL_OUTPUT\(dq,
the output will not be truncated and may exceed the maximum size.
.sp
It is initialized by \fI\%ctest(1)\fP, but may be edited in a \fBCTestCustom\fP
file. See \fI\%ctest_read_custom_files()\fP documentation.
.sp
For controlling the output collection of failing tests, see
\fI\%CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE\fP\&.
.SS CTEST_CUSTOM_MEMCHECK_IGNORE
.sp
A list of regular expressions to use to exclude tests during the
\fI\%ctest_memcheck()\fP command.
.sp
It is initialized by \fI\%ctest(1)\fP, but may be edited in a \fBCTestCustom\fP
file. See \fI\%ctest_read_custom_files()\fP documentation.
.SS CTEST_CUSTOM_POST_MEMCHECK
.sp
A list of commands to run at the end of the \fI\%ctest_memcheck()\fP command.
.sp
It is initialized by \fI\%ctest(1)\fP, but may be edited in a \fBCTestCustom\fP
file. See \fI\%ctest_read_custom_files()\fP documentation.
.SS CTEST_CUSTOM_POST_TEST
.sp
A list of commands to run at the end of the \fI\%ctest_test()\fP command.
.sp
It is initialized by \fI\%ctest(1)\fP, but may be edited in a \fBCTestCustom\fP
file. See \fI\%ctest_read_custom_files()\fP documentation.
.SS CTEST_CUSTOM_PRE_MEMCHECK
.sp
A list of commands to run at the start of the \fI\%ctest_memcheck()\fP
command.
.sp
It is initialized by \fI\%ctest(1)\fP, but may be edited in a \fBCTestCustom\fP
file. See \fI\%ctest_read_custom_files()\fP documentation.
.SS CTEST_CUSTOM_PRE_TEST
.sp
A list of commands to run at the start of the \fI\%ctest_test()\fP command.
.sp
It is initialized by \fI\%ctest(1)\fP, but may be edited in a \fBCTestCustom\fP
file. See \fI\%ctest_read_custom_files()\fP documentation.
.SS CTEST_CUSTOM_TEST_OUTPUT_TRUNCATION
.sp
New in version 3.24.

.sp
Set the test output truncation mode in case a maximum size is configured
via the \fI\%CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE\fP or
\fI\%CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE\fP variables.
By default the \fBtail\fP of the output will be truncated. Other possible
values are \fBmiddle\fP and \fBhead\fP\&.
.sp
It is initialized by \fI\%ctest(1)\fP, but may be edited in a \fBCTestCustom\fP
file. See \fI\%ctest_read_custom_files()\fP documentation.
.SS CTEST_CUSTOM_TESTS_IGNORE
.sp
A list of test names to be excluded from the set of tests run by the
\fI\%ctest_test()\fP command.
.sp
It is initialized by \fI\%ctest(1)\fP, but may be edited in a \fBCTestCustom\fP
file. See \fI\%ctest_read_custom_files()\fP documentation.
.SS CTEST_CUSTOM_WARNING_EXCEPTION
.sp
A list of regular expressions which will be used to exclude when detecting
warning messages in build outputs by the \fI\%ctest_build()\fP command.
.sp
It is initialized by \fI\%ctest(1)\fP, but may be edited in a \fBCTestCustom\fP
file. See \fI\%ctest_read_custom_files()\fP documentation.
.SS CTEST_CUSTOM_WARNING_MATCH
.sp
A list of regular expressions which will be used to detect warning messages in
build outputs by the \fI\%ctest_build()\fP command.
.sp
It is initialized by \fI\%ctest(1)\fP, but may be edited in a \fBCTestCustom\fP
file. See \fI\%ctest_read_custom_files()\fP documentation.
.SS CTEST_CVS_COMMAND
.sp
New in version 3.1.

.sp
Specify the CTest \fBCVSCommand\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_CVS_UPDATE_OPTIONS
.sp
New in version 3.1.

.sp
Specify the CTest \fBCVSUpdateOptions\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_DROP_LOCATION
.sp
New in version 3.1.

.sp
Specify the CTest \fBDropLocation\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_DROP_METHOD
.sp
New in version 3.1.

.sp
Specify the CTest \fBDropMethod\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_DROP_SITE
.sp
New in version 3.1.

.sp
Specify the CTest \fBDropSite\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_DROP_SITE_CDASH
.sp
New in version 3.1.

.sp
Specify the CTest \fBIsCDash\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_DROP_SITE_PASSWORD
.sp
New in version 3.1.

.sp
Specify the CTest \fBDropSitePassword\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_DROP_SITE_USER
.sp
New in version 3.1.

.sp
Specify the CTest \fBDropSiteUser\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_EXTRA_COVERAGE_GLOB
.sp
New in version 3.4.

.sp
A list of regular expressions which will be used to find files which should be
covered by the \fI\%ctest_coverage()\fP command.
.sp
It is initialized by \fI\%ctest(1)\fP, but may be edited in a \fBCTestCustom\fP
file. See \fI\%ctest_read_custom_files()\fP documentation.
.SS CTEST_GIT_COMMAND
.sp
New in version 3.1.

.sp
Specify the CTest \fBGITCommand\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_GIT_INIT_SUBMODULES
.sp
New in version 3.6.

.sp
Specify the CTest \fBGITInitSubmodules\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_GIT_UPDATE_CUSTOM
.sp
New in version 3.1.

.sp
Specify the CTest \fBGITUpdateCustom\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_GIT_UPDATE_OPTIONS
.sp
New in version 3.1.

.sp
Specify the CTest \fBGITUpdateOptions\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_HG_COMMAND
.sp
New in version 3.1.

.sp
Specify the CTest \fBHGCommand\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_HG_UPDATE_OPTIONS
.sp
New in version 3.1.

.sp
Specify the CTest \fBHGUpdateOptions\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_LABELS_FOR_SUBPROJECTS
.sp
New in version 3.10.

.sp
Specify the CTest \fBLabelsForSubprojects\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_MEMORYCHECK_COMMAND
.sp
New in version 3.1.

.sp
Specify the CTest \fBMemoryCheckCommand\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_MEMORYCHECK_COMMAND_OPTIONS
.sp
New in version 3.1.

.sp
Specify the CTest \fBMemoryCheckCommandOptions\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_MEMORYCHECK_SANITIZER_OPTIONS
.sp
New in version 3.1.

.sp
Specify the CTest \fBMemoryCheckSanitizerOptions\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.sp
CTest prepends correct sanitizer options \fB*_OPTIONS\fP
environment variable to executed command. CTests adds
its own \fBlog_path\fP to sanitizer options, don\(aqt provide your
own \fBlog_path\fP\&.
.SS CTEST_MEMORYCHECK_SUPPRESSIONS_FILE
.sp
New in version 3.1.

.sp
Specify the CTest \fBMemoryCheckSuppressionFile\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_MEMORYCHECK_TYPE
.sp
New in version 3.1.

.sp
Specify the CTest \fBMemoryCheckType\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
Valid values are \fBValgrind\fP, \fBPurify\fP, \fBBoundsChecker\fP, \fBDrMemory\fP,
\fBCudaSanitizer\fP, \fBThreadSanitizer\fP, \fBAddressSanitizer\fP, \fBLeakSanitizer\fP,
\fBMemorySanitizer\fP and \fBUndefinedBehaviorSanitizer\fP\&.
.SS CTEST_NIGHTLY_START_TIME
.sp
New in version 3.1.

.sp
Specify the CTest \fBNightlyStartTime\fP setting in a \fI\%ctest(1)\fP
dashboard client script.
.sp
Note that this variable must always be set for a nightly build in a
dashboard script. It is needed so that nightly builds can be properly grouped
together in CDash.
.SS CTEST_P4_CLIENT
.sp
New in version 3.1.

.sp
Specify the CTest \fBP4Client\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_P4_COMMAND
.sp
New in version 3.1.

.sp
Specify the CTest \fBP4Command\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_P4_OPTIONS
.sp
New in version 3.1.

.sp
Specify the CTest \fBP4Options\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_P4_UPDATE_OPTIONS
.sp
New in version 3.1.

.sp
Specify the CTest \fBP4UpdateOptions\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_RESOURCE_SPEC_FILE
.sp
New in version 3.18.

.sp
Specify the CTest \fBResourceSpecFile\fP setting in a \fI\%ctest(1)\fP
dashboard client script.
.sp
This can also be used to specify the resource spec file from a CMake build. If
no \fBRESOURCE_SPEC_FILE\fP is passed to \fI\%ctest_test()\fP, and
\fBCTEST_RESOURCE_SPEC_FILE\fP is not specified in the dashboard script, the
value of this variable from the build is used.
.SS CTEST_RUN_CURRENT_SCRIPT
.sp
New in version 3.11.

.sp
Setting this to 0 prevents \fI\%ctest(1)\fP from being run again when it
reaches the end of a script run by calling \fI\%ctest \-S\fP\&.
.SS CTEST_SCRIPT_DIRECTORY
.sp
The directory containing the top\-level CTest script.
The concept is similar to \fI\%CMAKE_SOURCE_DIR\fP\&.
.SS CTEST_SITE
.sp
New in version 3.1.

.sp
Specify the CTest \fBSite\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_SOURCE_DIRECTORY
.sp
New in version 3.1.

.sp
Specify the CTest \fBSourceDirectory\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_SUBMIT_INACTIVITY_TIMEOUT
.sp
New in version 3.23.

.sp
Specify the CTest \fBSubmitInactivityTimeout\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_SUBMIT_URL
.sp
New in version 3.14.

.sp
Specify the CTest \fBSubmitURL\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_SVN_COMMAND
.sp
New in version 3.1.

.sp
Specify the CTest \fBSVNCommand\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_SVN_OPTIONS
.sp
New in version 3.1.

.sp
Specify the CTest \fBSVNOptions\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_SVN_UPDATE_OPTIONS
.sp
New in version 3.1.

.sp
Specify the CTest \fBSVNUpdateOptions\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_TEST_LOAD
.sp
New in version 3.4.

.sp
Specify the \fBTestLoad\fP setting in the \fI\%CTest Test Step\fP
of a \fI\%ctest(1)\fP dashboard client script.  This sets the
default value for the \fBTEST_LOAD\fP option of the \fI\%ctest_test()\fP
command.
.SS CTEST_TEST_TIMEOUT
.sp
New in version 3.1.

.sp
Specify the CTest \fBTimeOut\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_UPDATE_COMMAND
.sp
New in version 3.1.

.sp
Specify the CTest \fBUpdateCommand\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_UPDATE_OPTIONS
.sp
New in version 3.1.

.sp
Specify the CTest \fBUpdateOptions\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_UPDATE_VERSION_ONLY
.sp
New in version 3.1.

.sp
Specify the CTest \fI\%UpdateVersionOnly\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_UPDATE_VERSION_OVERRIDE
.sp
New in version 3.15.

.sp
Specify the CTest \fI\%UpdateVersionOverride\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SS CTEST_USE_LAUNCHERS
.sp
New in version 3.1.

.sp
Specify the CTest \fBUseLaunchers\fP setting
in a \fI\%ctest(1)\fP dashboard client script.
.SH VARIABLES FOR CPACK
.SS CPACK_ABSOLUTE_DESTINATION_FILES
.sp
List of files which have been installed using an \fBABSOLUTE DESTINATION\fP path.
.sp
This variable is a Read\-Only variable which is set internally by CPack
during installation and before packaging using
\fI\%CMAKE_ABSOLUTE_DESTINATION_FILES\fP defined in \fBcmake_install.cmake\fP
scripts.  The value can be used within CPack project configuration
file and/or \fBCPack<GEN>.cmake\fP file of \fB<GEN>\fP generator.
.SS CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY
.sp
Boolean toggle to include/exclude top level directory (component case).
.sp
Similar usage as \fI\%CPACK_INCLUDE_TOPLEVEL_DIRECTORY\fP but for the
component case.  See \fI\%CPACK_INCLUDE_TOPLEVEL_DIRECTORY\fP
documentation for the detail.
.SS CPACK_CUSTOM_INSTALL_VARIABLES
.sp
New in version 3.21.

.sp
CPack variables (set via e.g. \fI\%cpack \-D\fP, \fBCPackConfig.cmake\fP or
\fI\%CPACK_PROJECT_CONFIG_FILE\fP scripts) are not directly visible in
installation scripts.  Instead, one can pass a list of \fBvarName=value\fP
pairs in the \fBCPACK_CUSTOM_INSTALL_VARIABLES\fP variable.  At install time,
each list item will result in a variable of the specified name (\fBvarName\fP)
being set to the given \fBvalue\fP\&.  The \fB=\fP can be omitted for an empty
\fBvalue\fP\&.
.sp
\fBCPACK_CUSTOM_INSTALL_VARIABLES\fP allows the packaging installation to be
influenced by the user or driving script at CPack runtime without having to
regenerate the install scripts.
.SS Example
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
install(FILES large.txt DESTINATION data)

install(CODE [[
  if(ENABLE_COMPRESSION)
    # \(dqrun\-compressor\(dq is a fictional tool that produces
    # large.txt.xz from large.txt and then removes the input file
    execute_process(COMMAND run\-compressor $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/large.txt)
  endif()
]])
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
With the above example snippet, \fI\%cpack\fP will by default
run the installation script with \fBENABLE_COMPRESSION\fP unset, resulting in
a package containing the uncompressed \fBlarge.txt\fP\&.  This can be overridden
when invoking \fI\%cpack\fP like so:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
cpack \-D \(dqCPACK_CUSTOM_INSTALL_VARIABLES=ENABLE_COMPRESSION=TRUE\(dq
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
The installation script will then run with \fBENABLE_COMPRESSION\fP set to
\fBTRUE\fP, resulting in a package containing the compressed \fBlarge.txt.xz\fP
instead.
.SS CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION
.sp
Ask CPack to error out as soon as a file with absolute \fBINSTALL DESTINATION\fP
is encountered.
.sp
The fatal error is emitted before the installation of the offending
file takes place.  Some CPack generators, like \fBNSIS\fP, enforce this
internally.  This variable triggers the definition
of \fI\%CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION\fP when CPack
runs.
.SS CPACK_INCLUDE_TOPLEVEL_DIRECTORY
.sp
Boolean toggle to include/exclude top level directory.
.sp
When preparing a package CPack installs the item under the so\-called
top level directory.  The purpose of is to include (set to \fB1\fP or \fBON\fP or
\fBTRUE\fP) the top level directory in the package or not (set to \fB0\fP or
\fBOFF\fP or \fBFALSE\fP).
.sp
Each CPack generator has a built\-in default value for this variable.
E.g.  Archive generators (ZIP, TGZ, ...) includes the top level
whereas RPM or DEB don\(aqt.  The user may override the default value by
setting this variable.
.sp
There is a similar variable
\fI\%CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY\fP which may be used
to override the behavior for the component packaging
case which may have different default value for historical (now
backward compatibility) reason.
.SS CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS
.sp
New in version 3.11.

.sp
Default permissions for implicitly created directories during packaging.
.sp
This variable serves the same purpose during packaging as the
\fI\%CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS\fP variable
serves during installation (e.g. \fBmake install\fP).
.sp
If \fIinclude(CPack)\fP is used then by default this variable is set to the content
of \fI\%CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS\fP\&.
.SS CPACK_PACKAGING_INSTALL_PREFIX
.sp
The prefix used in the built package.
.sp
Each CPack generator has a default value (like \fB/usr\fP).  This default
value may be overwritten from the \fBCMakeLists.txt\fP or the \fI\%cpack(1)\fP
command line by setting an alternative value.  Example:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
set(CPACK_PACKAGING_INSTALL_PREFIX \(dq/opt\(dq)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
This is not the same purpose as \fI\%CMAKE_INSTALL_PREFIX\fP which is used
when installing from the build tree without building a package.
.SS CPACK_SET_DESTDIR
.sp
Boolean toggle to make CPack use \fBDESTDIR\fP mechanism when packaging.
.sp
\fBDESTDIR\fP means DESTination DIRectory.  It is commonly used by makefile
users in order to install software at non\-default location.  It is a
basic relocation mechanism that should not be used on Windows (see
\fI\%CMAKE_INSTALL_PREFIX\fP documentation).  It is usually invoked like
this:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
make DESTDIR=/home/john install
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
which will install the concerned software using the installation
prefix, e.g. \fB/usr/local\fP prepended with the \fBDESTDIR\fP value which
finally gives \fB/home/john/usr/local\fP\&.  When preparing a package, CPack
first installs the items to be packaged in a local (to the build tree)
directory by using the same \fBDESTDIR\fP mechanism.  Nevertheless, if
\fBCPACK_SET_DESTDIR\fP is set then CPack will set \fBDESTDIR\fP before doing the
local install.  The most noticeable difference is that without
\fBCPACK_SET_DESTDIR\fP, CPack uses \fI\%CPACK_PACKAGING_INSTALL_PREFIX\fP
as a prefix whereas with \fBCPACK_SET_DESTDIR\fP set, CPack will use
\fI\%CMAKE_INSTALL_PREFIX\fP as a prefix.
.sp
Manually setting \fBCPACK_SET_DESTDIR\fP may help (or simply be necessary)
if some install rules uses absolute \fBDESTINATION\fP (see CMake
\fI\%install()\fP command).  However, starting with CPack/CMake 2.8.3 RPM
and DEB installers tries to handle \fBDESTDIR\fP automatically so that it is
seldom necessary for the user to set it.
.SS CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION
.sp
Ask CPack to warn each time a file with absolute \fBINSTALL DESTINATION\fP is
encountered.
.sp
This variable triggers the definition of
\fI\%CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION\fP when CPack runs
\fBcmake_install.cmake\fP scripts.
.SH VARIABLE EXPANSION OPERATORS
.SS CACHE
.sp
New in version 3.13.

.sp
Operator to read cache variables.
.sp
Use the syntax \fB$CACHE{VAR}\fP to read cache entry \fBVAR\fP\&.
See the \fI\%cmake\-language(7) variables\fP
documentation for more complete documentation of the interaction of
normal variables and cache entries.
.sp
When evaluating \fI\%Variable References\fP of the form \fB${VAR}\fP,
CMake first searches for a normal variable with that name, and if not
found CMake will search for a cache entry with that name.
The \fB$CACHE{VAR}\fP syntax can be used to do direct cache lookup and
ignore any existing normal variable.
.sp
See the \fI\%set()\fP and \fI\%unset()\fP commands to see how to
write or remove cache variables.
.SS ENV
.sp
Operator to read environment variables.
.sp
Use the syntax \fB$ENV{VAR}\fP to read environment variable \fBVAR\fP\&.
.sp
To test whether an environment variable is defined, use the signature
\fBif(DEFINED ENV{<name>})\fP of the \fI\%if()\fP command.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
Environment variable names containing special characters like parentheses
may need to be escaped.  (Policy \fI\%CMP0053\fP must also be enabled.)
For example, to get the value of the Windows environment variable
\fBProgramFiles(x86)\fP, use:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
set(ProgramFiles_x86 \(dq$ENV{ProgramFiles\e(x86\e)}\(dq)
.ft P
.fi
.UNINDENT
.UNINDENT
.UNINDENT
.UNINDENT
.sp
For general information on environment variables, see the
\fI\%Environment Variables\fP
section in the \fI\%cmake\-language(7)\fP manual.
.SH INTERNAL VARIABLES
.sp
CMake has many internal variables.  Most of them are undocumented.
Some of them, however, were at some point described as normal
variables, and therefore may be encountered in legacy code. They
are subject to change, and not recommended for use in project code.
.SS CMAKE_HOME_DIRECTORY
.sp
Path to top of source tree. Same as \fI\%CMAKE_SOURCE_DIR\fP\&.
.sp
This is an internal cache entry used to locate the source directory
when loading a \fBCMakeCache.txt\fP from a build tree.  It should not
be used in project code.  The variable \fI\%CMAKE_SOURCE_DIR\fP
has the same value and should be preferred.
.SS CMAKE_INTERNAL_PLATFORM_ABI
.sp
An internal variable subject to change.
.sp
This is used in determining the compiler ABI and is subject to change.
.SS CMAKE_<LANG>_COMPILER_ABI
.sp
An internal variable subject to change.
.sp
This is used in determining the compiler ABI and is subject to change.
.SS CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID
.sp
New in version 3.10.

.sp
An internal variable subject to change.
.sp
This is used to identify the variant of a compiler based on its target
architecture.  For some compilers this is needed to determine the correct
usage.
.SS CMAKE_<LANG>_COMPILER_VERSION_INTERNAL
.sp
New in version 3.10.

.sp
An internal variable subject to change.
.sp
This is used to identify the variant of a compiler based on an internal
version number.  For some compilers this is needed to determine the
correct usage.
.SS CMAKE_<LANG>_LINKER_PREFERENCE
.sp
An internal variable subject to change.
.sp
Preference value for linker language selection.
.sp
The \(dqlinker language\(dq for executable, shared library, and module
targets is the language whose compiler will invoke the linker.  The
\fI\%LINKER_LANGUAGE\fP target property sets the language explicitly.
Otherwise, the linker language is that whose linker preference value
is highest among languages compiled and linked into the target.  See
also the \fI\%CMAKE_<LANG>_LINKER_PREFERENCE_PROPAGATES\fP variable.
.SS CMAKE_<LANG>_LINKER_PREFERENCE_PROPAGATES
.sp
An internal variable subject to change.
.sp
True if \fI\%CMAKE_<LANG>_LINKER_PREFERENCE\fP propagates across targets.
.sp
This is used when CMake selects a linker language for a target.
Languages compiled directly into the target are always considered.  A
language compiled into static libraries linked by the target is
considered if this variable is true.
.SS CMAKE_<LANG>_PLATFORM_ID
.sp
An internal variable subject to change.
.sp
This is used in determining the platform and is subject to change.
.SS CMAKE_NOT_USING_CONFIG_FLAGS
.sp
Skip \fB_BUILD_TYPE\fP flags if true.
.sp
This is an internal flag used by the generators in CMake to tell CMake
to skip the \fB_BUILD_TYPE\fP flags.
.SS CMAKE_VS_INTEL_Fortran_PROJECT_VERSION
.sp
When generating for \fI\%Visual Studio 9 2008\fP or greater with the Intel
Fortran plugin installed, this specifies the \fB\&.vfproj\fP project file format
version.  This is intended for internal use by CMake and should not be
used by project code.
.SH DEPRECATED VARIABLES THAT PROVIDE INFORMATION
.SS CMAKE_EXTRA_GENERATOR
.sp
Deprecated since version 3.27: Support for \fI\%Extra Generators\fP is deprecated and will be removed from
a future version of CMake.  IDEs may use the \fI\%cmake\-file\-api(7)\fP
to view CMake\-generated project build trees.

.sp
The extra generator used to build the project.  See
\fI\%cmake\-generators(7)\fP\&.
.sp
When using the Eclipse, CodeBlocks, CodeLite, Kate or Sublime generators, CMake
generates Makefiles (\fI\%CMAKE_GENERATOR\fP) and additionally project
files for the respective IDE.  This IDE project file generator is stored in
\fBCMAKE_EXTRA_GENERATOR\fP (e.g.  \fBEclipse CDT4\fP).
.SH DEPRECATED VARIABLES THAT CHANGE BEHAVIOR
.SS CMAKE_AUTOMOC_RELAXED_MODE
.sp
Deprecated since version 3.15.

.sp
Switch between strict and relaxed automoc mode.
.sp
By default, \fI\%AUTOMOC\fP behaves exactly as described in the
documentation of the \fI\%AUTOMOC\fP target property.  When set to
\fBTRUE\fP, it accepts more input and tries to find the correct input file for
\fBmoc\fP even if it differs from the documented behavior.  In this mode it
e.g.  also checks whether a header file is intended to be processed by moc
when a \fB\(dqfoo.moc\(dq\fP file has been included.
.sp
Relaxed mode has to be enabled for KDE4 compatibility.
.SS CMAKE_BACKWARDS_COMPATIBILITY
.sp
Deprecated.  See CMake Policy \fI\%CMP0001\fP documentation.
.SS CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY
.sp
New in version 3.1.

.sp
Deprecated since version 3.16: Use the \fI\%CMAKE_FIND_USE_PACKAGE_REGISTRY\fP variable instead.

.sp
By default this variable is not set. If neither
\fI\%CMAKE_FIND_USE_PACKAGE_REGISTRY\fP nor
\fBCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY\fP is set, then
\fI\%find_package()\fP will use the \fI\%User Package Registry\fP
unless the \fBNO_CMAKE_PACKAGE_REGISTRY\fP option is provided.
.sp
\fBCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY\fP is ignored if
\fI\%CMAKE_FIND_USE_PACKAGE_REGISTRY\fP is set.
.sp
In some cases, for example to locate only system wide installations, it
is not desirable to use the \fI\%User Package Registry\fP when searching
for packages. If the \fBCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY\fP
variable is \fBTRUE\fP, all the \fI\%find_package()\fP commands will skip
the \fI\%User Package Registry\fP as if they were called with the
\fBNO_CMAKE_PACKAGE_REGISTRY\fP argument.
.sp
See also \fI\%Disabling the Package Registry\fP\&.
.SS CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY
.sp
New in version 3.1.

.sp
Deprecated since version 3.16: Use the \fI\%CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY\fP variable instead.

.sp
By default this variable is not set. If neither
\fI\%CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY\fP nor
\fBCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY\fP is set, then
\fI\%find_package()\fP will use the \fI\%System Package Registry\fP
unless the \fBNO_CMAKE_SYSTEM_PACKAGE_REGISTRY\fP option is provided.
.sp
\fBCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY\fP is ignored if
\fI\%CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY\fP is set.
.sp
In some cases, it is not desirable to use the
\fI\%System Package Registry\fP when searching for packages. If the
\fBCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY\fP variable is
\fBTRUE\fP, all the \fI\%find_package()\fP commands will skip
the \fI\%System Package Registry\fP as if they were called with the
\fBNO_CMAKE_SYSTEM_PACKAGE_REGISTRY\fP argument.
.sp
See also \fI\%Disabling the Package Registry\fP\&.
.SH DEPRECATED VARIABLES THAT DESCRIBE THE SYSTEM
.SS MSVC10
.sp
Discouraged.  Use the \fI\%MSVC_VERSION\fP variable instead.
.sp
\fBTrue\fP when using the Microsoft Visual Studio \fBv100\fP toolset
(\fBcl\fP version 16) or another compiler that simulates it.
.SS MSVC11
.sp
Discouraged.  Use the \fI\%MSVC_VERSION\fP variable instead.
.sp
\fBTrue\fP when using the Microsoft Visual Studio \fBv110\fP toolset
(\fBcl\fP version 17) or another compiler that simulates it.
.SS MSVC12
.sp
Discouraged.  Use the \fI\%MSVC_VERSION\fP variable instead.
.sp
\fBTrue\fP when using the Microsoft Visual Studio \fBv120\fP toolset
(\fBcl\fP version 18) or another compiler that simulates it.
.SS MSVC14
.sp
New in version 3.1.

.sp
Discouraged.  Use the \fI\%MSVC_VERSION\fP variable instead.
.sp
\fBTrue\fP when using the Microsoft Visual Studio \fBv140\fP or \fBv141\fP
toolset (\fBcl\fP version 19) or another compiler that simulates it.
.SS MSVC60
.sp
Discouraged.  Use the \fI\%MSVC_VERSION\fP variable instead.
.sp
\fBTrue\fP when using Microsoft Visual C++ 6.0.
.sp
Set to \fBtrue\fP when the compiler is version 6.0 of Microsoft Visual C++.
.SS MSVC70
.sp
Discouraged.  Use the \fI\%MSVC_VERSION\fP variable instead.
.sp
\fBTrue\fP when using Microsoft Visual C++ 7.0.
.sp
Set to \fBtrue\fP when the compiler is version 7.0 of Microsoft Visual C++.
.SS MSVC71
.sp
Discouraged.  Use the \fI\%MSVC_VERSION\fP variable instead.
.sp
\fBTrue\fP when using Microsoft Visual C++ 7.1.
.sp
Set to \fBtrue\fP when the compiler is version 7.1 of Microsoft Visual C++.
.SS MSVC80
.sp
Discouraged.  Use the \fI\%MSVC_VERSION\fP variable instead.
.sp
\fBTrue\fP when using the Microsoft Visual Studio \fBv80\fP toolset
(\fBcl\fP version 14) or another compiler that simulates it.
.SS MSVC90
.sp
Discouraged.  Use the \fI\%MSVC_VERSION\fP variable instead.
.sp
\fBTrue\fP when using the Microsoft Visual Studio \fBv90\fP toolset
(\fBcl\fP version 15) or another compiler that simulates it.
.SH DEPRECATED VARIABLES THAT CONTROL THE BUILD
.SS CMAKE_IOS_INSTALL_COMBINED
.sp
New in version 3.5.

.sp
Deprecated since version 3.28: This is deprecated because \fI\%IOS_INSTALL_COMBINED\fP is deprecated.

.sp
Default value for \fI\%IOS_INSTALL_COMBINED\fP of targets.
.sp
This variable is used to initialize the \fI\%IOS_INSTALL_COMBINED\fP
property on all the targets.  See that target property for additional
information.
.SS CMAKE_USE_RELATIVE_PATHS
.sp
This variable has no effect.  The partially implemented effect it
had in previous releases was removed in CMake 3.4.
.SH DEPRECATED VARIABLES FOR LANGUAGES
.SS CMAKE_COMPILER_IS_GNUCC
.sp
True if the \fBC\fP compiler is GNU.
.sp
This variable is deprecated.  Use
\fI\%CMAKE_C_COMPILER_ID\fP instead.
.SS CMAKE_COMPILER_IS_GNUCXX
.sp
True if the C++ (\fBCXX\fP) compiler is GNU.
.sp
This variable is deprecated.  Use
\fI\%CMAKE_CXX_COMPILER_ID\fP instead.
.SS CMAKE_COMPILER_IS_GNUG77
.sp
True if the \fBFortran\fP compiler is GNU.
.sp
This variable is deprecated.  Use
\fI\%CMAKE_Fortran_COMPILER_ID\fP instead.
.SH DEPRECATED VARIABLES FOR CTEST
.SS CTEST_CVS_CHECKOUT
.sp
New in version 3.1.

.sp
Deprecated.  Use \fI\%CTEST_CHECKOUT_COMMAND\fP instead.
.SS CTEST_SCP_COMMAND
.sp
New in version 3.1.

.sp
Legacy option.  Not used.
.SS CTEST_TRIGGER_SITE
.sp
New in version 3.1.

.sp
Legacy option.  Not used.
.SH COPYRIGHT
2000-2024 Kitware, Inc. and Contributors
.\" Generated by docutils manpage writer.
.