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>CMP0113 — 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="CMP0112" href="CMP0112.html" />
    <link rel="prev" title="CMP0114" href="CMP0114.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0113

CMP0113¶

New in version 3.19.

Makefile Generators do not repeat custom commands from target
dependencies.

Consider a chain of custom commands split across two dependent targets:

add_custom_command(OUTPUT output-not-created
  COMMAND ... DEPENDS ...)
set_property(SOURCE output-not-created PROPERTY SYMBOLIC 1)
add_custom_command(OUTPUT output-created
  COMMAND ... DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/output-not-created)
add_custom_target(first DEPENDS output-not-created)
add_custom_target(second DEPENDS output-created)
add_dependencies(second first)

In CMake 3.18 and lower, the Makefile generators put a copy of both custom
commands in the Makefile for target second even though its dependency on
target first ensures that the first custom command runs before the second.
Running make second would cause the first custom command to run once in
the first target and then again in the second target.

CMake 3.19 and above prefer to not duplicate custom commands in a target that
are already generated in other targets on which the target depends (directly or
indirectly).  This policy provides compatibility for projects that have not
been updated to expect the new behavior.  In particular, projects that relied
on the duplicate execution or that did not properly set the SYMBOLIC
source file property may be affected.

The OLD behavior for this policy is to duplicate custom commands in
dependent targets.  The NEW behavior of this policy is to not duplicate
custom commands in dependent targets.

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, 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

CMP0114

Next topic

CMP0112

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) »

CMP0113

        © 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>CMP0114 — 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="CMP0113" href="CMP0113.html" />
    <link rel="prev" title="CMP0115" href="CMP0115.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0114

CMP0114¶

New in version 3.19.

ExternalProject step targets fully adopt their steps.

The ExternalProject_Add() STEP_TARGETS option, and the
ExternalProject_Add_StepTargets() function, can be used to
create build targets for individual steps of an external project.

In CMake 3.18 and below, step targets have some limitations:

Step targets always depend on targets named by the
ExternalProject_Add() DEPENDS option even though
not all steps need them.  In order to allow step targets to be created
without those dependencies, the ExternalProject_Add()
INDEPENDENT_STEP_TARGETS option or the
ExternalProject_Add_StepTargets() NO_DEPENDS option may
be used.  However, adding such "independent" step targets makes sense
only for specific steps such as download, update, and patch
because they do not need any of the external project's build dependencies.
Furthermore, it does not make sense to create independent step targets
for steps that depend on non-independent steps.  Such rules are not
enforced, and projects that do not follow them can generate build systems
with confusing and generator-specific behavior.

Step targets hold copies of the custom commands implementing their
steps that are separate from the copies in the primary target created
by ExternalProject_Add(), and the primary target does not
depend on the step targets.  In parallel builds that drive the primary
target and step targets concurrently, multiple copies of the steps'
commands may run concurrently and race each other.

Also, prior to policy CMP0113, the step targets generated
by Makefile Generators also contain all the custom commands
on which their step depends.  This can lead to repeated execution of
those steps even in serial builds.

In CMake 3.19 and above, the ExternalProject module prefers
a revised design to address these problems:

Each step is classified as "independent" if it does not depend
on other targets named by the ExternalProject_Add() DEPENDS.
The predefined steps are automatically classified by default:

The download, update, and patch steps are independent.

The configure, build, test, and install steps are not.

For custom steps, the ExternalProject_Add_Step() command provides
an INDEPENDENT option to mark them as independent.  It is an error to
mark a step as independent if it depends on other steps that are not.  Note
that this use of the term "independent" refers only to independence from
external targets and is orthogonal to a step's dependencies on other steps.

Step targets created by the ExternalProject_Add() STEP_TARGETS
option or the ExternalProject_Add_Step() function are now
independent if and only if their steps are marked as independent.
The ExternalProject_Add() INDEPENDENT_STEP_TARGETS option
and ExternalProject_Add_StepTargets() NO_DEPENDS option
are no longer allowed.

Step targets, when created, are fully responsible for holding the
custom commands implementing their steps.  The primary target created
by ExternalProject_Add() depends on the step targets, and the
step targets depend on each other.  The target-level dependencies match
the file-level dependencies used by the custom commands for each step.

When the ExternalProject_Add() UPDATE_DISCONNECTED or
TEST_EXCLUDE_FROM_MAIN option is used, or the
ExternalProject_Add_Step() EXCLUDE_FROM_MAIN option is used
for a custom step, some step targets may be created automatically.
These are needed to hold the steps commonly depended upon by the primary
target and the disconnected step targets.

Policy CMP0114 provides compatibility for projects that have not been
updated to expect the new behavior.  The OLD behavior for this policy
is to use the above-documented behavior from 3.18 and below.  The NEW
behavior for this policy is to use the above-documented behavior preferred
by 3.19 and above.

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

CMP0115

Next topic

CMP0113

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) »

CMP0114

        © 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>CMP0115 — 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="CMP0114" href="CMP0114.html" />
    <link rel="prev" title="CMP0116" href="CMP0116.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0115

CMP0115¶

New in version 3.20.

Source file extensions must be explicit.

In CMake 3.19 and below, if a source file could not be found by the name
specified, it would append a list of known extensions to the name to see if
the file with the extension could be found. For example, this would allow the
user to run:

add_executable(exe main)

and put main.c in the executable without specifying the extension.

Starting in CMake 3.20, CMake prefers all source files to have their extensions
explicitly listed:

add_executable(exe main.c)

The OLD behavior for this policy is to implicitly append known extensions
to source files if they can't be found. The NEW behavior of this policy is
to not append known extensions and require them to be explicit.

This policy was introduced in CMake version 3.20.
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

CMP0116

Next topic

CMP0114

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) »

CMP0115

        © 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>CMP0116 — 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="CMP0115" href="CMP0115.html" />
    <link rel="prev" title="CMP0117" href="CMP0117.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0116

CMP0116¶

New in version 3.20.

Ninja generators transform DEPFILE s from add_custom_command().

In CMake 3.19 and below, files given to the DEPFILE argument of
add_custom_command() were passed directly to Ninja's depfile
variable without any path resolution. This meant that if
add_custom_command() was called from a subdirectory (created by
add_subdirectory()), the DEPFILE argument would have to be either
an absolute path or a path relative to CMAKE_BINARY_DIR, rather
than CMAKE_CURRENT_BINARY_DIR. In addition, no transformation was
done on the file listed in DEPFILE, which meant that the paths within the
DEPFILE had the same restrictions.

Starting with CMake 3.20, the DEPFILE argument is relative to
CMAKE_CURRENT_BINARY_DIR (unless it is absolute), and the paths in
the DEPFILE are also relative to CMAKE_CURRENT_BINARY_DIR.
CMake automatically transforms the paths in the DEPFILE (unless they are
absolute) after the custom command is run. The file listed in DEPFILE is
not modified in any way. Instead, CMake writes the transformation to its own
internal file, and passes this internal file to Ninja's depfile variable.
This transformation happens regardless of whether or not DEPFILE is
relative, and regardless of whether or not add_custom_command() is
called from a subdirectory.

The OLD behavior for this policy is to pass the DEPFILE to Ninja
unaltered. The NEW behavior for this policy is to transform the DEPFILE
after running the custom command. The status of CMP0116 is recorded at the
time of the custom command's creation, and you can have custom commands in the
same directory with different values for CMP0116 by setting the policy
before each custom command.

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

See documentation of the
CMAKE_POLICY_WARNING_CMP0116
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

CMP0117

Next topic

CMP0115

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) »

CMP0116

        © 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>CMP0117 — 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="CMP0116" href="CMP0116.html" />
    <link rel="prev" title="CMP0118" href="CMP0118.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0117

CMP0117¶

New in version 3.20.

MSVC RTTI flag /GR is not added to
CMAKE_CXX_FLAGS by default.

When using MSVC-like compilers in CMake 3.19 and below, the RTTI flag
/GR is added to CMAKE_CXX_FLAGS by
default.  This behavior is left from support for MSVC versions from Visual
Studio 2003 and below that did not enable RTTI by default.  It is no longer
necessary.  Furthermore, it is problematic for projects that want to change
to /GR- programmatically.  In particular, it requires string editing of
the CMAKE_CXX_FLAGS variable with knowledge
of the CMake builtin default so it can be replaced.

CMake 3.20 and above prefer to leave out /GR from the value of
CMAKE_CXX_FLAGS by default.

This policy provides compatibility with projects that have not been updated
to expect the lack of the /GR flag.  The policy setting takes effect as
of the first project() or enable_language() command that
initializes CMAKE_CXX_FLAGS.

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 the MSVC /GR flag in the
default CMAKE_CXX_FLAGS cache entry.  The
NEW behavior for this policy is to not place the MSVC /GR flag in
the default cache entry.

This policy was introduced in CMake version 3.20.
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

CMP0118

Next topic

CMP0116

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) »

CMP0117

        © 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>CMP0118 — 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="CMP0117" href="CMP0117.html" />
    <link rel="prev" title="CMP0119" href="CMP0119.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0118

CMP0118¶

New in version 3.20.

The GENERATED source file property is now visible in all directories.

Whether or not a source file is generated is an all-or-nothing global
property of the source.  Consequently, the associated GENERATED
property is now visible from any directory scope, not only from the scope
for which it was set.

Additionally, the GENERATED property may now be set only to boolean
values, and may not be turned off once turned on.

The OLD behavior of this policy is to only allow GENERATED to be
visible from the directory scope for which it was set.  The NEW
behavior on the other hand allows it to be visible from any scope.

This policy was introduced in CMake version 3.20.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake does not warn with regard to visibility of the GENERATED
property, but does warn about setting the GENERATED property
to a non-boolean value,, 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

CMP0119

Next topic

CMP0117

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) »

CMP0118

        © 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>CMP0119 — 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="CMP0118" href="CMP0118.html" />
    <link rel="prev" title="CMP0120" href="CMP0120.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0119

CMP0119¶

New in version 3.20.

LANGUAGE source file property explicitly compiles as specified
language.

The LANGUAGE source file property is documented to mean that the
source file is written in the specified language.  In CMake 3.19 and below,
setting this property causes CMake to compile the source file using the
compiler for the specified language.  However, it only passes an explicit
flag to tell the compiler to treat the source as the specified language
for MSVC-like, XL, and Embarcadero compilers for the CXX language.
CMake 3.20 and above prefer to also explicitly tell the compiler to use
the specified language using a flag such as -x c on all compilers
for which such flags are known.

This policy provides compatibility for projects that have not been updated
to expect this behavior.  For example, some projects were setting the
LANGUAGE property to C on assembly-language .S source files
in order to compile them using the C compiler.  Such projects should be
updated to use enable_language(ASM), for which CMake will often choose
the C compiler as the assembler on relevant platforms anyway.

The OLD behavior for this policy is to interpret the LANGUAGE <LANG>
property using its undocumented meaning to "use the <LANG> compiler".
The NEW behavior for this policy is to interpret the LANGUAGE <LANG>
property using its documented meaning to "compile as a <LANG> source".

This policy was introduced in CMake version 3.20.
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

CMP0120

Next topic

CMP0118

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) »

CMP0119

        © 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>CMP0120 — 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="CMP0119" href="CMP0119.html" />
    <link rel="prev" title="CMP0121" href="CMP0121.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0120

CMP0120¶

New in version 3.20.

The WriteCompilerDetectionHeader module is removed.

CMake versions 3.1 through 3.19 provide this module to generate a
C++ compatibility layer by re-using information from CMake's table of
preprocessor checks for cmake-compile-features(7).  However:

Those granular features have been superseded by meta-features for
Requiring Language Standards such as cxx_std_11.  Therefore
no new granular feature checks will be added and projects will need to
use other means to conditionally use new C++ features.

The module exposes some of CMake's implementation details directly
to C++ translation units.

The module's approach effectively provides a header file with CMake,
thus tying the version of the header to the version of CMake.
Many projects found that the WriteCompilerDetectionHeader was
best used by manually generating its header locally with a recent version
of CMake and then bundling it with the project source so that it could
be used with older CMake versions.

For reasons including the above, CMake 3.20 and above prefer to not
provide the WriteCompilerDetectionHeader module.  This policy
provides compatibility for projects that have not been ported away from
it.  Projects using the module should be updated to stop using it.
Alternatives include:

Bundle a copy of the generated header in the project's source.

Use a third-party alternative, such as the CC0-licensed Hedley.

Drop support for compilers too old to provide the features natively.

The OLD behavior of this policy is for inclusion of the deprecated
WriteCompilerDetectionHeader module to work.  The NEW
behavior is for inclusion of the module to fail as if it does not exist.

This policy was introduced in CMake version 3.20.
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

CMP0121

Next topic

CMP0119

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) »

CMP0120

        © 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>CMP0121 — 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="CMP0120" href="CMP0120.html" />
    <link rel="prev" title="CMP0122" href="CMP0122.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0121

CMP0121¶

New in version 3.21.

The list() command now detects invalid indices.

Prior to CMake version 3.21, the list() command's GET,
INSERT, SUBLIST, and REMOVE_AT subcommands did not detect invalid
index arguments.

The OLD behavior of this policy is for invalid indices to be treated as
their integer value (if any) at the start of the string. For example,
2good4you is a 2 and not_an_integer is a 0. The NEW
behavior is for invalid indices to trigger an error.

This policy was introduced in CMake version 3.21.
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

CMP0122

Next topic

CMP0120

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) »

CMP0121

        © 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>CMP0122 — 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="CMP0121" href="CMP0121.html" />
    <link rel="prev" title="CMP0123" href="CMP0123.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0122

CMP0122¶

New in version 3.21.

UseSWIG use library name conventions for CSharp language.

Starting with CMake 3.21, UseSWIG generates now a library using
default naming conventions. This policy provides compatibility with projects
that expect the legacy behavior.

This policy was introduced in CMake version 3.21.
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

CMP0123

Next topic

CMP0121

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) »

CMP0122

        © 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>CMP0123 — 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="CMP0122" href="CMP0122.html" />
    <link rel="prev" title="CMP0124" href="CMP0124.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0123

CMP0123¶

New in version 3.21.

ARMClang cpu/arch compile and link flags must be set explicitly.

CMake 3.20 and lower automatically maps the CMAKE_SYSTEM_PROCESSOR
variable and an undocumented CMAKE_SYSTEM_ARCH to compile and link options
for ARMClang.  For example, the -mcpu=cortex-m33 flag is added when
CMAKE_SYSTEM_PROCESSOR equals cortex-m33.  CMake requires
projects to set either variable or it raises a fatal error.  However, the
project may need to additionally specify CPU features using e.g.
-mcpu=cortex-m33+nodsp, conflicting with the -mcpu=cortex-m33 added
by CMake.  This results in either link errors or unusable binaries.

CMake 3.21 and above prefer instead to not add any cpu/arch compile and link
flags automatically.  Instead, projects must specify them explicitly.
This policy provides compatibility for projects that have not been updated.

The OLD behavior of this policy requires projects that use ARMClang
to set either CMAKE_SYSTEM_PROCESSOR or CMAKE_SYSTEM_ARCH
and it automatically adds a compile option -mcpu= or -march= and
a link option --cpu= based on those variables.  The NEW behavior
does not add compile or link options, and projects are responsible for
setting correct options.

This policy was introduced in CMake version 3.21.
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

CMP0124

Next topic

CMP0122

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) »

CMP0123

        © 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>CMP0124 — 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="CMP0123" href="CMP0123.html" />
    <link rel="prev" title="CMP0125" href="CMP0125.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0124

CMP0124¶

New in version 3.21.

foreach() loop variables are only available in the loop scope.

CMake 3.20 and below always leave the loop variable set at the end of the
loop, either to the value it had before the loop, if any, or to the empty
string.  CMake 3.21 and above prefer to leave the loop variable in the
state it had before the loop started, either set or unset.  This policy
provides compatibility for projects that expect the loop variable to always
be left set.

The OLD behavior for this policy is to set the loop variable at the
end of the loop, either to its original value, or to an empty value.
The NEW behavior for this policy is to restore the loop variable to
the state it had before the loop started, either set or unset.

For example:

set(items a b c)

set(var1 "value")
unset(var2)

foreach(var1 IN LISTS items)
endforeach()

foreach(var2 IN LISTS items)
endforeach()

if(DEFINED var1)
  message("var1: ${var1}")
endif()
if(DEFINED var2)
  message("var2: ${var2}")
endif()

Under the OLD behavior, this code prints var1: value and var2:.
Under the NEW behavior, this code prints only var1: value.

This policy was introduced in CMake version 3.21.
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

CMP0125

Next topic

CMP0123

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) »

CMP0124

        © 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>CMP0125 — 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="CMP0124" href="CMP0124.html" />
    <link rel="prev" title="CMP0126" href="CMP0126.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0125

CMP0125¶

New in version 3.21.

The find_file(), find_path(), find_library() and
find_program() commands cache their result in the variable specified
by their first argument.  Prior to CMake 3.21, if a cache variable of that
name already existed before the call but the cache variable had no type, any
non-cache variable of the same name would be discarded and the cache variable
was always used (see also CMP0126 for a different but similar
behavior).  This contradicts the convention that a non-cache variable should
take precedence over a cache variable of the same name.  Such a situation can
arise if a user sets a cache variable on the command line without specifying
a type, such as cmake -DMYVAR=blah ... instead of
cmake -DMYVAR:FILEPATH=blah.

Related to the above, if a cache variable of the specified name already exists
and it does have a type, the various find_...() commands would return
that value unchanged.  In particular, if it contained a relative path, it
would not be converted to an absolute path in this situation.

When policy CMP0125 is set to OLD or is unset, the behavior is as
described above.  When it is set to NEW, the behavior is as follows:

If a non-cache variable of the specified name exists when the find_...()
command is called, its value will be used regardless of whether a cache
variable of the same name already exists or not.  A cache variable will not
be created in this case if no such cache variable existed before.
If a cache variable of the specified name did already exist, the cache will
be updated to match the non-cache variable.

The various find...() commands will always provide an absolute path in
the result variable, except where a relative path provided by a cache or
non-cache variable cannot be resolved to an existing path.

This policy was introduced in CMake version 3.21.
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

CMP0126

Next topic

CMP0124

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) »

CMP0125

        © 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>CMP0126 — 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="CMP0125" href="CMP0125.html" />
    <link rel="prev" title="CMP0127" href="CMP0127.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0126

CMP0126¶

New in version 3.21.

When this policy is set to NEW, the set(CACHE) command does not
remove any normal variable of the same name from the current scope.
The OLD behavior removes any normal variable of the same name from the
current scope in the following situations:

No cache variable of that name existed previously.

A cache variable of that name existed previously, but it had no type.
This can occur when the variable was set on the command line using a form
like cmake -DMYVAR=blah instead of cmake -DMYVAR:STRING=blah.

The FORCE or INTERNAL keywords were used when setting the cache
variable.

Note that the NEW behavior has an important difference to the similar
NEW behavior of policy CMP0077.  The set(CACHE)
command always sets the cache variable if it did not exist previously,
regardless of the CMP0126 policy setting.  The option() command
will not set the cache variable if a non-cache variable of the same name
already exists and CMP0077 is set to NEW.

This policy was introduced in CMake version 3.21.
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_CMP0126
variable to control the warning.

The CMAKE_POLICY_DEFAULT_CMP0126
variable may be used 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

CMP0127

Next topic

CMP0125

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) »

CMP0126

        © 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>CMP0127 — 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="CMP0126" href="CMP0126.html" />
    <link rel="prev" title="CMP0128" href="CMP0128.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0127

CMP0127¶

New in version 3.22.

cmake_dependent_option() supports full Condition Syntax.

The <depends> parameter accepts a semicolon-separated list of conditions.  CMake 3.21 and lower evaluates each
condition as if(${condition}), which does not properly handle
conditions with nested paren groups.  CMake 3.22 and above instead prefer
to evaluate each condition as if(<condition>), where <condition>
is re-parsed as if literally written in a call to if().  This
allows expressions like:

"A AND (B OR C)"

but requires expressions like:

"FOO MATCHES (UPPER|lower)"

to be re-written as:

"FOO MATCHES \"(UPPER|lower)\""

Policy CMP0127 provides compatibility for projects that have not
been updated to expect the new behavior.

This policy was introduced in CMake version 3.22.
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

CMP0128

Next topic

CMP0126

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) »

CMP0127

        © 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>CMP0128 — 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="CMP0127" href="CMP0127.html" />
    <link rel="prev" title="CMP0129" href="CMP0129.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0128

CMP0128¶

New in version 3.22.

When this policy is set to NEW:

<LANG>_EXTENSIONS is initialized to
CMAKE_<LANG>_EXTENSIONS if set, otherwise falling back to
CMAKE_<LANG>_EXTENSIONS_DEFAULT.

Extensions are correctly enabled/disabled if <LANG>_STANDARD is
unset or satisfied by the default.

Standard mode-affecting flags aren't added unless necessary to achieve the
specified mode.

The OLD behavior:

Initializes <LANG>_EXTENSIONS to
CMAKE_<LANG>_EXTENSIONS if set, otherwise falling back to ON.

Always adds a flag if <LANG>_STANDARD is set and
<LANG>_STANDARD_REQUIRED is OFF.

If <LANG>_STANDARD is unset:

Doesn't disable extensions even if <LANG>_EXTENSIONS is
OFF.

Fails to enable extensions if <LANG>_EXTENSIONS is ON
except for the IAR compiler.

Code may need to be updated for the NEW behavior in the following cases:

If a standard mode flag previously overridden by CMake's and not used during
compiler detection now takes effect due to CMake no longer adding one as the
default detected is appropriate.

Such code should be converted to either:

Use <LANG>_STANDARD and <LANG>_EXTENSIONS instead
of manually adding flags.

Or ensure the manually-specified flags are used during compiler detection.

If extensions were disabled without <LANG>_STANDARD being set
CMake previously wouldn't actually disable extensions.

Such code should be updated to not disable extensions if they are required.

If extensions were enabled/disabled when <LANG>_STANDARD was
satisfied by the compiler's default CMake previously wouldn't actually
enable/disable extensions.

Such code should be updated to set the correct extensions mode.

If compiler flags affecting the standard mode are used during compiler
detection (for example in a toolchain file
using CMAKE_<LANG>_FLAGS_INIT) then they will affect the detected
default standard and
extensions.

This policy was introduced in CMake version 3.22.
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_CMP0128
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

CMP0129

Next topic

CMP0127

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) »

CMP0128

        © 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>CMP0129 — 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="CMP0128" href="CMP0128.html" />
    <link rel="prev" title="CMP0130" href="CMP0130.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0129

CMP0129¶

New in version 3.23.

Compiler id for MCST LCC compilers is now LCC, not GNU.

CMake 3.23 and above recognize MCST LCC compiler as a different from GNU,
with its own command line and set of capabilities.
CMake now prefers to present this to projects by setting the
CMAKE_<LANG>_COMPILER_ID variable to LCC instead
of GNU. However, existing projects may assume the compiler id for
LCC is GNU as it was in CMake versions prior to 3.23.
Therefore this policy determines for MCST LCC compiler 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 GNU (and set
CMAKE_<LANG>_COMPILER_VERSION to the supported GNU compiler version.)
NEW behavior for this policy is to use compiler id LCC, and set
CMAKE_<LANG>_SIMULATE_ID to GNU, and
CMAKE_<LANG>_SIMULATE_VERSION to the supported GNU compiler version.

This policy was introduced in CMake version 3.23.
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_CMP0129
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

CMP0130

Next topic

CMP0128

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) »

CMP0129

        © 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>CMP0130 — 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="CMP0129" href="CMP0129.html" />
    <link rel="prev" title="CMP0131" href="CMP0131.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0130

CMP0130¶

New in version 3.24.

while() diagnoses condition evaluation errors.

CMake 3.23 and below accidentally tolerated errors encountered while
evaluating the condition passed to the while() command
(but not the if() command).  For example, the code

set(paren "(")
while(${paren})
endwhile()

creates an unbalanced parenthesis during condition evaluation.

CMake 3.24 and above prefer to diagnose such errors.  This policy
provides compatibility for projects that have not been updated to
fix their condition errors.

The OLD behavior for this policy is to ignore errors in
while() conditions.  The NEW behavior for this
policy is to diagnose errors in while() conditions.

This policy was introduced in CMake version 3.24.
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

CMP0131

Next topic

CMP0129

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) »

CMP0130

        © 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>CMP0131 — 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="CMP0130" href="CMP0130.html" />
    <link rel="prev" title="CMP0132" href="CMP0132.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0131

CMP0131¶

New in version 3.24.

LINK_LIBRARIES supports the $<LINK_ONLY:...>
generator expression.

CMake 3.23 and below documented the $<LINK_ONLY:...> generator
expression only for use in INTERFACE_LINK_LIBRARIES.
When used in LINK_LIBRARIES, the content guarded inside
$<LINK_ONLY:...> was always used, even when collecting non-linking
usage requirements such as INTERFACE_COMPILE_DEFINITIONS.

CMake 3.24 and above prefer to support $<LINK_ONLY:...>, when
used in LINK_LIBRARIES, by using the guarded content only
for link dependencies and not other usage requirements.  This policy
provides compatibility for projects that have not been updated to
account for this change.

The OLD behavior for this policy is to use LINK_LIBRARIES
content guarded by $<LINK_ONLY:...> even for non-linking
usage requirements.  The NEW behavior for this policy is to use
the guarded content only for link dependencies.

This policy was introduced in CMake version 3.24.
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

CMP0132

Next topic

CMP0130

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) »

CMP0131

        © 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>CMP0132 — 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="CMP0131" href="CMP0131.html" />
    <link rel="prev" title="CMP0133" href="CMP0133.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0132

CMP0132¶

New in version 3.24.

Apart from when using the Xcode generator and some Visual Studio generators,
CMake 3.23 and below will set environment variables like CC,
CXX, etc. when the corresponding language is enabled.
This only occurs on the very first time CMake is run in a build directory,
and the environment variables are only defined at configure time, not build
time. On subsequent CMake runs, these environment variables are not set,
opening up the opportunity for different behavior between the first and
subsequent CMake runs. CMake 3.24 and above prefer to not set these
environment variables when a language is enabled, even on the first run in
a build directory.

The OLD behavior for this policy sets the relevant environment variable
on the first run when a language is enabled. The NEW behavior for this
policy does not set any such environment variables.

This policy was introduced in CMake version 3.24.
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

CMP0133

Next topic

CMP0131

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) »

CMP0132

        © 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>CMP0133 — 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="CMP0132" href="CMP0132.html" />
    <link rel="prev" title="CMP0134" href="CMP0134.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0133

CMP0133¶

New in version 3.24.

The CPack module disables SLA by default in the
CPack DragNDrop Generator.

The CPack DragNDrop Generator in CMake 3.22 and below attach a
Software License Agreement (SLA) to .dmg files using the file specified
by CPACK_RESOURCE_FILE_LICENSE, if set to a non-default value.
macOS 12.0 deprecated the tools used to do this, so CMake 3.23 added
the CPACK_DMG_SLA_USE_RESOURCE_FILE_LICENSE option to
control the behavior.  CMake 3.23 enables that option by default for
compatibility with older versions. CMake 3.24 and above prefer to not
enable the CPACK_DMG_SLA_USE_RESOURCE_FILE_LICENSE option by
default. This policy provides compatibility with projects that have not
been updated to account for the lack of a SLA in their .dmg packages.

The OLD behavior for this policy is to enable
CPACK_DMG_SLA_USE_RESOURCE_FILE_LICENSE by default.
The NEW behavior for this policy is to not enable it by default.

This policy was introduced in CMake version 3.24.
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_CMP0133
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

CMP0134

Next topic

CMP0132

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) »

CMP0133

        © 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>CMP0134 — 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="CMP0133" href="CMP0133.html" />
    <link rel="prev" title="CMP0135" href="CMP0135.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0134

CMP0134¶

New in version 3.24.

The default registry view is TARGET for the find_file(),
find_path(), find_library(), and find_package()
commands and BOTH for the find_program() command.

The default registry views in CMake 3.23 and below are selected using the
following rules:

if CMAKE_SIZEOF_VOID_P has value 8:

Use view 64 for all find_* commands except find_program()
command.

Use view 64_32 for find_program() command.

if CMAKE_SIZEOF_VOID_P has value 4 or is undefined:

Use view 32 for all find_* commands except find_program()
command.

Use view 32_64 for find_program() command.

The OLD behavior for this policy is to use registry views 64 and
64_32 or 32_64 and 32 as default, depending of
CMAKE_SIZEOF_VOID_P variable value.
The NEW behavior for this policy is to use registry views TARGET and
BOTH as default.

This policy was introduced in CMake version 3.24.
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

CMP0135

Next topic

CMP0133

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) »

CMP0134

        © 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>CMP0135 — 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="CMP0134" href="CMP0134.html" />
    <link rel="prev" title="CMP0136" href="CMP0136.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0135

CMP0135¶

New in version 3.24.

When using the URL download method with the ExternalProject_Add()
command, CMake 3.23 and below sets the timestamps of the extracted contents
to the same as the timestamps in the archive. When the URL changes, the
new archive is downloaded and extracted, but the timestamps of the extracted
contents might not be newer than the previous contents. Anything that depends
on the extracted contents might not be rebuilt, even though the contents may
change.

CMake 3.24 and above prefers to set the timestamps of all extracted contents
to the time of the extraction. This ensures that anything that depends on the
extracted contents will be rebuilt whenever the URL changes.

The DOWNLOAD_EXTRACT_TIMESTAMP option to the
ExternalProject_Add() command can be used to explicitly specify how
timestamps should be handled. When DOWNLOAD_EXTRACT_TIMESTAMP is not
given, this policy controls the default behavior. The OLD behavior for
this policy is to restore the timestamps from the archive. The NEW
behavior sets the timestamps of extracted contents to the time of extraction.

This policy was introduced in CMake version 3.24.
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

CMP0136

Next topic

CMP0134

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) »

CMP0135

        © 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>CMP0136 — 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="CMP0135" href="CMP0135.html" />
    <link rel="prev" title="CMP0137" href="CMP0137.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0136

CMP0136¶

New in version 3.24.

Watcom runtime library flags are selected by an abstraction.

Compilers targeting the Watcom ABI have flags to select the Watcom runtime
library.

In CMake 3.23 and below, Watcom 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.24 and above prefer to leave the Watcom runtime library selection flags
out of the default CMAKE_<LANG>_FLAGS_<CONFIG> values and instead
offer a first-class abstraction.  The CMAKE_WATCOM_RUNTIME_LIBRARY
variable and WATCOM_RUNTIME_LIBRARY target property may be set to
select the Watcom runtime library.  If they are not set then CMake uses the
default value MultiThreadedDLL on Windows and SingleThreaded on other
platforms, 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 Watcom 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 Watcom runtime library
flags in the default CMAKE_<LANG>_FLAGS_<CONFIG> cache
entries and ignore the CMAKE_WATCOM_RUNTIME_LIBRARY abstraction.
The NEW behavior for this policy is to not place Watcom runtime
library flags in the default cache entries and use the abstraction instead.

This policy was introduced in CMake version 3.24.
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

CMP0137

Next topic

CMP0135

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) »

CMP0136

        © 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>CMP0137 — 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="CMP0136" href="CMP0136.html" />
    <link rel="prev" title="CMP0138" href="CMP0138.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0137

CMP0137¶

New in version 3.24.

try_compile() passes platform variables in project mode.

The try_compile() command source file signature propagates CMake variables containing platform settings,
and those specified by the CMAKE_TRY_COMPILE_PLATFORM_VARIABLES
variable, into the generated test project.  This helps the test project drive
the toolchain the same way the calling project will.  In CMake 3.23 and below,
the whole-project signature does not
propagate platform variables automatically.  CMake 3.24 and above prefer to
propagate platform variables in the whole-project signature.  This policy provides compatibility with projects that
have not been updated to expect the behavior.

The OLD behavior for this policy is to not pass any additional variables to
the whole-project signature.
The NEW behavior for this policy is to pass the same variables that the
source file signature does.

Regardless of the policy setting, the
CMAKE_TRY_COMPILE_NO_PLATFORM_VARIABLES variable may be set
to suppress passing the platform variables through either signature.

This policy was introduced in CMake version 3.24.
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

CMP0138

Next topic

CMP0136

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) »

CMP0137

        © 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>CMP0138 — 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="CMP0137" href="CMP0137.html" />
    <link rel="prev" title="CMP0139" href="CMP0139.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0138

CMP0138¶

New in version 3.24.

CheckIPOSupported uses flags from calling project.

The CheckIPOSupported module check_ipo_supported()
command compiles a test project to determine whether the toolchain
supports INTERPROCEDURAL_OPTIMIZATION.  CMake 3.23 and
below run the check with the default values of the
CMAKE_<LANG>_FLAGS and CMAKE_<LANG>_FLAGS_<CONFIG>
variables for the current environment and toolchain settings.
However, some projects may modify these flag variables to add
flags that affect availability of the toolchain's IPO features.
CMake 3.24 and above prefer to honor the calling project's values
for these variables.  This policy provides compatibility for projects
that have not been updated to expect this behavior.

The OLD behavior for this policy is to ignore the calling
project's values of CMAKE_<LANG>_FLAGS and
CMAKE_<LANG>_FLAGS_<CONFIG>.  The NEW behavior
for this policy is to use the values of those variables as
compiler flags in the test project.

This policy was introduced in CMake version 3.24.
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

CMP0139

Next topic

CMP0137

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) »

CMP0138

        © 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>CMP0139 — 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="CMP0138" href="CMP0138.html" />
    <link rel="prev" title="CMP0140" href="CMP0140.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0139

CMP0139¶

New in version 3.24.

The if() command supports path comparisons using PATH_EQUAL
operator.

The OLD behavior for this policy is to ignore the PATH_EQUAL operator.
The NEW behavior is to interpret the PATH_EQUAL operator.

This policy was introduced in CMake version 3.24.
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

CMP0140

Next topic

CMP0138

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) »

CMP0139

        © 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>CMP0140 — 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="CMP0139" href="CMP0139.html" />
    <link rel="prev" title="CMP0141" href="CMP0141.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0140

CMP0140¶

New in version 3.25.

The return() command checks its parameters.

The OLD behavior for this policy is to ignore any parameters given to the
command.
The NEW behavior is to check the validity of the parameters.

This policy was introduced in CMake version 3.25.
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

CMP0141

Next topic

CMP0139

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) »

CMP0140

        © 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>CMP0141 — 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="CMP0140" href="CMP0140.html" />
    <link rel="prev" title="CMP0142" href="CMP0142.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0141

CMP0141¶

New in version 3.25.

MSVC debug information format flags are selected by an abstraction.

Compilers targeting the MSVC ABI have flags to select the debug information
format. Debug information format selection typically varies with build
configuration.

In CMake 3.24 and below, debug information format 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.25 and above prefer to leave the debug information format flags
out of the default CMAKE_<LANG>_FLAGS_<CONFIG> values and instead
offer a first-class abstraction.  The
CMAKE_MSVC_DEBUG_INFORMATION_FORMAT variable and
MSVC_DEBUG_INFORMATION_FORMAT target property may be set to
select the MSVC debug information format.  If they are not set, CMake
enables debug information in debug configurations using the default value
$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>, if supported by the
compiler, and otherwise $<$<CONFIG:Debug,RelWithDebInfo>:Embedded>.

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
will be used throughout the tree.  In projects that have nested projects
in subdirectories, be sure to confirm if everything is working with the
selected policy behavior.

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

This policy was introduced in CMake version 3.25.
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

CMP0142

Next topic

CMP0140

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) »

CMP0141

        © 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>CMP0142 — 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="CMP0141" href="CMP0141.html" />
    <link rel="prev" title="CMP0143" href="CMP0143.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0142

CMP0142¶

New in version 3.25.

The Xcode generator does not append per-config suffixes to
library search paths.

In CMake 3.24 and below, the Xcode generator preceded each
entry of a library search path with a copy of itself appended with
$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME).  This was left from
very early versions of CMake in which per-config directories were not well
modeled.  Such paths often do not exist, resulting in warnings from the
toolchain.  CMake 3.25 and above prefer to not add such library search
paths.  This policy provides compatibility for projects that may have been
accidentally relying on the old behavior.

The OLD behavior for this policy is to append
$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) to all library search paths.
The NEW behavior is to not modify library search paths.

This policy was introduced in CMake version 3.25.
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

CMP0143

Next topic

CMP0141

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) »

CMP0142

        © 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>CMP0143 — 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="CMP0142" href="CMP0142.html" />
    <link rel="prev" title="CMP0144" href="CMP0144.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0143

CMP0143¶

New in version 3.26.

USE_FOLDERS global property is treated as ON by default.

When using CMake 3.25 or earlier, USE_FOLDERS is treated
as OFF by default unless projects enable the feature.  For example:

cmake_minimum_required(VERSION 3.25)
project(foobar LANGUAGES CXX)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)

CMake 3.26 and later prefer to enable the feature by default.

Note that it is the policy setting at the end of the top level
CMakeLists.txt file that matters.  The policy setting applies globally
to the whole project.

This policy provides compatibility with projects that have not been updated
to expect enabling of folders.  Enabling folders causes projects to appear
differently in IDEs.

This policy was introduced in CMake version 3.26.
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

CMP0144

Next topic

CMP0142

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) »

CMP0143

        © 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>CMP0144 — 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="CMP0143" href="CMP0143.html" />
    <link rel="prev" title="CMP0145" href="CMP0145.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0144

CMP0144¶

New in version 3.27.

find_package() uses upper-case <PACKAGENAME>_ROOT variables.

In CMake 3.27 and above the find_package(<PackageName>) command now
searches prefixes specified by the upper-case <PACKAGENAME>_ROOT
CMake variable and the <PACKAGENAME>_ROOT environment variable
in addition to the case-preserved <PackageName>_ROOT and
<PackageName>_ROOT variables used since policy CMP0074.
This policy provides compatibility with projects that have not been
updated to avoid using <PACKAGENAME>_ROOT variables for other purposes.

The OLD behavior for this policy is to ignore <PACKAGENAME>_ROOT
variables if the original <PackageName> has lower-case characters.
The NEW behavior for this policy is to use <PACKAGENAME>_ROOT
variables.

This policy was introduced in CMake version 3.27.
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

CMP0145

Next topic

CMP0143

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) »

CMP0144

        © 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>CMP0145 — 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="CMP0144" href="CMP0144.html" />
    <link rel="prev" title="CMP0146" href="CMP0146.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0145

CMP0145¶

New in version 3.27.

The Dart and FindDart modules are removed.

These modules were added very early in CMake's development to support
driving tests with a "DART" tool, but DART has not been distributed or
maintained for many years.  Projects would include(Dart) to use it,
and the Dart module would run find_package(Dart) internally.
Since ctest(1) was created, the Dart module has just been
a compatibility shim that finds Dart to support some legacy
functionality and then forwards to the CTest module.

CMake 3.27 and above prefer to not provide the Dart or
FindDart modules.  This policy provides compatibility for
projects that have not been ported away from them.  Projects using the
Dart module should be updated to use the CTest module directly.

The OLD behavior of this policy is for include(Dart) and
find_package(Dart) to load the deprecated modules.  The NEW
behavior is for uses of the modules to fail as if they do not exist.

This policy was introduced in CMake version 3.27.
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

CMP0146

Next topic

CMP0144

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) »

CMP0145

        © 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>CMP0146 — 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="CMP0145" href="CMP0145.html" />
    <link rel="prev" title="CMP0147" href="CMP0147.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-policies(7) »

CMP0146

CMP0146¶

New in version 3.27.

The FindCUDA module is removed.

The FindCUDA module has been deprecated since CMake 3.10.
CMake 3.27 and above prefer to not provide the module.
This policy provides compatibility for projects that have not been
ported away from it.

Projects using the FindCUDA module should be updated to use
CMake's first-class CUDA language support.  List CUDA among the
languages named in the top-level call to the project() command,
or call the enable_language() command with CUDA.
Then one can add CUDA (.cu) sources directly to targets,
similar to other languages.

The OLD behavior of this policy is for find_package(CUDA) to
load the deprecated module.  The NEW behavior is for uses of the
module to fail as if it does not exist.

This policy was introduced in CMake version 3.27.
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

CMP0147

Next topic

CMP0145

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) »

CMP0146

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