code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0076 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0075" href="CMP0075.html" />
    <link rel="prev" title="CMP0077" href="CMP0077.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0076

CMP0076¶

New in version 3.13.

The target_sources() command converts relative paths to absolute.

In CMake 3.13 and above, the target_sources() command now converts
relative source file paths to absolute paths in the following cases:

Source files are added to the target's INTERFACE_SOURCES
property.

The target's SOURCE_DIR property differs from
CMAKE_CURRENT_SOURCE_DIR.

A path that begins with a generator expression is always left unmodified.

This policy provides compatibility with projects that have not been updated
to expect this behavior.  The OLD behavior for this policy is to leave
all relative source file paths unmodified.  The NEW behavior of this
policy is to convert relative paths to absolute according to above rules.

This policy was introduced in CMake version 3.13.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake warns, and uses OLD behavior.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0077

Next topic

CMP0075

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0076

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0077 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0076" href="CMP0076.html" />
    <link rel="prev" title="CMP0078" href="CMP0078.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0077

CMP0077¶

New in version 3.13.

option() honors normal variables.

The option() command is typically used to create a cache entry
to allow users to set the option.  However, there are cases in which a
normal (non-cached) variable of the same name as the option may be
defined by the project prior to calling the option() command.
For example, a project that embeds another project as a subdirectory
may want to hard-code options of the subproject to build the way it needs.

For historical reasons in CMake 3.12 and below the option()
command removes a normal (non-cached) variable of the same name when:

a cache entry of the specified name does not exist at all, or

a cache entry of the specified name exists but has not been given
a type (e.g. via -D<name>=ON on the command line).

In both of these cases (typically on the first run in a new build tree),
the option() command gives the cache entry type BOOL and
removes any normal (non-cached) variable of the same name.  In the
remaining case that the cache entry of the specified name already
exists and has a type (typically on later runs in a build tree), the
option() command changes nothing and any normal variable of
the same name remains set.

In CMake 3.13 and above the option() command prefers to
do nothing when a normal variable of the given name already exists.
It does not create or update a cache entry or remove the normal variable.
The new behavior is consistent between the first and later runs in a
build tree.  This policy provides compatibility with projects that have
not been updated to expect the new behavior.

When the option() command sees a normal variable of the given
name:

The OLD behavior for this policy is to proceed even when a normal
variable of the same name exists.  If the cache entry does not already
exist and have a type then it is created and/or given a type and the
normal variable is removed.

The NEW behavior for this policy is to do nothing when a normal
variable of the same name exists.  The normal variable is not removed.
The cache entry is not created or updated and is ignored if it exists.

See CMP0126 for a similar policy for the set(CACHE)
command, but note that there are some differences in NEW behavior
between the two policies.

This policy was introduced in CMake version 3.13.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake warns, and uses OLD behavior.

Use the CMAKE_POLICY_DEFAULT_CMP0077 variable to set the policy for
a third-party project in a subdirectory without modifying it.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0078

Next topic

CMP0076

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0077

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.

repo_name: lazytadpole/codenamesilverfish

license: mit


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0078 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0077" href="CMP0077.html" />
    <link rel="prev" title="CMP0079" href="CMP0079.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0078

CMP0078¶

New in version 3.13.

UseSWIG generates standard target names.

Starting with CMake 3.13, UseSWIG generates now standard target
names. This policy provides compatibility with projects that expect the legacy
behavior.

The OLD behavior for this policy relies on
UseSWIG_TARGET_NAME_PREFERENCE variable that can be used to specify an
explicit preference.  The value may be one of:

LEGACY: legacy strategy is applied. Variable
SWIG_MODULE_<name>_REAL_NAME must be used to get real target name.
This is the default if not specified.

STANDARD: target name matches specified name.

This policy was introduced in CMake version 3.13.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake warns, and uses OLD behavior.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0079

Next topic

CMP0077

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0078

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0079 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0078" href="CMP0078.html" />
    <link rel="prev" title="CMP0080" href="CMP0080.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0079

CMP0079¶

New in version 3.13.

target_link_libraries() allows use with targets in other directories.

Prior to CMake 3.13 the target_link_libraries() command did not
accept targets not created in the calling directory as its first argument
for calls that update the LINK_LIBRARIES of the target itself.
It did accidentally accept targets from other directories on calls that
only update the INTERFACE_LINK_LIBRARIES, but would simply
add entries to the property as if the call were made in the original
directory.  Thus link interface libraries specified this way were always
looked up by generators in the scope of the original target rather than
in the scope that called target_link_libraries().

CMake 3.13 now allows the target_link_libraries() command to
be called from any directory to add link dependencies and link interface
libraries to targets created in other directories.  The entries are added
to LINK_LIBRARIES and INTERFACE_LINK_LIBRARIES
using a special (internal) suffix to tell the generators to look up the
names in the calling scope rather than the scope that created the target.

This policy provides compatibility with projects that already use
target_link_libraries() with the INTERFACE keyword
on a target in another directory to add INTERFACE_LINK_LIBRARIES
entries to be looked up in the target's directory.  Such projects should
be updated to be aware of the new scoping rules in that case.

The OLD behavior of this policy is to disallow
target_link_libraries() calls naming targets from another directory
except in the previously accidentally allowed case of using the INTERFACE
keyword only.  The NEW behavior of this policy is to allow all such
calls but use the new scoping rules.

This policy was introduced in CMake version 3.13.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake warns, and uses OLD behavior.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0080

Next topic

CMP0078

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0079

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0080 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0079" href="CMP0079.html" />
    <link rel="prev" title="CMP0081" href="CMP0081.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0080

CMP0080¶

New in version 3.13.

BundleUtilities cannot be included at configure time.

The macros provided by BundleUtilities are intended to be invoked
at install time rather than at configure time, because they depend on the
listed targets already existing at the time they are invoked. If they are
invoked at configure time, the targets haven't been built yet, and the
commands will fail.

This policy restricts the inclusion of BundleUtilities to
cmake -P style scripts and install rules. Specifically, it looks for the
presence of CMAKE_GENERATOR and throws a fatal error if it exists.

The OLD behavior of this policy is to allow BundleUtilities to
be included at configure time. The NEW behavior of this policy is to
disallow such inclusion.

This policy was introduced in CMake version 3.13.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake warns, and uses OLD behavior.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0081

Next topic

CMP0079

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0080

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0081 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0080" href="CMP0080.html" />
    <link rel="prev" title="CMP0082" href="CMP0082.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0081

CMP0081¶

New in version 3.13.

Relative paths not allowed in LINK_DIRECTORIES target property.

CMake 3.12 and lower allowed the LINK_DIRECTORIES directory
property to contain relative paths.  The base path for such relative
entries is not well defined.  CMake 3.13 and later will issue a
FATAL_ERROR if the LINK_DIRECTORIES target property
(which is initialized by the LINK_DIRECTORIES directory property)
contains a relative path.

The OLD behavior for this policy is not to warn about relative paths
in the LINK_DIRECTORIES target property.  The NEW behavior for
this policy is to issue a FATAL_ERROR if LINK_DIRECTORIES
contains a relative path.

This policy was introduced in CMake version 3.13.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake warns, and uses OLD behavior.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0082

Next topic

CMP0080

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0081

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0082 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0081" href="CMP0081.html" />
    <link rel="prev" title="CMP0083" href="CMP0083.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0082

CMP0082¶

New in version 3.14.

Install rules from add_subdirectory() calls are interleaved with
those in caller.

CMake 3.13 and lower ran the install rules from add_subdirectory()
after all other install rules, even if add_subdirectory() was called
before the other install rules.  CMake 3.14 and above prefer to interleave
these add_subdirectory() install rules with the others so that
they are run in the order they are declared.  This policy provides
compatibility for projects that have not been updated to expect the
new behavior.

The OLD behavior for this policy is to run the install rules from
add_subdirectory() after the other install rules.  The NEW
behavior for this policy is to run all install rules in the order they are
declared.

This policy was introduced in CMake version 3.14.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake does not warn by default, and uses OLD behavior.

See documentation of the
CMAKE_POLICY_WARNING_CMP0082
variable to control the warning.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0083

Next topic

CMP0081

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0082

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0083 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0082" href="CMP0082.html" />
    <link rel="prev" title="CMP0084" href="CMP0084.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0083

CMP0083¶

New in version 3.14.

To control generation of Position Independent Executable (PIE) or not, some
flags are required at link time.

CMake 3.13 and lower did not add these link flags when
POSITION_INDEPENDENT_CODE is set.

The OLD behavior for this policy is to not manage PIE link flags. The
NEW behavior is to add link flags if POSITION_INDEPENDENT_CODE
is set:

Set to TRUE: flags to produce a position independent executable are
passed to the linker step. For example -pie for GCC.

Set to FALSE: flags not to produce a position independent executable are
passed to the linker step. For example -no-pie for GCC.

Not set: no flags are passed to the linker step.

Since a given linker may not support PIE flags in all environments in
which it is used, it is the project's responsibility to use the
CheckPIESupported module to check for support to ensure that the
POSITION_INDEPENDENT_CODE target property for executables will be
honored at link time.

This policy was introduced in CMake version 3.14.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake does not warn, and uses OLD behavior.

Note

Android platform has a special handling of PIE so it is not required
to use the CheckPIESupported module to ensure flags are passed to
the linker.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Examples¶

Behave like CMake 3.13 and do not apply any PIE flags at link stage.

cmake_minimum_required(VERSION 3.13)
project(foo)

# ...

add_executable(foo ...)
set_property(TARGET foo PROPERTY POSITION_INDEPENDENT_CODE TRUE)

Use the CheckPIESupported module to detect whether PIE is
supported by the current linker and environment.  Apply PIE flags only
if the linker supports them.

cmake_minimum_required(VERSION 3.14) # CMP0083 NEW
project(foo)

include(CheckPIESupported)
check_pie_supported()

# ...

add_executable(foo ...)
set_property(TARGET foo PROPERTY POSITION_INDEPENDENT_CODE TRUE)

Table of Contents

CMP0083

Examples

Previous topic

CMP0084

Next topic

CMP0082

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0083

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0084 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0083" href="CMP0083.html" />
    <link rel="prev" title="CMP0085" href="CMP0085.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0084

CMP0084¶

New in version 3.14.

The FindQt module does not exist for find_package().

The existence of FindQt means that for Qt upstream to provide
package config files that can be found by find_package(Qt), the consuming
project has to explicitly specify find_package(Qt CONFIG). Removing this
module gives Qt a path forward for exporting its own config files which can
easily be found by consuming projects.

This policy pretends that CMake's internal FindQt module does not
exist for find_package(). If a project really wants to use Qt 3 or 4,
it can call find_package(Qt[34]), include(FindQt), or add
FindQt to their CMAKE_MODULE_PATH.

The OLD behavior of this policy is for FindQt to exist for
find_package(). The NEW behavior is to pretend that it doesn't
exist for find_package().

This policy was introduced in CMake version 3.14.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake warns, and uses OLD behavior.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0085

Next topic

CMP0083

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0084

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0085 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0084" href="CMP0084.html" />
    <link rel="prev" title="CMP0086" href="CMP0086.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0085

CMP0085¶

New in version 3.14.

$<IN_LIST:...> handles empty list items.

In CMake 3.13 and lower, the $<IN_LIST:...> generator expression always
returned 0 if the first argument was empty, even if the list contained an
empty item. This behavior is inconsistent with the IN_LIST behavior of
if(), which this generator expression is meant to emulate. CMake 3.14
and later handles this case correctly.

The OLD behavior of this policy is for $<IN_LIST:...> to always return
0 if the first argument is empty. The NEW behavior is to return 1
if the first argument is empty and the list contains an empty item.

This policy was introduced in CMake version 3.14.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake warns, and uses OLD behavior.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0086

Next topic

CMP0084

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0085

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0086 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0085" href="CMP0085.html" />
    <link rel="prev" title="CMP0087" href="CMP0087.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0086

CMP0086¶

New in version 3.14.

UseSWIG honors SWIG_MODULE_NAME via -module flag.

Starting with CMake 3.14, UseSWIG passes option
-module <module_name> to SWIG compiler if the file property
SWIG_MODULE_NAME is specified. This policy provides compatibility with
projects that expect the legacy behavior.

The OLD behavior for this policy is to never pass -module option.
The NEW behavior is to pass -module option to SWIG compiler if
SWIG_MODULE_NAME is specified.

This policy was introduced in CMake version 3.14.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake warns, and uses OLD behavior.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0087

Next topic

CMP0085

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0086

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0087 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0086" href="CMP0086.html" />
    <link rel="prev" title="CMP0088" href="CMP0088.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0087

CMP0087¶

New in version 3.14.

install(CODE) and install(SCRIPT) support generator
expressions.

In CMake 3.13 and earlier, install(CODE) and
install(SCRIPT) did not evaluate generator expressions.  CMake 3.14
and later will evaluate generator expressions for install(CODE) and
install(SCRIPT).

The OLD behavior of this policy is for install(CODE) and
install(SCRIPT) to not evaluate generator expressions.  The NEW
behavior is to evaluate generator expressions for install(CODE) and
install(SCRIPT).

Note that it is the value of this policy setting at the end of the directory
scope that is important, not its setting at the time of the call to
install(CODE) or install(SCRIPT).  This has implications
for calling these commands from places that have their own policy scope but not
their own directory scope (e.g. from files brought in via include()
rather than add_subdirectory()).

This policy was introduced in CMake version 3.14.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake warns, and uses OLD behavior.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0088

Next topic

CMP0086

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0087

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0088 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0087" href="CMP0087.html" />
    <link rel="prev" title="CMP0089" href="CMP0089.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0088

CMP0088¶

New in version 3.14.

FindBISON runs bison in CMAKE_CURRENT_BINARY_DIR
when executing.

The module provides a BISON_TARGET macro which generates BISON output.
In CMake 3.13 and below the macro would generate a custom command that runs
bison in the source directory.  CMake 3.14 and later prefer to run it
in the build directory and use CMAKE_CURRENT_BINARY_DIR as the
WORKING_DIRECTORY of its add_custom_command() invocation.
This ensures that any implicitly generated file is written to the build
tree rather than the source.

This policy provides compatibility for projects that have not been updated
to expect the new behavior.

The OLD behavior for this policy is for BISON_TARGET to use
the current source directory for the WORKING_DIRECTORY and where
to generate implicit files. The NEW behavior of this policy is to
use the current binary directory for the WORKING_DIRECTORY and where
to generate implicit files.

This policy was introduced in CMake version 3.14.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake does not warn, and uses OLD behavior.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0089

Next topic

CMP0087

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0088

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0089 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0088" href="CMP0088.html" />
    <link rel="prev" title="CMP0090" href="CMP0090.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0089

CMP0089¶

New in version 3.15.

Compiler id for IBM Clang-based XL compilers is now XLClang.

CMake 3.15 and above recognize that IBM's Clang-based XL compilers
that define __ibmxl__ are a new front-end distinct from xlc
with a different command line and set of capabilities.
CMake now prefers to present this to projects by setting the
CMAKE_<LANG>_COMPILER_ID variable to XLClang instead
of XL.  However, existing projects may assume the compiler id for
Clang-based XL is just XL as it was in CMake versions prior to 3.15.
Therefore this policy determines for Clang-based XL compilers which
compiler id to report in the CMAKE_<LANG>_COMPILER_ID
variable after language <LANG> is enabled by the project()
or enable_language() command.  The policy must be set prior
to the invocation of either command.

The OLD behavior for this policy is to use compiler id XL.  The
NEW behavior for this policy is to use compiler id XLClang.

This policy was introduced in CMake version 3.15.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake does not warn by default, and uses OLD behavior.

See documentation of the
CMAKE_POLICY_WARNING_CMP0089
variable to control the warning.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0090

Next topic

CMP0088

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0089

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0090 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0089" href="CMP0089.html" />
    <link rel="prev" title="CMP0091" href="CMP0091.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0090

CMP0090¶

New in version 3.15.

export(PACKAGE) does not populate package registry by default.

In CMake 3.14 and below the export(PACKAGE) command populated the
user package registry by default and users needed to set the
CMAKE_EXPORT_NO_PACKAGE_REGISTRY to disable it, e.g. in automated
build and packaging environments.  Since the user package registry is stored
outside the build tree, this side effect should not be enabled by default.
Therefore CMake 3.15 and above prefer that export(PACKAGE) does
nothing unless an explicit CMAKE_EXPORT_PACKAGE_REGISTRY variable
is set to enable it.  This policy provides compatibility with projects that
have not been updated.

The OLD behavior for this policy is for export(PACKAGE) command
to populate the user package registry unless
CMAKE_EXPORT_NO_PACKAGE_REGISTRY is enabled.
The NEW behavior is for export(PACKAGE) command to do nothing
unless the CMAKE_EXPORT_PACKAGE_REGISTRY is enabled.

This policy was introduced in CMake version 3.15.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake does not warn, and uses OLD behavior.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0091

Next topic

CMP0089

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0090

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0091 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0090" href="CMP0090.html" />
    <link rel="prev" title="CMP0092" href="CMP0092.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0091

CMP0091¶

New in version 3.15.

MSVC runtime library flags are selected by an abstraction.

Compilers targeting the MSVC ABI have flags to select the MSVC runtime library.
Runtime library selection typically varies with build configuration because
there is a separate runtime library for Debug builds.

In CMake 3.14 and below, MSVC runtime library selection flags are added to
the default CMAKE_<LANG>_FLAGS_<CONFIG> cache entries by CMake
automatically.  This allows users to edit their cache entries to adjust the
flags.  However, the presence of such default flags is problematic for
projects that want to choose a different runtime library programmatically.
In particular, it requires string editing of the
CMAKE_<LANG>_FLAGS_<CONFIG> variables with knowledge of the
CMake builtin defaults so they can be replaced.

CMake 3.15 and above prefer to leave the MSVC runtime library selection flags
out of the default CMAKE_<LANG>_FLAGS_<CONFIG> values and instead
offer a first-class abstraction.  The CMAKE_MSVC_RUNTIME_LIBRARY
variable and MSVC_RUNTIME_LIBRARY target property may be set to
select the MSVC runtime library.  If they are not set then CMake uses the
default value MultiThreaded$<$<CONFIG:Debug>:Debug>DLL which is
equivalent to the original flags.

This policy provides compatibility with projects that have not been updated
to be aware of the abstraction.  The policy setting takes effect as of the
first project() or enable_language() command that enables
a language whose compiler targets the MSVC ABI.

Note

Once the policy has taken effect at the top of a project, that choice
must be used throughout the tree.  In projects that have nested projects
in subdirectories, be sure to convert everything together.

The OLD behavior for this policy is to place MSVC runtime library
flags in the default CMAKE_<LANG>_FLAGS_<CONFIG> cache
entries and ignore the CMAKE_MSVC_RUNTIME_LIBRARY abstraction.
The NEW behavior for this policy is to not place MSVC runtime
library flags in the default cache entries and use the abstraction instead.

This policy was introduced in CMake version 3.15.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake does not warn, and uses OLD behavior.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0092

Next topic

CMP0090

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0091

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0092 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0091" href="CMP0091.html" />
    <link rel="prev" title="CMP0093" href="CMP0093.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0092

CMP0092¶

New in version 3.15.

MSVC warning flags are not in CMAKE_<LANG>_FLAGS by default.

When using MSVC-like compilers in CMake 3.14 and below, warning flags
like /W3 are added to CMAKE_<LANG>_FLAGS by default.
This is problematic for projects that want to choose a different warning
level programmatically.  In particular, it requires string editing of the
CMAKE_<LANG>_FLAGS variables with knowledge of the
CMake builtin defaults so they can be replaced.

CMake 3.15 and above prefer to leave out warning flags from the value of
CMAKE_<LANG>_FLAGS by default.

This policy provides compatibility with projects that have not been updated
to expect the lack of warning flags.  The policy setting takes effect as of
the first project() or enable_language() command that
initializes CMAKE_<LANG>_FLAGS for a given language <LANG>.

Note

Once the policy has taken effect at the top of a project for a given
language, that choice must be used throughout the tree for that language.
In projects that have nested projects in subdirectories, be sure to
convert everything together.

The OLD behavior for this policy is to place MSVC warning flags in the
default CMAKE_<LANG>_FLAGS cache entries.  The NEW behavior
for this policy is to not place MSVC warning flags in the default cache
entries.

This policy was introduced in CMake version 3.15.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake does not warn, and uses OLD behavior.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0093

Next topic

CMP0091

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0092

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0093 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0092" href="CMP0092.html" />
    <link rel="prev" title="CMP0094" href="CMP0094.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0093

CMP0093¶

New in version 3.15.

FindBoost reports Boost_VERSION in x.y.z format.

In CMake 3.14 and below the module would report the Boost version
number as specified in the preprocessor definition BOOST_VERSION in
the boost/version.hpp file. In CMake 3.15 and later it is preferred
that the reported version number matches the x.y.z format reported
by the CMake package shipped with Boost 1.70.0 and later. The macro
value is still reported in the Boost_VERSION_MACRO variable.

The OLD behavior for this policy is for FindBoost to report
Boost_VERSION as specified in the preprocessor definition
BOOST_VERSION in boost/version.hpp. The NEW behavior for this
policy is for FindBoost to report Boost_VERSION in
x.y.z format.

This policy was introduced in CMake version 3.15.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake does not warn, and uses OLD behavior.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0094

Next topic

CMP0092

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0093

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0094 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0093" href="CMP0093.html" />
    <link rel="prev" title="CMP0095" href="CMP0095.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0094

CMP0094¶

New in version 3.15.

Modules FindPython3, FindPython2 and FindPython
use LOCATION for lookup strategy.

Starting with CMake 3.15, Modules FindPython3, FindPython2
and FindPython set value LOCATION for, respectively, variables
Python3_FIND_STRATEGY, Python2_FIND_STRATEGY and
Python_FIND_STRATEGY. This policy provides compatibility with projects that
expect the legacy behavior.

The OLD behavior for this policy set value VERSION for variables
Python3_FIND_STRATEGY, Python2_FIND_STRATEGY and
Python_FIND_STRATEGY.

This policy was introduced in CMake version 3.15.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake does not warn, and uses OLD behavior.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0095

Next topic

CMP0093

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0094

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0095 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0094" href="CMP0094.html" />
    <link rel="prev" title="CMP0096" href="CMP0096.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0095

CMP0095¶

New in version 3.16.

RPATH entries are properly escaped in the intermediary CMake install script.

In CMake 3.15 and earlier, RPATH entries set via
CMAKE_INSTALL_RPATH or via INSTALL_RPATH have not been
escaped before being inserted into the cmake_install.cmake script. Dynamic
linkers on ELF-based systems (e.g. Linux and FreeBSD) allow certain keywords in
RPATH entries, such as ${ORIGIN} (More details are available in the
ld.so man pages on those systems). The syntax of these keywords can match
CMake's variable syntax. In order to not be substituted (usually to an empty
string) already by the intermediary cmake_install.cmake script, the user had
to double-escape such RPATH keywords, e.g.
set(CMAKE_INSTALL_RPATH "\\\${ORIGIN}/../lib"). Since the intermediary
cmake_install.cmake script is an implementation detail of CMake, CMake 3.16
and later will make sure RPATH entries are inserted literally by escaping
any coincidental CMake syntax.

The OLD behavior of this policy is to not escape RPATH entries in the
intermediary cmake_install.cmake script. The NEW behavior is to properly
escape coincidental CMake syntax in RPATH entries when generating the
intermediary cmake_install.cmake script.

This policy was introduced in CMake version 3.16.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake warns when it detects use of CMake-like syntax, and uses OLD behavior.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0096

Next topic

CMP0094

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0095

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0096 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0095" href="CMP0095.html" />
    <link rel="prev" title="CMP0097" href="CMP0097.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0096

CMP0096¶

New in version 3.16.

The project() command preserves leading zeros in version components.

When a VERSION <major>[.<minor>[.<patch>[.<tweak>]]]] argument is given
to the project() command, it stores the version string in the
PROJECT_VERSION variable and stores individual integer version components
in PROJECT_VERSION_{MAJOR,MINOR,PATCH,TWEAK} variables (see policy
CMP0048).  CMake 3.15 and below dropped leading zeros from each
component.  CMake 3.16 and higher prefer to preserve leading zeros.  This
policy provides compatibility for projects that have not been updated to
expect the new behavior.

The OLD behavior of this policy drops leading zeros in all components,
e.g.  such that version 1.07.06 becomes 1.7.6.  The NEW behavior
of this policy preserves the leading zeros in all components, such that
version 1.07.06 remains unchanged.

This policy was introduced in CMake version 3.16.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake does not warn, and uses OLD behavior.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0097

Next topic

CMP0095

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0096

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0097 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0096" href="CMP0096.html" />
    <link rel="prev" title="CMP0098" href="CMP0098.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0097

CMP0097¶

New in version 3.16.

ExternalProject_Add() with GIT_SUBMODULES "" initializes no
submodules.  The policy also applies to FetchContent_Declare(),
which uses the same download and update features as
ExternalProject_Add().

The commands provide a GIT_SUBMODULES option which controls what submodules
to initialize and update. Starting with CMake 3.16, explicitly setting
GIT_SUBMODULES to an empty string means no submodules will be initialized
or updated.

This policy provides compatibility for projects that have not been updated
to expect the new behavior.

The OLD behavior for this policy is for GIT_SUBMODULES when set to
an empty string to initialize and update all git submodules.
The NEW behavior for this policy is for GIT_SUBMODULES when set to
an empty string to initialize and update no git submodules.

This policy was introduced in CMake version 3.16.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake does not warn, and uses OLD behavior.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0098

Next topic

CMP0096

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0097

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0098 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0097" href="CMP0097.html" />
    <link rel="prev" title="CMP0099" href="CMP0099.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0098

CMP0098¶

New in version 3.17.

FindFLEX runs flex in directory
CMAKE_CURRENT_BINARY_DIR when executing.

The module provides a FLEX_TARGET macro which generates FLEX output.
In CMake 3.16 and below the macro would generate a custom command that runs
flex in the current source directory.  CMake 3.17 and later prefer to
run it in the build directory and use CMAKE_CURRENT_BINARY_DIR
as the WORKING_DIRECTORY of its add_custom_command() invocation.
This ensures that any implicitly generated file is written relative to the
build tree rather than the source tree, unless the generated file is
provided as absolute path.

This policy provides compatibility for projects that have not been updated
to expect the new behavior.

The OLD behavior for this policy is for FLEX_TARGET to use
the current source directory for the WORKING_DIRECTORY and where
to generate implicit files. The NEW behavior of this policy is to
use the current binary directory for the WORKING_DIRECTORY relative to
which implicit files are generated unless provided as absolute path.

This policy was introduced in CMake version 3.17.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake does not warn, and uses OLD behavior.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0099

Next topic

CMP0097

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0098

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0099 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0098" href="CMP0098.html" />
    <link rel="prev" title="CMP0100" href="CMP0100.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0099

CMP0099¶

New in version 3.17.

Target link properties INTERFACE_LINK_OPTIONS,
INTERFACE_LINK_DIRECTORIES and INTERFACE_LINK_DEPENDS
are now transitive over private dependencies of static libraries.

In CMake 3.16 and below the interface link properties attached to libraries
are not propagated for private dependencies of static libraries.
Only the libraries themselves are propagated to link the dependent binary.
CMake 3.17 and later prefer to propagate all interface link properties.
This policy provides compatibility for projects that have not been updated
to expect the new behavior.

The OLD behavior for this policy is to not propagate interface link
properties. The NEW behavior of this policy is to propagate interface link
properties.

This policy was introduced in CMake version 3.17.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake does not warn, and uses OLD behavior.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0100

Next topic

CMP0098

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0099

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0100 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0099" href="CMP0099.html" />
    <link rel="prev" title="CMP0101" href="CMP0101.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0100

CMP0100¶

New in version 3.17.

Let AUTOMOC and AUTOUIC process
header files that end with a .hh extension.

Since version 3.17, CMake processes header files that end with a
.hh extension in AUTOMOC and AUTOUIC.
In earlier CMake versions, these header files were ignored by
AUTOMOC and AUTOUIC.

This policy affects how header files that end with a .hh extension
get treated in AUTOMOC and AUTOUIC.

The OLD behavior for this policy is to ignore .hh header files
in AUTOMOC and AUTOUIC.

The NEW behavior for this policy is to process .hh header files
in AUTOMOC and AUTOUIC just like other header files.

Note

To silence the CMP0100 warning source files can be excluded from
AUTOMOC and AUTOUIC processing by setting the
source file properties SKIP_AUTOMOC, SKIP_AUTOUIC or
SKIP_AUTOGEN.

# Source skip example:
set_property(SOURCE /path/to/file1.hh PROPERTY SKIP_AUTOMOC ON)
set_property(SOURCE /path/to/file2.hh PROPERTY SKIP_AUTOUIC ON)
set_property(SOURCE /path/to/file3.hh PROPERTY SKIP_AUTOGEN ON)

This policy was introduced in CMake version 3.17.0.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake warns, and uses OLD behavior.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0101

Next topic

CMP0099

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0100

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0101 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0100" href="CMP0100.html" />
    <link rel="prev" title="CMP0102" href="CMP0102.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0101

CMP0101¶

New in version 3.17.

target_compile_options() now always honors the BEFORE keyword.

In CMake 3.16 and below, the target_compile_options() command
ignores the BEFORE keyword when inserting items into the
COMPILE_OPTIONS target property (PRIVATE and PUBLIC
items).  CMake 3.17 and later honors the BEFORE keyword in all cases.
This policy provides compatibility for projects that have not been updated
to expect the new behavior.

The behavior of inserting items into the INTERFACE_COMPILE_OPTIONS
target property (PUBLIC and INTERFACE items) is not affected by this
policy.  The BEFORE keyword has always been honored when adding items to
INTERFACE_COMPILE_OPTIONS.

The OLD behavior for this policy is to not honor the BEFORE keyword
when inserting into the COMPILE_OPTIONS property.
The NEW behavior for this policy is to honor the BEFORE keyword in
all cases.

This policy was introduced in CMake version 3.17.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake does not warn, and uses OLD behavior.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0102

Next topic

CMP0100

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0101

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0102 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0101" href="CMP0101.html" />
    <link rel="prev" title="CMP0103" href="CMP0103.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0102

CMP0102¶

New in version 3.17.

The mark_as_advanced() command no longer creates a cache entry if one
does not already exist.

In CMake 3.16 and below, if a variable was not defined at all or just defined
locally, the mark_as_advanced() command would create a new cache
entry with an UNINITIALIZED type and no value. When a find_path()
(or other similar find_ command) would next run, it would find this
undefined cache entry and set it up with an empty string value. This process
would end up deleting the local variable in the process (due to the way the
cache works), effectively clearing any stored find_ results that were only
available in the local scope.

The OLD behavior for this policy is to create the empty cache definition.
The NEW behavior of this policy is to ignore variables which do not
already exist in the cache.

This policy was introduced in CMake version 3.17.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake does not warn by default, and uses OLD behavior.

See documentation of the CMAKE_POLICY_WARNING_CMP0102 variable to control the warning.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0103

Next topic

CMP0101

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0102

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0103 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0102" href="CMP0102.html" />
    <link rel="prev" title="CMP0104" href="CMP0104.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0103

CMP0103¶

New in version 3.18.

Multiple calls to export() command with same FILE without
APPEND is no longer allowed.

In CMake 3.17 and below, multiple calls to export() command with the
same FILE without APPEND are accepted silently but only the last
occurrence is taken into account during the generation.

The OLD behavior for this policy is to ignore the multiple occurrences of

export() command except the last one.

The NEW behavior of this policy is to raise an error on second call to
export() command with same FILE without APPEND.

This policy was introduced in CMake version 3.18.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake warns, and uses OLD behavior.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0104

Next topic

CMP0102

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0103

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0104 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0103" href="CMP0103.html" />
    <link rel="prev" title="CMP0105" href="CMP0105.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0104

CMP0104¶

New in version 3.18.

Initialize CMAKE_CUDA_ARCHITECTURES when
CMAKE_CUDA_COMPILER_ID is NVIDIA.
Raise an error if CUDA_ARCHITECTURES is empty.

CMAKE_CUDA_ARCHITECTURES introduced in CMake 3.18 is used to
initialize CUDA_ARCHITECTURES, which passes correct code generation
flags to the CUDA compiler.

Previous to this users had to manually specify the code generation flags. This
policy is for backwards compatibility with manually specifying code generation
flags.

The OLD behavior for this policy is to not initialize
CMAKE_CUDA_ARCHITECTURES when
CMAKE_CUDA_COMPILER_ID is NVIDIA.
Empty CUDA_ARCHITECTURES is allowed.

The NEW behavior of this policy is to initialize
CMAKE_CUDA_ARCHITECTURES when
CMAKE_CUDA_COMPILER_ID is NVIDIA
and raise an error if CUDA_ARCHITECTURES is empty during generation.

If CUDA_ARCHITECTURES is set to a false value no architectures
flags are passed to the compiler. This is intended to support packagers and
the rare cases where full control over the passed flags is required.

This policy was introduced in CMake version 3.18.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake warns, and uses OLD behavior.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Examples¶

set_target_properties(tgt PROPERTIES CUDA_ARCHITECTURES "35;50;72")

Generates code for real and virtual architectures 30, 50 and 72.

set_property(TARGET tgt PROPERTY CUDA_ARCHITECTURES 70-real 72-virtual)

Generates code for real architecture 70 and virtual architecture 72.

set_property(TARGET tgt PROPERTY CUDA_ARCHITECTURES OFF)

CMake will not pass any architecture flags to the compiler.

Table of Contents

CMP0104

Examples

Previous topic

CMP0105

Next topic

CMP0103

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0104

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0105 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0104" href="CMP0104.html" />
    <link rel="prev" title="CMP0106" href="CMP0106.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0105

CMP0105¶

New in version 3.18.

LINK_OPTIONS and INTERFACE_LINK_OPTIONS target
properties are now used for the device link step.

In CMake 3.17 and below, link options are not used by the device link step.

The OLD behavior for this policy is to ignore the link options during the
device link step.

The NEW behavior of this policy is to use the link options during the
device link step.

This policy was introduced in CMake version 3.18.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake does not warn, and uses OLD behavior.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0106

Next topic

CMP0104

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0105

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0106 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0105" href="CMP0105.html" />
    <link rel="prev" title="CMP0107" href="CMP0107.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0106

CMP0106¶

New in version 3.18.

The Documentation module is removed.

The Documentation was added as a support mechanism for the VTK
project and was tuned for that project. Instead of CMake providing this module
with (now old) VTK patterns for cache variables and required packages, the
module is now deprecated by CMake itself.

The OLD behavior of this policy is for Documentation to add
cache variables and find VTK documentation dependent packages. The NEW
behavior is to act as an empty module.

This policy was introduced in CMake version 3.18.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake warns, and uses OLD behavior.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0107

Next topic

CMP0105

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0106

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0107 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0106" href="CMP0106.html" />
    <link rel="prev" title="CMP0108" href="CMP0108.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0107

CMP0107¶

New in version 3.18.

It is not allowed to create an ALIAS target with the same name as an
another target.

In CMake 3.17 and below, an ALIAS target can overwrite silently an existing
target with the same name.

The OLD behavior for this policy is to allow target overwrite.

The NEW behavior of this policy is to prevent target overwriting.

This policy was introduced in CMake version 3.17.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake does not warn, and uses OLD behavior.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0108

Next topic

CMP0106

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0107

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0108 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0107" href="CMP0107.html" />
    <link rel="prev" title="CMP0109" href="CMP0109.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0108

CMP0108¶

New in version 3.18.

A target is not allowed to link to itself even through an ALIAS target.

In CMake 3.17 and below, a target can link to a target aliased to itself.

The OLD behavior for this policy is to allow a target to link to a target
aliased to itself.

The NEW behavior of this policy is to prevent a target to link to itself
through an ALIAS target.

This policy was introduced in CMake version 3.17.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake does not warn, and uses OLD behavior.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0109

Next topic

CMP0107

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0108

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0109 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0108" href="CMP0108.html" />
    <link rel="prev" title="CMP0110" href="CMP0110.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0109

CMP0109¶

New in version 3.19.

find_program() requires permission to execute but not to read.

In CMake 3.18 and below, the find_program() command on UNIX
would find files that are readable without requiring execute permission,
and would not find files that are executable without read permission.
In CMake 3.19 and above, find_program now prefers to require execute
permission but not read permission.  This policy provides compatibility
with projects that have not been updated to expect the new behavior.

The OLD behavior for this policy is for find_program to require
read permission but not execute permission.
The NEW behavior for this policy is for find_program to require
execute permission but not read permission.

This policy was introduced in CMake version 3.19.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake warns, and uses OLD behavior.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0110

Next topic

CMP0108

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0109

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0110 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0109" href="CMP0109.html" />
    <link rel="prev" title="CMP0111" href="CMP0111.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0110

CMP0110¶

New in version 3.19.

add_test() supports arbitrary characters in test names.

add_test() can now (officially) create tests with whitespace and
other special characters in its name.  Before CMake version 3.19 that was not
allowed, however, it was possible to work around this limitation by explicitly
putting escaped quotes around the test's name in the add_test command.

Although never officially supported several projects in the wild found and
implemented this workaround.  However, the new change which officially allows
the add_test command to support whitespace and other special characters in
test names now breaks that workaround.  In order for these projects to work
smoothly with newer CMake versions, this policy was introduced.

The OLD behavior of this policy is to still prevent add_test from
handling whitespace and special characters properly (if not using the
mentioned workaround).  The NEW behavior on the other hand allows names
with whitespace and special characters for tests created by add_test.

This policy was introduced in CMake version 3.19.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake warns, and uses OLD behavior.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0111

Next topic

CMP0109

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0110

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0111 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0110" href="CMP0110.html" />
    <link rel="prev" title="CMP0112" href="CMP0112.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0111

CMP0111¶

New in version 3.19.

An imported target missing its location property fails during generation.

Imported Targets for library files and executables require that
their location on disk is specified in a target property such as
IMPORTED_LOCATION, IMPORTED_IMPLIB, or a
per-configuration equivalent.  If a needed location property is not set,
CMake 3.18 and below generate the string <TARGET_NAME>-NOTFOUND in
its place, which results in failures of the corresponding rules at build
time.  CMake 3.19 and above prefer instead to raise an error during
generation.  This policy provides compatibility for projects that have
not been updated to expect the new behavior.

The OLD behavior of this policy is to generate the location of an imported
unknown, static or shared library target as <TARGET_NAME>-NOTFOUND if not
set.
The NEW behavior is to raise an error.

This policy was introduced in CMake version 3.19.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake warns, and uses OLD behavior.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0112

Next topic

CMP0110

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0111

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMP0112 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMP0111" href="CMP0111.html" />
    <link rel="prev" title="CMP0113" href="CMP0113.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0112

CMP0112¶

New in version 3.19.

Target file component generator expressions do not add target dependencies.

The following target-based generator expressions that query for directory or
file name components no longer add a dependency on the evaluated target.

TARGET_FILE_NAME

TARGET_FILE_DIR

TARGET_LINKER_FILE_BASE_NAME

TARGET_LINKER_FILE_NAME

TARGET_LINKER_FILE_DIR

TARGET_SONAME_FILE_NAME

TARGET_SONAME_FILE_DIR

TARGET_PDB_FILE_NAME

TARGET_PDB_FILE_DIR

TARGET_BUNDLE_DIR

TARGET_BUNDLE_DIR_NAME

TARGET_BUNDLE_CONTENT_DIR

In CMake 3.18 and lower a dependency on the evaluated target of the above
generator expressions would always be added.  CMake 3.19 and above prefer
to not add this dependency.  This policy provides compatibility for projects
that have not been updated to expect the new behavior.  The policy setting
is recorded on each target when it is created, and decides whether generator
expressions referencing that target imply a dependency on it.

The OLD behavior for this policy is to add a dependency on the evaluated
target for the above generator expressions.  The NEW behavior of
this policy is to not add a dependency on the evaluated target for the
above generator expressions.

This policy was introduced in CMake version 3.19.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake does not warn by default, and uses OLD behavior.

See documentation of the
CMAKE_POLICY_WARNING_CMP0112
variable to control the warning.

Note

The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.

Previous topic

CMP0113

Next topic

CMP0111

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0112

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.