CMAKE-POLICIES(7) CMake CMAKE-POLICIES(7)
NAME
cmake-policies - CMake Policies Reference
INTRODUCTION
Policies in CMake are used to preserve backward compatible behavior
across multiple releases. When a new policy is introduced, newer CMake
versions will begin to warn about the backward compatible behavior. It
is possible to disable the warning by explicitly requesting the OLD, or
backward compatible behavior using the cmake_policy() command. It is
also possible to request NEW, or non-backward compatible behavior for a
policy, also avoiding the warning. Each policy can also be set to ei-
ther NEW or OLD behavior explicitly on the command line with the
CMAKE_POLICY_DEFAULT_CMP<NNNN> variable.
A policy is a deprecation mechanism and not a reliable feature toggle.
A policy should almost never be set to OLD, except to silence warnings
in an otherwise frozen or stable codebase, or temporarily as part of a
larger migration path. The OLD behavior of each policy is undesirable
and will be replaced with an error condition in a future release.
The cmake_minimum_required() command does more than report an error if
a too-old version of CMake is used to build a project. It also sets
all policies introduced in that CMake version or earlier to NEW behav-
ior. To manage policies without increasing the minimum required CMake
version, the if(POLICY) command may be used:
if(POLICY CMP0990)
cmake_policy(SET CMP0990 NEW)
endif()
This has the effect of using the NEW behavior with newer CMake releases
which users may be using and not issuing a compatibility warning.
The setting of a policy is confined in some cases to not propagate to
the parent scope. For example, if the files read by the include() com-
mand or the find_package() command contain a use of cmake_policy(),
that policy setting will not affect the caller by default. Both com-
mands accept an optional NO_POLICY_SCOPE keyword to control this behav-
ior.
The CMAKE_MINIMUM_REQUIRED_VERSION variable may also be used to deter-
mine whether to report an error on use of deprecated macros or func-
tions.
POLICIES INTRODUCED BY CMAKE 3.18
CMP0108
A target is not allowed to link to itself even through an ALIAS target.
In CMake 3.17 and below, a target can link to a target aliased to it-
self.
The OLD behavior for this policy is to allow a target to link to a tar-
get aliased to itself.
The NEW behavior of this policy is to prevent a target to link to it-
self through an ALIAS target.
This policy was introduced in CMake version 3.17. Use the cmake_pol-
icy() command to set it to OLD or NEW explicitly. Unlike many poli-
cies, CMake version 3.18.4 does not warn when this policy is not set
and simply uses OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0107
It is not allowed to create an ALIAS target with the same name as an
another target.
In CMake 3.17 and below, an ALIAS target can overwrite silently an ex-
isting target with the same name.
The OLD behavior for this policy is to allow target overwrite.
The NEW behavior of this policy is to prevent target overwriting.
This policy was introduced in CMake version 3.17. Use the cmake_pol-
icy() command to set it to OLD or NEW explicitly. Unlike many poli-
cies, CMake version 3.18.4 does not warn when this policy is not set
and simply uses OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0106
The Documentation module is removed.
The Documentation was added as a support mechanism for the VTK project
and was tuned for that project. Instead of CMake providing this module
with (now old) VTK patterns for cache variables and required packages,
the module is now deprecated by CMake itself.
The OLD behavior of this policy is for Documentation to add cache vari-
ables and find VTK documentation dependent packages. The NEW behavior
is to act as an empty module.
This policy was introduced in CMake version 3.18. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0105
LINK_OPTIONS and INTERFACE_LINK_OPTIONS target properties are now used
for the device link step.
In CMake 3.17 and below, link options are not used by the device link
step.
The OLD behavior for this policy is to ignore the link options.
The NEW behavior of this policy is to use the link options during the
device link step.
This policy was introduced in CMake version 3.17. Use the cmake_pol-
icy() command to set it to OLD or NEW explicitly. Unlike many poli-
cies, CMake version 3.18.4 does not warn when this policy is not set
and simply uses OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0104
Initialize CMAKE_CUDA_ARCHITECTURES when CMAKE_CUDA_COMPILER_ID is
NVIDIA. Raise an error if CUDA_ARCHITECTURES is empty.
CMAKE_CUDA_ARCHITECTURES introduced in CMake 3.18 is used to initialize
CUDA_ARCHITECTURES, which passes correct code generation flags to the
CUDA compiler.
Previous to this users had to manually specify the code generation
flags. This policy is for backwards compatibility with manually speci-
fying code generation flags.
The OLD behavior for this policy is to not initialize CMAKE_CUDA_ARCHI-
TECTURES when CMAKE_CUDA_COMPILER_ID is NVIDIA. Empty CUDA_ARCHITEC-
TURES is allowed.
The NEW behavior of this policy is to initialize CMAKE_CUDA_ARCHITEC-
TURES when CMAKE_CUDA_COMPILER_ID is NVIDIA and raise an error if
CUDA_ARCHITECTURES is empty during generation.
If CUDA_ARCHITECTURES is set to a false value no architectures flags
are passed to the compiler. This is intended to support packagers and
the rare cases where full control over the passed flags is required.
This policy was introduced in CMake version 3.18. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
Examples
set_property(TARGET tgt PROPERTY CUDA_ARCHITECTURES 35 50 72)
Generates code for real and virtual architectures 30, 50 and 72.
set_property(TARGET tgt PROPERTY CUDA_ARCHITECTURES 70-real 72-virtual)
Generates code for real architecture 70 and virtual architecture 72.
set_property(TARGET tgt PROPERTY CUDA_ARCHITECTURES OFF)
CMake will not pass any architecture flags to the compiler.
CMP0103
Multiple calls to export() command with same FILE without APPEND is no
longer allowed.
In CMake 3.17 and below, multiple calls to export() command with the
same FILE without APPEND are accepted silently but only the last occur-
rence is taken into account during the generation.
The OLD behavior for this policy is to ignore the multiple occurrences
of
export() command except the last one.
The NEW behavior of this policy is to raise an error on second call to
export() command with same FILE without APPEND.
This policy was introduced in CMake version 3.18. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
POLICIES INTRODUCED BY CMAKE 3.17
CMP0102
The mark_as_advanced() command no longer creates a cache entry if one
does not already exist.
In CMake 3.16 and below, if a variable was not defined at all or just
defined locally, the mark_as_advanced() command would create a new
cache entry with an UNINITIALIZED type and no value. When a find_path()
(or other similar find_ command) would next run, it would find this un-
defined cache entry and set it up with an empty string value. This
process would end up deleting the local variable in the process (due to
the way the cache works), effectively clearing any stored find_ results
that were only available in the local scope.
The OLD behavior for this policy is to create the empty cache defini-
tion. The NEW behavior of this policy is to ignore variables which do
not already exist in the cache.
This policy was introduced in CMake version 3.17. Use the cmake_pol-
icy() command to set it to OLD or NEW explicitly. Unlike many poli-
cies, CMake version 3.18.4 does not warn when this policy is not set
and simply uses OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0101
target_compile_options() now honors BEFORE keyword in all scopes.
In CMake 3.16 and below the target_compile_options() ignores the BEFORE
keyword in private scope. CMake 3.17 and later honors BEFORE keyword in
all scopes. This policy provides compatibility for projects that have
not been updated to expect the new behavior.
The OLD behavior for this policy is to not honor BEFORE keyword in pri-
vate scope. The NEW behavior of this policy is to honor BEFORE keyword
in all scopes.
This policy was introduced in CMake version 3.17. Use the cmake_pol-
icy() command to set it to OLD or NEW explicitly. Unlike many poli-
cies, CMake version 3.18.4 does not warn when this policy is not set
and simply uses OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0100
Let AUTOMOC and AUTOUIC process header files that end with a .hh exten-
sion.
Since version 3.17, CMake processes header files that end with a .hh
extension in AUTOMOC and AUTOUIC. In earlier CMake versions, these
header files were ignored by AUTOMOC and AUTOUIC.
This policy affects how header files that end with a .hh extension get
treated in AUTOMOC and AUTOUIC.
The OLD behavior for this policy is to ignore .hh header files in AUTO-
MOC and AUTOUIC.
The NEW behavior for this policy is to process .hh header files in AU-
TOMOC and AUTOUIC just like other header files.
NOTE:
To silence the CMP0100 warning source files can be excluded from AU-
TOMOC and AUTOUIC processing by setting the source file properties
SKIP_AUTOMOC, SKIP_AUTOUIC or SKIP_AUTOGEN.
# Source skip example:
set_property(SOURCE /path/to/file1.hh PROPERTY SKIP_AUTOMOC ON)
set_property(SOURCE /path/to/file2.hh PROPERTY SKIP_AUTOUIC ON)
set_property(SOURCE /path/to/file3.hh PROPERTY SKIP_AUTOGEN ON)
This policy was introduced in CMake version 3.17.0. CMake version
3.18.4 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0099
Target link properties INTERFACE_LINK_OPTIONS, INTERFACE_LINK_DIRECTO-
RIES and INTERFACE_LINK_DEPENDS are now transitive over private depen-
dencies of static libraries.
In CMake 3.16 and below the interface link properties attached to li-
braries are not propagated for private dependencies of static li-
braries. Only the libraries themselves are propagated to link the de-
pendent binary. CMake 3.17 and later prefer to propagate all interface
link properties. This policy provides compatibility for projects that
have not been updated to expect the new behavior.
The OLD behavior for this policy is to not propagate interface link
properties. The NEW behavior of this policy is to propagate interface
link properties.
This policy was introduced in CMake version 3.17. Use the cmake_pol-
icy() command to set it to OLD or NEW explicitly. Unlike many poli-
cies, CMake version 3.18.4 does not warn when this policy is not set
and simply uses OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0098
FindFLEX runs flex in directory CMAKE_CURRENT_BINARY_DIR when execut-
ing.
The module provides a FLEX_TARGET macro which generates FLEX output.
In CMake 3.16 and below the macro would generate a custom command that
runs flex in the current source directory. CMake 3.17 and later prefer
to run it in the build directory and use CMAKE_CURRENT_BINARY_DIR as
the WORKING_DIRECTORY of its add_custom_command() invocation. This en-
sures that any implicitly generated file is written relative to the
build tree rather than the source tree, unless the generated file is
provided as absolute path.
This policy provides compatibility for projects that have not been up-
dated to expect the new behavior.
The OLD behavior for this policy is for FLEX_TARGET to use the current
source directory for the WORKING_DIRECTORY and where to generate im-
plicit files. The NEW behavior of this policy is to use the current bi-
nary directory for the WORKING_DIRECTORY relative to which implicit
files are generated unless provided as absolute path.
This policy was introduced in CMake version 3.17. Use the cmake_pol-
icy() command to set it to OLD or NEW explicitly. Unlike many poli-
cies, CMake version 3.18.4 does not warn when this policy is not set
and simply uses OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
POLICIES INTRODUCED BY CMAKE 3.16
CMP0097
ExternalProject_Add() with GIT_SUBMODULES "" initializes no submodules.
The module provides a GIT_SUBMODULES option which controls what submod-
ules to initialize and update. Starting with CMake 3.16, explicitly
setting GIT_SUBMODULES to an empty string means no submodules will be
initialized or updated.
This policy provides compatibility for projects that have not been up-
dated to expect the new behavior.
The OLD behavior for this policy is for GIT_SUBMODULES when set to an
empty string to initialize and update all git submodules. The NEW be-
havior for this policy is for GIT_SUBMODULES when set to an empty
string to initialize and update no git submodules.
This policy was introduced in CMake version 3.16. Use the cmake_pol-
icy() command to set it to OLD or NEW explicitly. Unlike most poli-
cies, CMake version 3.18.4 does not warn when this policy is not set
and simply uses OLD behavior.
CMP0096
The project() command preserves leading zeros in version components.
When a VERSION <major>[.<minor>[.<patch>[.<tweak>]]]] argument is given
to the project() command, it stores the version string in the
PROJECT_VERSION variable and stores individual integer version compo-
nents in PROJECT_VERSION_{MAJOR,MINOR,PATCH,TWEAK} variables (see pol-
icy CMP0048). CMake 3.15 and below dropped leading zeros from each
component. CMake 3.16 and higher prefer to preserve leading zeros.
This policy provides compatibility for projects that have not been up-
dated to expect the new behavior.
The OLD behavior of this policy drops leading zeros in all components,
e.g. such that version 1.07.06 becomes 1.7.6. The NEW behavior of
this policy preserves the leading zeros in all components, such that
version 1.07.06 remains unchanged.
This policy was introduced in CMake version 3.16. Unlike many poli-
cies, CMake version 3.18.4 does not warn when this policy is not set
and simply uses the OLD behavior. Use the cmake_policy() command to
set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0095
RPATH entries are properly escaped in the intermediary CMake install
script.
In CMake 3.15 and earlier, RPATH entries set via CMAKE_INSTALL_RPATH or
via INSTALL_RPATH have not been escaped before being inserted into the
cmake_install.cmake script. Dynamic linkers on ELF-based systems (e.g.
Linux and FreeBSD) allow certain keywords in RPATH entries, such as
${ORIGIN} (More details are available in the ld.so man pages on those
systems). The syntax of these keywords can match CMakes variable syn-
tax. In order to not be substituted (usually to an empty string) al-
ready by the intermediary cmake_install.cmake script, the user had to
double-escape such RPATH keywords, e.g. set(CMAKE_INSTALL_RPATH
"\\\${ORIGIN}/../lib"). Since the intermediary cmake_install.cmake
script is an implementation detail of CMake, CMake 3.16 and later will
make sure RPATH entries are inserted literally by escaping any coinci-
dental CMake syntax.
The OLD behavior of this policy is to not escape RPATH entries in the
intermediary cmake_install.cmake script. The NEW behavior is to prop-
erly escape coincidental CMake syntax in RPATH entries when generating
the intermediary cmake_install.cmake script.
This policy was introduced in CMake version 3.16. CMake version 3.18.4
warns when the policy is not set and detected usage of CMake-like syn-
tax and uses OLD behavior. Use the cmake_policy() command to set it to
OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
POLICIES INTRODUCED BY CMAKE 3.15
CMP0094
Modules FindPython3, FindPython2 and FindPython use LOCATION for lookup
strategy.
Starting with CMake 3.15, Modules FindPython3, FindPython2 and Find-
Python set value LOCATION for, respectively, variables
Python3_FIND_STRATEGY, Python2_FIND_STRATEGY and Python_FIND_STRATEGY.
This policy provides compatibility with projects that expect the legacy
behavior.
The OLD behavior for this policy set value VERSION for variables
Python3_FIND_STRATEGY, Python2_FIND_STRATEGY and Python_FIND_STRATEGY.
This policy was introduced in CMake version 3.15. Use the cmake_pol-
icy() command to set it to OLD or NEW explicitly. Unlike many poli-
cies, CMake version 3.18.4 does not warn when this policy is not set
and simply uses the OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0093
FindBoost reports Boost_VERSION in x.y.z format.
In CMake 3.14 and below the module would report the Boost version num-
ber as specified in the preprocessor definition BOOST_VERSION in the
boost/version.hpp file. In CMake 3.15 and later it is preferred that
the reported version number matches the x.y.z format reported by the
CMake package shipped with Boost 1.70.0 and later. The macro value is
still reported in the Boost_VERSION_MACRO variable.
The OLD behavior for this policy is for FindBoost to report Boost_VER-
SION as specified in the preprocessor definition BOOST_VERSION in
boost/version.hpp. The NEW behavior for this policy is for FindBoost to
report Boost_VERSION in x.y.z format.
This policy was introduced in CMake version 3.15. Use the cmake_pol-
icy() command to set it to OLD or NEW explicitly. Unlike many poli-
cies, CMake version 3.18.4 does not warn when this policy is not set
and simply uses the OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0092
MSVC warning flags are not in CMAKE_<LANG>_FLAGS by default.
When using MSVC-like compilers in CMake 3.14 and below, warning flags
like /W3 are added to CMAKE_<LANG>_FLAGS by default. This is problem-
atic for projects that want to choose a different warning level pro-
grammatically. In particular, it requires string editing of the
CMAKE_<LANG>_FLAGS variables with knowledge of the CMake builtin de-
faults so they can be replaced.
CMake 3.15 and above prefer to leave out warning flags from the value
of CMAKE_<LANG>_FLAGS by default.
This policy provides compatibility with projects that have not been up-
dated to expect the lack of warning flags. The policy setting takes
effect as of the first project() or enable_language() command that ini-
tializes CMAKE_<LANG>_FLAGS for a given lanuage <LANG>.
NOTE:
Once the policy has taken effect at the top of a project for a given
language, that choice must be used throughout the tree for that lan-
guage. In projects that have nested projects in subdirectories, be
sure to convert everything together.
The OLD behavior for this policy is to place MSVC warning flags in the
default CMAKE_<LANG>_FLAGS cache entries. The NEW behavior for this
policy is to not place MSVC warning flags in the default cache entries.
This policy was introduced in CMake version 3.15.
CMAKE-POLICIES(7) CMake CMAKE-POLICIES(7)
NAME
cmake-policies - CMake Policies Reference
INTRODUCTION
Policies in CMake are used to preserve backward compatible behavior
across multiple releases. When a new policy is introduced, newer CMake
versions will begin to warn about the backward compatible behavior. It
is possible to disable the warning by explicitly requesting the OLD, or
backward compatible behavior using the cmake_policy() command. It is
also possible to request NEW, or non-backward compatible behavior for a
policy, also avoiding the warning. Each policy can also be set to ei-
ther NEW or OLD behavior explicitly on the command line with the
CMAKE_POLICY_DEFAULT_CMP<NNNN> variable.
A policy is a deprecation mechanism and not a reliable feature toggle.
A policy should almost never be set to OLD, except to silence warnings
in an otherwise frozen or stable codebase, or temporarily as part of a
larger migration path. The OLD behavior of each policy is undesirable
and will be replaced with an error condition in a future release.
The cmake_minimum_required() command does more than report an error if
a too-old version of CMake is used to build a project. It also sets
all policies introduced in that CMake version or earlier to NEW behav-
ior. To manage policies without increasing the minimum required CMake
version, the if(POLICY) command may be used:
if(POLICY CMP0990)
cmake_policy(SET CMP0990 NEW)
endif()
This has the effect of using the NEW behavior with newer CMake releases
which users may be using and not issuing a compatibility warning.
The setting of a policy is confined in some cases to not propagate to
the parent scope. For example, if the files read by the include() com-
mand or the find_package() command contain a use of cmake_policy(),
that policy setting will not affect the caller by default. Both com-
mands accept an optional NO_POLICY_SCOPE keyword to control this behav-
ior.
The CMAKE_MINIMUM_REQUIRED_VERSION variable may also be used to deter-
mine whether to report an error on use of deprecated macros or func-
tions.
POLICIES INTRODUCED BY CMAKE 3.18
CMP0108
A target is not allowed to link to itself even through an ALIAS target.
In CMake 3.17 and below, a target can link to a target aliased to it-
self.
The OLD behavior for this policy is to allow a target to link to a tar-
get aliased to itself.
The NEW behavior of this policy is to prevent a target to link to it-
self through an ALIAS target.
This policy was introduced in CMake version 3.17. Use the cmake_pol-
icy() command to set it to OLD or NEW explicitly. Unlike many poli-
cies, CMake version 3.18.4 does not warn when this policy is not set
and simply uses OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0107
It is not allowed to create an ALIAS target with the same name as an
another target.
In CMake 3.17 and below, an ALIAS target can overwrite silently an ex-
isting target with the same name.
The OLD behavior for this policy is to allow target overwrite.
The NEW behavior of this policy is to prevent target overwriting.
This policy was introduced in CMake version 3.17. Use the cmake_pol-
icy() command to set it to OLD or NEW explicitly. Unlike many poli-
cies, CMake version 3.18.4 does not warn when this policy is not set
and simply uses OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0106
The Documentation module is removed.
The Documentation was added as a support mechanism for the VTK project
and was tuned for that project. Instead of CMake providing this module
with (now old) VTK patterns for cache variables and required packages,
the module is now deprecated by CMake itself.
The OLD behavior of this policy is for Documentation to add cache vari-
ables and find VTK documentation dependent packages. The NEW behavior
is to act as an empty module.
This policy was introduced in CMake version 3.18. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0105
LINK_OPTIONS and INTERFACE_LINK_OPTIONS target properties are now used
for the device link step.
In CMake 3.17 and below, link options are not used by the device link
step.
The OLD behavior for this policy is to ignore the link options.
The NEW behavior of this policy is to use the link options during the
device link step.
This policy was introduced in CMake version 3.17. Use the cmake_pol-
icy() command to set it to OLD or NEW explicitly. Unlike many poli-
cies, CMake version 3.18.4 does not warn when this policy is not set
and simply uses OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0104
Initialize CMAKE_CUDA_ARCHITECTURES when CMAKE_CUDA_COMPILER_ID is
NVIDIA. Raise an error if CUDA_ARCHITECTURES is empty.
CMAKE_CUDA_ARCHITECTURES introduced in CMake 3.18 is used to initialize
CUDA_ARCHITECTURES, which passes correct code generation flags to the
CUDA compiler.
Previous to this users had to manually specify the code generation
flags. This policy is for backwards compatibility with manually speci-
fying code generation flags.
The OLD behavior for this policy is to not initialize CMAKE_CUDA_ARCHI-
TECTURES when CMAKE_CUDA_COMPILER_ID is NVIDIA. Empty CUDA_ARCHITEC-
TURES is allowed.
The NEW behavior of this policy is to initialize CMAKE_CUDA_ARCHITEC-
TURES when CMAKE_CUDA_COMPILER_ID is NVIDIA and raise an error if
CUDA_ARCHITECTURES is empty during generation.
If CUDA_ARCHITECTURES is set to a false value no architectures flags
are passed to the compiler. This is intended to support packagers and
the rare cases where full control over the passed flags is required.
This policy was introduced in CMake version 3.18. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
Examples
set_property(TARGET tgt PROPERTY CUDA_ARCHITECTURES 35 50 72)
Generates code for real and virtual architectures 30, 50 and 72.
set_property(TARGET tgt PROPERTY CUDA_ARCHITECTURES 70-real 72-virtual)
Generates code for real architecture 70 and virtual architecture 72.
set_property(TARGET tgt PROPERTY CUDA_ARCHITECTURES OFF)
CMake will not pass any architecture flags to the compiler.
CMP0103
Multiple calls to export() command with same FILE without APPEND is no
longer allowed.
In CMake 3.17 and below, multiple calls to export() command with the
same FILE without APPEND are accepted silently but only the last occur-
rence is taken into account during the generation.
The OLD behavior for this policy is to ignore the multiple occurrences
of
export() command except the last one.
The NEW behavior of this policy is to raise an error on second call to
export() command with same FILE without APPEND.
This policy was introduced in CMake version 3.18. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
POLICIES INTRODUCED BY CMAKE 3.17
CMP0102
The mark_as_advanced() command no longer creates a cache entry if one
does not already exist.
In CMake 3.16 and below, if a variable was not defined at all or just
defined locally, the mark_as_advanced() command would create a new
cache entry with an UNINITIALIZED type and no value. When a find_path()
(or other similar find_ command) would next run, it would find this un-
defined cache entry and set it up with an empty string value. This
process would end up deleting the local variable in the process (due to
the way the cache works), effectively clearing any stored find_ results
that were only available in the local scope.
The OLD behavior for this policy is to create the empty cache defini-
tion. The NEW behavior of this policy is to ignore variables which do
not already exist in the cache.
This policy was introduced in CMake version 3.17. Use the cmake_pol-
icy() command to set it to OLD or NEW explicitly. Unlike many poli-
cies, CMake version 3.18.4 does not warn when this policy is not set
and simply uses OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0101
target_compile_options() now honors BEFORE keyword in all scopes.
In CMake 3.16 and below the target_compile_options() ignores the BEFORE
keyword in private scope. CMake 3.17 and later honors BEFORE keyword in
all scopes. This policy provides compatibility for projects that have
not been updated to expect the new behavior.
The OLD behavior for this policy is to not honor BEFORE keyword in pri-
vate scope. The NEW behavior of this policy is to honor BEFORE keyword
in all scopes.
This policy was introduced in CMake version 3.17. Use the cmake_pol-
icy() command to set it to OLD or NEW explicitly. Unlike many poli-
cies, CMake version 3.18.4 does not warn when this policy is not set
and simply uses OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0100
Let AUTOMOC and AUTOUIC process header files that end with a .hh exten-
sion.
Since version 3.17, CMake processes header files that end with a .hh
extension in AUTOMOC and AUTOUIC. In earlier CMake versions, these
header files were ignored by AUTOMOC and AUTOUIC.
This policy affects how header files that end with a .hh extension get
treated in AUTOMOC and AUTOUIC.
The OLD behavior for this policy is to ignore .hh header files in AUTO-
MOC and AUTOUIC.
The NEW behavior for this policy is to process .hh header files in AU-
TOMOC and AUTOUIC just like other header files.
NOTE:
To silence the CMP0100 warning source files can be excluded from AU-
TOMOC and AUTOUIC processing by setting the source file properties
SKIP_AUTOMOC, SKIP_AUTOUIC or SKIP_AUTOGEN.
# Source skip example:
set_property(SOURCE /path/to/file1.hh PROPERTY SKIP_AUTOMOC ON)
set_property(SOURCE /path/to/file2.hh PROPERTY SKIP_AUTOUIC ON)
set_property(SOURCE /path/to/file3.hh PROPERTY SKIP_AUTOGEN ON)
This policy was introduced in CMake version 3.17.0. CMake version
3.18.4 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0099
Target link properties INTERFACE_LINK_OPTIONS, INTERFACE_LINK_DIRECTO-
RIES and INTERFACE_LINK_DEPENDS are now transitive over private depen-
dencies of static libraries.
In CMake 3.16 and below the interface link properties attached to li-
braries are not propagated for private dependencies of static li-
braries. Only the libraries themselves are propagated to link the de-
pendent binary. CMake 3.17 and later prefer to propagate all interface
link properties. This policy provides compatibility for projects that
have not been updated to expect the new behavior.
The OLD behavior for this policy is to not propagate interface link
properties. The NEW behavior of this policy is to propagate interface
link properties.
This policy was introduced in CMake version 3.17. Use the cmake_pol-
icy() command to set it to OLD or NEW explicitly. Unlike many poli-
cies, CMake version 3.18.4 does not warn when this policy is not set
and simply uses OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0098
FindFLEX runs flex in directory CMAKE_CURRENT_BINARY_DIR when execut-
ing.
The module provides a FLEX_TARGET macro which generates FLEX output.
In CMake 3.16 and below the macro would generate a custom command that
runs flex in the current source directory. CMake 3.17 and later prefer
to run it in the build directory and use CMAKE_CURRENT_BINARY_DIR as
the WORKING_DIRECTORY of its add_custom_command() invocation. This en-
sures that any implicitly generated file is written relative to the
build tree rather than the source tree, unless the generated file is
provided as absolute path.
This policy provides compatibility for projects that have not been up-
dated to expect the new behavior.
The OLD behavior for this policy is for FLEX_TARGET to use the current
source directory for the WORKING_DIRECTORY and where to generate im-
plicit files. The NEW behavior of this policy is to use the current bi-
nary directory for the WORKING_DIRECTORY relative to which implicit
files are generated unless provided as absolute path.
This policy was introduced in CMake version 3.17. Use the cmake_pol-
icy() command to set it to OLD or NEW explicitly. Unlike many poli-
cies, CMake version 3.18.4 does not warn when this policy is not set
and simply uses OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
POLICIES INTRODUCED BY CMAKE 3.16
CMP0097
ExternalProject_Add() with GIT_SUBMODULES "" initializes no submodules.
The module provides a GIT_SUBMODULES option which controls what submod-
ules to initialize and update. Starting with CMake 3.16, explicitly
setting GIT_SUBMODULES to an empty string means no submodules will be
initialized or updated.
This policy provides compatibility for projects that have not been up-
dated to expect the new behavior.
The OLD behavior for this policy is for GIT_SUBMODULES when set to an
empty string to initialize and update all git submodules. The NEW be-
havior for this policy is for GIT_SUBMODULES when set to an empty
string to initialize and update no git submodules.
This policy was introduced in CMake version 3.16. Use the cmake_pol-
icy() command to set it to OLD or NEW explicitly. Unlike most poli-
cies, CMake version 3.18.4 does not warn when this policy is not set
and simply uses OLD behavior.
CMP0096
The project() command preserves leading zeros in version components.
When a VERSION <major>[.<minor>[.<patch>[.<tweak>]]]] argument is given
to the project() command, it stores the version string in the
PROJECT_VERSION variable and stores individual integer version compo-
nents in PROJECT_VERSION_{MAJOR,MINOR,PATCH,TWEAK} variables (see pol-
icy CMP0048). CMake 3.15 and below dropped leading zeros from each
component. CMake 3.16 and higher prefer to preserve leading zeros.
This policy provides compatibility for projects that have not been up-
dated to expect the new behavior.
The OLD behavior of this policy drops leading zeros in all components,
e.g. such that version 1.07.06 becomes 1.7.6. The NEW behavior of
this policy preserves the leading zeros in all components, such that
version 1.07.06 remains unchanged.
This policy was introduced in CMake version 3.16. Unlike many poli-
cies, CMake version 3.18.4 does not warn when this policy is not set
and simply uses the OLD behavior. Use the cmake_policy() command to
set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0095
RPATH entries are properly escaped in the intermediary CMake install
script.
In CMake 3.15 and earlier, RPATH entries set via CMAKE_INSTALL_RPATH or
via INSTALL_RPATH have not been escaped before being inserted into the
cmake_install.cmake script. Dynamic linkers on ELF-based systems (e.g.
Linux and FreeBSD) allow certain keywords in RPATH entries, such as
${ORIGIN} (More details are available in the ld.so man pages on those
systems). The syntax of these keywords can match CMakes variable syn-
tax. In order to not be substituted (usually to an empty string) al-
ready by the intermediary cmake_install.cmake script, the user had to
double-escape such RPATH keywords, e.g. set(CMAKE_INSTALL_RPATH
"\\\${ORIGIN}/../lib"). Since the intermediary cmake_install.cmake
script is an implementation detail of CMake, CMake 3.16 and later will
make sure RPATH entries are inserted literally by escaping any coinci-
dental CMake syntax.
The OLD behavior of this policy is to not escape RPATH entries in the
intermediary cmake_install.cmake script. The NEW behavior is to prop-
erly escape coincidental CMake syntax in RPATH entries when generating
the intermediary cmake_install.cmake script.
This policy was introduced in CMake version 3.16. CMake version 3.18.4
warns when the policy is not set and detected usage of CMake-like syn-
tax and uses OLD behavior. Use the cmake_policy() command to set it to
OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
POLICIES INTRODUCED BY CMAKE 3.15
CMP0094
Modules FindPython3, FindPython2 and FindPython use LOCATION for lookup
strategy.
Starting with CMake 3.15, Modules FindPython3, FindPython2 and Find-
Python set value LOCATION for, respectively, variables
Python3_FIND_STRATEGY, Python2_FIND_STRATEGY and Python_FIND_STRATEGY.
This policy provides compatibility with projects that expect the legacy
behavior.
The OLD behavior for this policy set value VERSION for variables
Python3_FIND_STRATEGY, Python2_FIND_STRATEGY and Python_FIND_STRATEGY.
This policy was introduced in CMake version 3.15. Use the cmake_pol-
icy() command to set it to OLD or NEW explicitly. Unlike many poli-
cies, CMake version 3.18.4 does not warn when this policy is not set
and simply uses the OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0093
FindBoost reports Boost_VERSION in x.y.z format.
In CMake 3.14 and below the module would report the Boost version num-
ber as specified in the preprocessor definition BOOST_VERSION in the
boost/version.hpp file. In CMake 3.15 and later it is preferred that
the reported version number matches the x.y.z format reported by the
CMake package shipped with Boost 1.70.0 and later. The macro value is
still reported in the Boost_VERSION_MACRO variable.
The OLD behavior for this policy is for FindBoost to report Boost_VER-
SION as specified in the preprocessor definition BOOST_VERSION in
boost/version.hpp. The NEW behavior for this policy is for FindBoost to
report Boost_VERSION in x.y.z format.
This policy was introduced in CMake version 3.15. Use the cmake_pol-
icy() command to set it to OLD or NEW explicitly. Unlike many poli-
cies, CMake version 3.18.4 does not warn when this policy is not set
and simply uses the OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0092
MSVC warning flags are not in CMAKE_<LANG>_FLAGS by default.
When using MSVC-like compilers in CMake 3.14 and below, warning flags
like /W3 are added to CMAKE_<LANG>_FLAGS by default. This is problem-
atic for projects that want to choose a different warning level pro-
grammatically. In particular, it requires string editing of the
CMAKE_<LANG>_FLAGS variables with knowledge of the CMake builtin de-
faults so they can be replaced.
CMake 3.15 and above prefer to leave out warning flags from the value
of CMAKE_<LANG>_FLAGS by default.
This policy provides compatibility with projects that have not been up-
dated to expect the lack of warning flags. The policy setting takes
effect as of the first project() or enable_language() command that ini-
tializes CMAKE_<LANG>_FLAGS for a given lanuage <LANG>.
NOTE:
Once the policy has taken effect at the top of a project for a given
language, that choice must be used throughout the tree for that lan-
guage. In projects that have nested projects in subdirectories, be
sure to convert everything together.
The OLD behavior for this policy is to place MSVC warning flags in the
default CMAKE_<LANG>_FLAGS cache entries. The NEW behavior for this
policy is to not place MSVC warning flags in the default cache entries.
This policy was introduced in CMake version 3.15.
CMAKE-POLICIES(7) CMake CMAKE-POLICIES(7)
NAME
cmake-policies - CMake Policies Reference
INTRODUCTION
Policies in CMake are used to preserve backward compatible behavior
across multiple releases. When a new policy is introduced, newer CMake
versions will begin to warn about the backward compatible behavior. It
is possible to disable the warning by explicitly requesting the OLD, or
backward compatible behavior using the cmake_policy() command. It is
also possible to request NEW, or non-backward compatible behavior for a
policy, also avoiding the warning. Each policy can also be set to ei-
ther NEW or OLD behavior explicitly on the command line with the
CMAKE_POLICY_DEFAULT_CMP<NNNN> variable.
A policy is a deprecation mechanism and not a reliable feature toggle.
A policy should almost never be set to OLD, except to silence warnings
in an otherwise frozen or stable codebase, or temporarily as part of a
larger migration path. The OLD behavior of each policy is undesirable
and will be replaced with an error condition in a future release.
The cmake_minimum_required() command does more than report an error if
a too-old version of CMake is used to build a project. It also sets
all policies introduced in that CMake version or earlier to NEW behav-
ior. To manage policies without increasing the minimum required CMake
version, the if(POLICY) command may be used:
if(POLICY CMP0990)
cmake_policy(SET CMP0990 NEW)
endif()
This has the effect of using the NEW behavior with newer CMake releases
which users may be using and not issuing a compatibility warning.
The setting of a policy is confined in some cases to not propagate to
the parent scope. For example, if the files read by the include() com-
mand or the find_package() command contain a use of cmake_policy(),
that policy setting will not affect the caller by default. Both com-
mands accept an optional NO_POLICY_SCOPE keyword to control this behav-
ior.
The CMAKE_MINIMUM_REQUIRED_VERSION variable may also be used to deter-
mine whether to report an error on use of deprecated macros or func-
tions.
POLICIES INTRODUCED BY CMAKE 3.18
CMP0108
A target is not allowed to link to itself even through an ALIAS target.
In CMake 3.17 and below, a target can link to a target aliased to it-
self.
The OLD behavior for this policy is to allow a target to link to a tar-
get aliased to itself.
The NEW behavior of this policy is to prevent a target to link to it-
self through an ALIAS target.
This policy was introduced in CMake version 3.17. Use the cmake_pol-
icy() command to set it to OLD or NEW explicitly. Unlike many poli-
cies, CMake version 3.18.4 does not warn when this policy is not set
and simply uses OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0107
It is not allowed to create an ALIAS target with the same name as an
another target.
In CMake 3.17 and below, an ALIAS target can overwrite silently an ex-
isting target with the same name.
The OLD behavior for this policy is to allow target overwrite.
The NEW behavior of this policy is to prevent target overwriting.
This policy was introduced in CMake version 3.17. Use the cmake_pol-
icy() command to set it to OLD or NEW explicitly. Unlike many poli-
cies, CMake version 3.18.4 does not warn when this policy is not set
and simply uses OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0106
The Documentation module is removed.
The Documentation was added as a support mechanism for the VTK project
and was tuned for that project. Instead of CMake providing this module
with (now old) VTK patterns for cache variables and required packages,
the module is now deprecated by CMake itself.
The OLD behavior of this policy is for Documentation to add cache vari-
ables and find VTK documentation dependent packages. The NEW behavior
is to act as an empty module.
This policy was introduced in CMake version 3.18. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0105
LINK_OPTIONS and INTERFACE_LINK_OPTIONS target properties are now used
for the device link step.
In CMake 3.17 and below, link options are not used by the device link
step.
The OLD behavior for this policy is to ignore the link options.
The NEW behavior of this policy is to use the link options during the
device link step.
This policy was introduced in CMake version 3.17. Use the cmake_pol-
icy() command to set it to OLD or NEW explicitly. Unlike many poli-
cies, CMake version 3.18.4 does not warn when this policy is not set
and simply uses OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0104
Initialize CMAKE_CUDA_ARCHITECTURES when CMAKE_CUDA_COMPILER_ID is
NVIDIA. Raise an error if CUDA_ARCHITECTURES is empty.
CMAKE_CUDA_ARCHITECTURES introduced in CMake 3.18 is used to initialize
CUDA_ARCHITECTURES, which passes correct code generation flags to the
CUDA compiler.
Previous to this users had to manually specify the code generation
flags. This policy is for backwards compatibility with manually speci-
fying code generation flags.
The OLD behavior for this policy is to not initialize CMAKE_CUDA_ARCHI-
TECTURES when CMAKE_CUDA_COMPILER_ID is NVIDIA. Empty CUDA_ARCHITEC-
TURES is allowed.
The NEW behavior of this policy is to initialize CMAKE_CUDA_ARCHITEC-
TURES when CMAKE_CUDA_COMPILER_ID is NVIDIA and raise an error if
CUDA_ARCHITECTURES is empty during generation.
If CUDA_ARCHITECTURES is set to a false value no architectures flags
are passed to the compiler. This is intended to support packagers and
the rare cases where full control over the passed flags is required.
This policy was introduced in CMake version 3.18. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
Examples
set_property(TARGET tgt PROPERTY CUDA_ARCHITECTURES 35 50 72)
Generates code for real and virtual architectures 30, 50 and 72.
set_property(TARGET tgt PROPERTY CUDA_ARCHITECTURES 70-real 72-virtual)
Generates code for real architecture 70 and virtual architecture 72.
set_property(TARGET tgt PROPERTY CUDA_ARCHITECTURES OFF)
CMake will not pass any architecture flags to the compiler.
CMP0103
Multiple calls to export() command with same FILE without APPEND is no
longer allowed.
In CMake 3.17 and below, multiple calls to export() command with the
same FILE without APPEND are accepted silently but only the last occur-
rence is taken into account during the generation.
The OLD behavior for this policy is to ignore the multiple occurrences
of
export() command except the last one.
The NEW behavior of this policy is to raise an error on second call to
export() command with same FILE without APPEND.
This policy was introduced in CMake version 3.18. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
POLICIES INTRODUCED BY CMAKE 3.17
CMP0102
The mark_as_advanced() command no longer creates a cache entry if one
does not already exist.
In CMake 3.16 and below, if a variable was not defined at all or just
defined locally, the mark_as_advanced() command would create a new
cache entry with an UNINITIALIZED type and no value. When a find_path()
(or other similar find_ command) would next run, it would find this un-
defined cache entry and set it up with an empty string value. This
process would end up deleting the local variable in the process (due to
the way the cache works), effectively clearing any stored find_ results
that were only available in the local scope.
The OLD behavior for this policy is to create the empty cache defini-
tion. The NEW behavior of this policy is to ignore variables which do
not already exist in the cache.
This policy was introduced in CMake version 3.17. Use the cmake_pol-
icy() command to set it to OLD or NEW explicitly. Unlike many poli-
cies, CMake version 3.18.4 does not warn when this policy is not set
and simply uses OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0101
target_compile_options() now honors BEFORE keyword in all scopes.
In CMake 3.16 and below the target_compile_options() ignores the BEFORE
keyword in private scope. CMake 3.17 and later honors BEFORE keyword in
all scopes. This policy provides compatibility for projects that have
not been updated to expect the new behavior.
The OLD behavior for this policy is to not honor BEFORE keyword in pri-
vate scope. The NEW behavior of this policy is to honor BEFORE keyword
in all scopes.
This policy was introduced in CMake version 3.17. Use the cmake_pol-
icy() command to set it to OLD or NEW explicitly. Unlike many poli-
cies, CMake version 3.18.4 does not warn when this policy is not set
and simply uses OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0100
Let AUTOMOC and AUTOUIC process header files that end with a .hh exten-
sion.
Since version 3.17, CMake processes header files that end with a .hh
extension in AUTOMOC and AUTOUIC. In earlier CMake versions, these
header files were ignored by AUTOMOC and AUTOUIC.
This policy affects how header files that end with a .hh extension get
treated in AUTOMOC and AUTOUIC.
The OLD behavior for this policy is to ignore .hh header files in AUTO-
MOC and AUTOUIC.
The NEW behavior for this policy is to process .hh header files in AU-
TOMOC and AUTOUIC just like other header files.
NOTE:
To silence the CMP0100 warning source files can be excluded from AU-
TOMOC and AUTOUIC processing by setting the source file properties
SKIP_AUTOMOC, SKIP_AUTOUIC or SKIP_AUTOGEN.
# Source skip example:
set_property(SOURCE /path/to/file1.hh PROPERTY SKIP_AUTOMOC ON)
set_property(SOURCE /path/to/file2.hh PROPERTY SKIP_AUTOUIC ON)
set_property(SOURCE /path/to/file3.hh PROPERTY SKIP_AUTOGEN ON)
This policy was introduced in CMake version 3.17.0. CMake version
3.18.4 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0099
Target link properties INTERFACE_LINK_OPTIONS, INTERFACE_LINK_DIRECTO-
RIES and INTERFACE_LINK_DEPENDS are now transitive over private depen-
dencies of static libraries.
In CMake 3.16 and below the interface link properties attached to li-
braries are not propagated for private dependencies of static li-
braries. Only the libraries themselves are propagated to link the de-
pendent binary. CMake 3.17 and later prefer to propagate all interface
link properties. This policy provides compatibility for projects that
have not been updated to expect the new behavior.
The OLD behavior for this policy is to not propagate interface link
properties. The NEW behavior of this policy is to propagate interface
link properties.
This policy was introduced in CMake version 3.17. Use the cmake_pol-
icy() command to set it to OLD or NEW explicitly. Unlike many poli-
cies, CMake version 3.18.4 does not warn when this policy is not set
and simply uses OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0098
FindFLEX runs flex in directory CMAKE_CURRENT_BINARY_DIR when execut-
ing.
The module provides a FLEX_TARGET macro which generates FLEX output.
In CMake 3.16 and below the macro would generate a custom command that
runs flex in the current source directory. CMake 3.17 and later prefer
to run it in the build directory and use CMAKE_CURRENT_BINARY_DIR as
the WORKING_DIRECTORY of its add_custom_command() invocation. This en-
sures that any implicitly generated file is written relative to the
build tree rather than the source tree, unless the generated file is
provided as absolute path.
This policy provides compatibility for projects that have not been up-
dated to expect the new behavior.
The OLD behavior for this policy is for FLEX_TARGET to use the current
source directory for the WORKING_DIRECTORY and where to generate im-
plicit files. The NEW behavior of this policy is to use the current bi-
nary directory for the WORKING_DIRECTORY relative to which implicit
files are generated unless provided as absolute path.
This policy was introduced in CMake version 3.17. Use the cmake_pol-
icy() command to set it to OLD or NEW explicitly. Unlike many poli-
cies, CMake version 3.18.4 does not warn when this policy is not set
and simply uses OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
POLICIES INTRODUCED BY CMAKE 3.16
CMP0097
ExternalProject_Add() with GIT_SUBMODULES "" initivariables like
CMAKE_<LANG>_FLAGS_DEBUG and only use CMakes built-in defaults for the
current compiler and platform.
The NEW behavior of this policy is to honor config-specific flag vari-
abldes like CMAKE_<LANG>_FLAGS_DEBUG.
This policy was introduced in CMake version 3.7. Unlike most policies,
CMake version 3.18.4 does not warn by default when this policy is not
set and simply uses OLD behavior. See documentation of the CMAKE_POL-
ICY_WARNING_CMP0066 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.
POLICIES INTRODUCED BY CMAKE 3.4
CMP0065
Do not add flags to export symbols from executables without the EN-
ABLE_EXPORTS target property.
CMake 3.3 and below, for historical reasons, always linked executables
on some platforms with flags like -rdynamic to export symbols from the
executables for use by any plugins they may load via dlopen. CMake 3.4
and above prefer to do this only for executables that are explicitly
marked with the ENABLE_EXPORTS target property.
The OLD behavior of this policy is to always use the additional link
flags when linking executables regardless of the value of the EN-
ABLE_EXPORTS target property.
The NEW behavior of this policy is to only use the additional link
flags when linking executables if the ENABLE_EXPORTS target property is
set to True.
This policy was introduced in CMake version 3.4. Unlike most policies,
CMake version 3.18.4 does not warn by default when this policy is not
set and simply uses OLD behavior. See documentation of the CMAKE_POL-
ICY_WARNING_CMP0065 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.
CMP0064
Recognize TEST as a operator for the if() command.
The TEST operator was added to the if() command to determine if a given
test name was created by the add_test() command.
The OLD behavior for this policy is to ignore the TEST operator. The
NEW behavior is to interpret the TEST operator.
This policy was introduced in CMake version 3.4. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
POLICIES INTRODUCED BY CMAKE 3.3
CMP0063
Honor visibility properties for all target types.
The <LANG>_VISIBILITY_PRESET and VISIBILITY_INLINES_HIDDEN target prop-
erties affect visibility of symbols during dynamic linking. When first
introduced these properties affected compilation of sources only in
shared libraries, module libraries, and executables with the ENABLE_EX-
PORTS property set. This was sufficient for the basic use cases of
shared libraries and executables with plugins. However, some sources
may be compiled as part of static libraries or object libraries and
then linked into a shared library later. CMake 3.3 and above prefer to
honor these properties for sources compiled in all target types. This
policy preserves compatibility for projects expecting the properties to
work only for some target types.
The OLD behavior for this policy is to ignore the visibility properties
for static libraries, object libraries, and executables without ex-
ports. The NEW behavior for this policy is to honor the visibility
properties for all target types.
This policy was introduced in CMake version 3.3. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0062
Disallow install() of export() result.
The export() command generates a file containing Imported Targets,
which is suitable for use from the build directory. It is not suitable
for installation because it contains absolute paths to buildsystem lo-
cations, and is particular to a single build configuration.
The install(EXPORT) generates and installs files which contain Imported
Targets. These files are generated with relative paths (unless the
user specifies absolute paths), and are designed for multi-configura-
tion use. See Creating Packages for more.
CMake 3.3 no longer allows the use of the install(FILES) command with
the result of the export() command.
The OLD behavior for this policy is to allow installing the result of
an export() command. The NEW behavior for this policy is not to allow
installing the result of an export() command.
This policy was introduced in CMake version 3.3. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0061
CTest does not by default tell make to ignore errors (-i).
The ctest_build() and build_command() commands no longer generate build
commands for Makefile Generators with the -i option. Previously this
was done to help build as much of tested projects as possible. How-
ever, this behavior is not consistent with other generators and also
causes the return code of the make tool to be meaningless.
Of course users may still add this option manually by setting
CTEST_BUILD_COMMAND or the MAKECOMMAND cache entry. See the CTest
Build Step MakeCommand setting documentation for their effects.
The OLD behavior for this policy is to add -i to make calls in CTest.
The NEW behavior for this policy is to not add -i.
This policy was introduced in CMake version 3.3. Unlike most policies,
CMake version 3.18.4 does not warn when this policy is not set and sim-
ply uses OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0060
Link libraries by full path even in implicit directories.
Policy CMP0003 was introduced with the intention of always linking li-
brary files by full path when a full path is given to the tar-
get_link_libraries() command. However, on some platforms (e.g. HP-UX)
the compiler front-end adds alternative library search paths for the
current architecture (e.g. /usr/lib/<arch> has alternatives to li-
braries in /usr/lib for the current architecture). On such platforms
the find_library() may find a library such as /usr/lib/libfoo.so that
does not belong to the current architecture.
Prior to policy CMP0003 projects would still build in such cases be-
cause the incorrect library path would be converted to -lfoo on the
link line and the linker would find the proper library in the arch-spe-
cific search path provided by the compiler front-end implicitly. At
the time we chose to remain compatible with such projects by always
converting library files found in implicit link directories to -lfoo
flags to ask the linker to search for them. This approach allowed ex-
isting projects to continue to build while still linking to libraries
outside implicit link directories via full path (such as those in the
build tree).
CMakvariables like CMAKE_<LANG>_FLAGS_DEBUG and only use CMakes
built-in defaults for the current compiler and platform.
The NEW behavior of this policy is to honor config-specific flag vari-
abldes like CMAKE_<LANG>_FLAGS_DEBUG.
This policy was introduced in CMake version 3.7. Unlike most policies,
CMake version 3.18.4 does not warn by default when this policy is not
set and simply uses OLD behavior. See documentation of the CMAKE_POL-
ICY_WARNING_CMP0066 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.
POLICIES INTRODUCED BY CMAKE 3.4
CMP0065
Do not add flags to export symbols from executables without the EN-
ABLE_EXPORTS target property.
CMake 3.3 and below, for historical reasons, always linked executables
on some platforms with flags like -rdynamic to export symbols from the
executables for use by any plugins they may load via dlopen. CMake 3.4
and above prefer to do this only for executables that are explicitly
marked with the ENABLE_EXPORTS target property.
The OLD behavior of this policy is to always use the additional link
flags when linking executables regardless of the value of the EN-
ABLE_EXPORTS target property.
The NEW behavior of this policy is to only use the additional link
flags when linking executables if the ENABLE_EXPORTS target property is
set to True.
This policy was introduced in CMake version 3.4. Unlike most policies,
CMake version 3.18.4 does not warn by default when this policy is not
set and simply uses OLD behavior. See documentation of the CMAKE_POL-
ICY_WARNING_CMP0065 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.
CMP0064
Recognize TEST as a operator for the if() command.
The TEST operator was added to the if() command to determine if a given
test name was created by the add_test() command.
The OLD behavior for this policy is to ignore the TEST operator. The
NEW behavior is to interpret the TEST operator.
This policy was introduced in CMake version 3.4. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
POLICIES INTRODUCED BY CMAKE 3.3
CMP0063
Honor visibility properties for all target types.
The <LANG>_VISIBILITY_PRESET and VISIBILITY_INLINES_HIDDEN target prop-
erties affect visibility of symbols during dynamic linking. When first
introduced these properties affected compilation of sources only in
shared libraries, module libraries, and executables with the ENABLE_EX-
PORTS property set. This was sufficient for the basic use cases of
shared libraries and executables with plugins. However, some sources
may be compiled as part of static libraries or object libraries and
then linked into a shared library later. CMake 3.3 and above prefer to
honor these properties for sources compiled in all target types. This
policy preserves compatibility for projects expecting the properties to
work only for some target types.
The OLD behavior for this policy is to ignore the visibility properties
for static libraries, object libraries, and executables without ex-
ports. The NEW behavior for this policy is to honor the visibility
properties for all target types.
This policy was introduced in CMake version 3.3. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0062
Disallow install() of export() result.
The export() command generates a file containing Imported Targets,
which is suitable for use from the build directory. It is not suitable
for installation because it contains absolute paths to buildsystem lo-
cations, and is particular to a single build configuration.
The install(EXPORT) generates and installs files which contain Imported
Targets. These files are generated with relative paths (unless the
user specifies absolute paths), and are designed for multi-configura-
tion use. See Creating Packages for more.
CMake 3.3 no longer allows the use of the install(FILES) command with
the result of the export() command.
The OLD behavior for this policy is to allow installing the result of
an export() command. The NEW behavior for this policy is not to allow
installing the result of an export() command.
This policy was introduced in CMake version 3.3. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0061
CTest does not by default tell make to ignore errors (-i).
The ctest_build() and build_command() commands no longer generate build
commands for Makefile Generators with the -i option. Previously this
was done to help build as much of tested projects as possible. How-
ever, this behavior is not consistent with other generators and also
causes the return code of the make tool to be meaningless.
Of course users may still add this option manually by setting
CTEST_BUILD_COMMAND or the MAKECOMMAND cache entry. See the CTest
Build Step MakeCommand setting documentation for their effects.
The OLD behavior for this policy is to add -i to make calls in CTest.
The NEW behavior for this policy is to not add -i.
This policy was introduced in CMake version 3.3. Unlike most policies,
CMake version 3.18.4 does not warn when this policy is not set and sim-
ply uses OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0060
Link libraries by full path even in implicit directories.
Policy CMP0003 was introduced with the intention of always linking li-
brary files by full path when a full path is given to the tar-
get_link_libraries() command. However, on some platforms (e.g. HP-UX)
the compiler front-end adds alternative library search paths for the
current architecture (e.g. /usr/lib/<arch> has alternatives to li-
braries in /usr/lib for the current architecture). On such platforms
the find_library() may find a library such as /usr/lib/libfoo.so that
does not belong to the current architecture.
Prior to policy CMP0003 projects would still build in such cases be-
cause the incorrect library path would be converted to -lfoo on the
link line and the linker would find the proper library in the arch-spe-
cific search path provided by the compiler front-end implicitly. At
the time we chose to remain compatible with such projects by always
converting library files found in implicit link directories to -lfoo
flags to ask the linker to search for them. This approach allowed ex-
isting projects to continue to build while still linking to libraries
outside implicit link directories via full path (such as those in the
build tree).
CMakvariables like CMAKE_<LANG>_FLAGS_DEBUG and only use CMakes
built-in defaults for the current compiler and platform.
The NEW behavior of this policy is to honor config-specific flag vari-
abldes like CMAKE_<LANG>_FLAGS_DEBUG.
This policy was introduced in CMake version 3.7. Unlike most policies,
CMake version 3.18.4 does not warn by default when this policy is not
set and simply uses OLD behavior. See documentation of the CMAKE_POL-
ICY_WARNING_CMP0066 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.
POLICIES INTRODUCED BY CMAKE 3.4
CMP0065
Do not add flags to export symbols from executables without the EN-
ABLE_EXPORTS target property.
CMake 3.3 and below, for historical reasons, always linked executables
on some platforms with flags like -rdynamic to export symbols from the
executables for use by any plugins they may load via dlopen. CMake 3.4
and above prefer to do this only for executables that are explicitly
marked with the ENABLE_EXPORTS target property.
The OLD behavior of this policy is to always use the additional link
flags when linking executables regardless of the value of the EN-
ABLE_EXPORTS target property.
The NEW behavior of this policy is to only use the additional link
flags when linking executables if the ENABLE_EXPORTS target property is
set to True.
This policy was introduced in CMake version 3.4. Unlike most policies,
CMake version 3.18.4 does not warn by default when this policy is not
set and simply uses OLD behavior. See documentation of the CMAKE_POL-
ICY_WARNING_CMP0065 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.
CMP0064
Recognize TEST as a operator for the if() command.
The TEST operator was added to the if() command to determine if a given
test name was created by the add_test() command.
The OLD behavior for this policy is to ignore the TEST operator. The
NEW behavior is to interpret the TEST operator.
This policy was introduced in CMake version 3.4. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
POLICIES INTRODUCED BY CMAKE 3.3
CMP0063
Honor visibility properties for all target types.
The <LANG>_VISIBILITY_PRESET and VISIBILITY_INLINES_HIDDEN target prop-
erties affect visibility of symbols during dynamic linking. When first
introduced these properties affected compilation of sources only in
shared libraries, module libraries, and executables with the ENABLE_EX-
PORTS property set. This was sufficient for the basic use cases of
shared libraries and executables with plugins. However, some sources
may be compiled as part of static libraries or object libraries and
then linked into a shared library later. CMake 3.3 and above prefer to
honor these properties for sources compiled in all target types. This
policy preserves compatibility for projects expecting the properties to
work only for some target types.
The OLD behavior for this policy is to ignore the visibility properties
for static libraries, object libraries, and executables without ex-
ports. The NEW behavior for this policy is to honor the visibility
properties for all target types.
This policy was introduced in CMake version 3.3. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0062
Disallow install() of export() result.
The export() command generates a file containing Imported Targets,
which is suitable for use from the build directory. It is not suitable
for installation because it contains absolute paths to buildsystem lo-
cations, and is particular to a single build configuration.
The install(EXPORT) generates and installs files which contain Imported
Targets. These files are generated with relative paths (unless the
user specifies absolute paths), and are designed for multi-configura-
tion use. See Creating Packages for more.
CMake 3.3 no longer allows the use of the install(FILES) command with
the result of the export() command.
The OLD behavior for this policy is to allow installing the result of
an export() command. The NEW behavior for this policy is not to allow
installing the result of an export() command.
This policy was introduced in CMake version 3.3. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0061
CTest does not by default tell make to ignore errors (-i).
The ctest_build() and build_command() commands no longer generate build
commands for Makefile Generators with the -i option. Previously this
was done to help build as much of tested projects as possible. How-
ever, this behavior is not consistent with other generators and also
causes the return code of the make tool to be meaningless.
Of course users may still add this option manually by setting
CTEST_BUILD_COMMAND or the MAKECOMMAND cache entry. See the CTest
Build Step MakeCommand setting documentation for their effects.
The OLD behavior for this policy is to add -i to make calls in CTest.
The NEW behavior for this policy is to not add -i.
This policy was introduced in CMake version 3.3. Unlike most policies,
CMake version 3.18.4 does not warn when this policy is not set and sim-
ply uses OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0060
Link libraries by full path even in implicit directories.
Policy CMP0003 was introduced with the intention of always linking li-
brary files by full path when a full path is given to the tar-
get_link_libraries() command. However, on some platforms (e.g. HP-UX)
the compiler front-end adds alternative library search paths for the
current architecture (e.g. /usr/lib/<arch> has alternatives to li-
braries in /usr/lib for the current architecture). On such platforms
the find_library() may find a library such as /usr/lib/libfoo.so that
does not belong to the current architecture.
Prior to policy CMP0003 projects would still build in such cases be-
cause the incorrect library path would be converted to -lfoo on the
link line and the linker would find the proper library in the arch-spe-
cific search path provided by the compiler front-end implicitly. At
the time we chose to remain compatible with such projects by always
converting library files found in implicit link directories to -lfoo
flags to ask the linker to search for them. This approach allowed ex-
isting projects to continue to build while still linking to libraries
outside implicit link directories via full path (such as those in the
build tree).
CMakvariables like CMAKE_<LANG>_FLAGS_DEBUG and only use CMakes
built-in defaults for the current compiler and platform.
The NEW behavior of this policy is to honor config-specific flag vari-
abldes like CMAKE_<LANG>_FLAGS_DEBUG.
This policy was introduced in CMake version 3.7. Unlike most policies,
CMake version 3.18.4 does not warn by default when this policy is not
set and simply uses OLD behavior. See documentation of the CMAKE_POL-
ICY_WARNING_CMP0066 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.
POLICIES INTRODUCED BY CMAKE 3.4
CMP0065
Do not add flags to export symbols from executables without the EN-
ABLE_EXPORTS target property.
CMake 3.3 and below, for historical reasons, always linked executables
on some platforms with flags like -rdynamic to export symbols from the
executables for use by any plugins they may load via dlopen. CMake 3.4
and above prefer to do this only for executables that are explicitly
marked with the ENABLE_EXPORTS target property.
The OLD behavior of this policy is to always use the additional link
flags when linking executables regardless of the value of the EN-
ABLE_EXPORTS target property.
The NEW behavior of this policy is to only use the additional link
flags when linking executables if the ENABLE_EXPORTS target property is
set to True.
This policy was introduced in CMake version 3.4. Unlike most policies,
CMake version 3.18.4 does not warn by default when this policy is not
set and simply uses OLD behavior. See documentation of the CMAKE_POL-
ICY_WARNING_CMP0065 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.
CMP0064
Recognize TEST as a operator for the if() command.
The TEST operator was added to the if() command to determine if a given
test name was created by the add_test() command.
The OLD behavior for this policy is to ignore the TEST operator. The
NEW behavior is to interpret the TEST operator.
This policy was introduced in CMake version 3.4. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
POLICIES INTRODUCED BY CMAKE 3.3
CMP0063
Honor visibility properties for all target types.
The <LANG>_VISIBILITY_PRESET and VISIBILITY_INLINES_HIDDEN target prop-
erties affect visibility of symbols during dynamic linking. When first
introduced these properties affected compilation of sources only in
shared libraries, module libraries, and executables with the ENABLE_EX-
PORTS property set. This was sufficient for the basic use cases of
shared libraries and executables with plugins. However, some sources
may be compiled as part of static libraries or object libraries and
then linked into a shared library later. CMake 3.3 and above prefer to
honor these properties for sources compiled in all target types. This
policy preserves compatibility for projects expecting the properties to
work only for some target types.
The OLD behavior for this policy is to ignore the visibility properties
for static libraries, object libraries, and executables without ex-
ports. The NEW behavior for this policy is to honor the visibility
properties for all target types.
This policy was introduced in CMake version 3.3. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0062
Disallow install() of export() result.
The export() command generates a file containing Imported Targets,
which is suitable for use from the build directory. It is not suitable
for installation because it contains absolute paths to buildsystem lo-
cations, and is particular to a single build configuration.
The install(EXPORT) generates and installs files which contain Imported
Targets. These files are generated with relative paths (unless the
user specifies absolute paths), and are designed for multi-configura-
tion use. See Creating Packages for more.
CMake 3.3 no longer allows the use of the install(FILES) command with
the result of the export() command.
The OLD behavior for this policy is to allow installing the result of
an export() command. The NEW behavior for this policy is not to allow
installing the result of an export() command.
This policy was introduced in CMake version 3.3. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0061
CTest does not by default tell make to ignore errors (-i).
The ctest_build() and build_command() commands no longer generate build
commands for Makefile Generators with the -i option. Previously this
was done to help build as much of tested projects as possible. How-
ever, this behavior is not consistent with other generators and also
causes the return code of the make tool to be meaningless.
Of course users may still add this option manually by setting
CTEST_BUILD_COMMAND or the MAKECOMMAND cache entry. See the CTest
Build Step MakeCommand setting documentation for their effects.
The OLD behavior for this policy is to add -i to make calls in CTest.
The NEW behavior for this policy is to not add -i.
This policy was introduced in CMake version 3.3. Unlike most policies,
CMake version 3.18.4 does not warn when this policy is not set and sim-
ply uses OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0060
Link libraries by full path even in implicit directories.
Policy CMP0003 was introduced with the intention of always linking li-
brary files by full path when a full path is given to the tar-
get_link_libraries() command. However, on some platforms (e.g. HP-UX)
the compiler front-end adds alternative library search paths for the
current architecture (e.g. /usr/lib/<arch> has alternatives to li-
braries in /usr/lib for the current architecture). On such platforms
the find_library() may find a library such as /usr/lib/libfoo.so that
does not belong to the current architecture.
Prior to policy CMP0003 projects would still build in such cases be-
cause the incorrect library path would be converted to -lfoo on the
link line and the linker would find the proper library in the arch-spe-
cific search path provided by the compiler front-end implicitly. At
the time we chose to remain compatible with such projects by always
converting library files found in implicit link directories to -lfoo
flags to ask the linker to search for them. This approach allowed ex-
isting projects to continue to build while still linking to libraries
outside implicit link directories via full path (such as those in the
build tree).
CMakvariables like CMAKE_<LANG>_FLAGS_DEBUG and only use CMakes
built-in defaults for the current compiler and platform.
The NEW behavior of this policy is to honor config-specific flag vari-
abldes like CMAKE_<LANG>_FLAGS_DEBUG.
This policy was introduced in CMake version 3.7. Unlike most policies,
CMake version 3.18.4 does not warn by default when this policy is not
set and simply uses OLD behavior. See documentation of the CMAKE_POL-
ICY_WARNING_CMP0066 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.
POLICIES INTRODUCED BY CMAKE 3.4
CMP0065
Do not add flags to export symbols from executables without the EN-
ABLE_EXPORTS target property.
CMake 3.3 and below, for historical reasons, always linked executables
on some platforms with flags like -rdynamic to export symbols from the
executables for use by any plugins they may load via dlopen. CMake 3.4
and above prefer to do this only for executables that are explicitly
marked with the ENABLE_EXPORTS target property.
The OLD behavior of this policy is to always use the additional link
flags when linking executables regardless of the value of the EN-
ABLE_EXPORTS target property.
The NEW behavior of this policy is to only use the additional link
flags when linking executables if the ENABLE_EXPORTS target property is
set to True.
This policy was introduced in CMake version 3.4. Unlike most policies,
CMake version 3.18.4 does not warn by default when this policy is not
set and simply uses OLD behavior. See documentation of the CMAKE_POL-
ICY_WARNING_CMP0065 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.
CMP0064
Recognize TEST as a operator for the if() command.
The TEST operator was added to the if() command to determine if a given
test name was created by the add_test() command.
The OLD behavior for this policy is to ignore the TEST operator. The
NEW behavior is to interpret the TEST operator.
This policy was introduced in CMake version 3.4. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
POLICIES INTRODUCED BY CMAKE 3.3
CMP0063
Honor visibility properties for all target types.
The <LANG>_VISIBILITY_PRESET and VISIBILITY_INLINES_HIDDEN target prop-
erties affect visibility of symbols during dynamic linking. When first
introduced these properties affected compilation of sources only in
shared libraries, module libraries, and executables with the ENABLE_EX-
PORTS property set. This was sufficient for the basic use cases of
shared libraries and executables with plugins. However, some sources
may be compiled as part of static libraries or object libraries and
then linked into a shared library later. CMake 3.3 and above prefer to
honor these properties for sources compiled in all target types. This
policy preserves compatibility for projects expecting the properties to
work only for some target types.
The OLD behavior for this policy is to ignore the visibility properties
for static libraries, object libraries, and executables without ex-
ports. The NEW behavior for this policy is to honor the visibility
properties for all target types.
This policy was introduced in CMake version 3.3. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0062
Disallow install() of export() result.
The export() command generates a file containing Imported Targets,
which is suitable for use from the build directory. It is not suitable
for installation because it contains absolute paths to buildsystem lo-
cations, and is particular to a single build configuration.
The install(EXPORT) generates and installs files which contain Imported
Targets. These files are generated with relative paths (unless the
user specifies absolute paths), and are designed for multi-configura-
tion use. See Creating Packages for more.
CMake 3.3 no longer allows the use of the install(FILES) command with
the result of the export() command.
The OLD behavior for this policy is to allow installing the result of
an export() command. The NEW behavior for this policy is not to allow
installing the result of an export() command.
This policy was introduced in CMake version 3.3. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0061
CTest does not by default tell make to ignore errors (-i).
The ctest_build() and build_command() commands no longer generate build
commands for Makefile Generators with the -i option. Previously this
was done to help build as much of tested projects as possible. How-
ever, this behavior is not consistent with other generators and also
causes the return code of the make tool to be meaningless.
Of course users may still add this option manually by setting
CTEST_BUILD_COMMAND or the MAKECOMMAND cache entry. See the CTest
Build Step MakeCommand setting documentation for their effects.
The OLD behavior for this policy is to add -i to make calls in CTest.
The NEW behavior for this policy is to not add -i.
This policy was introduced in CMake version 3.3. Unlike most policies,
CMake version 3.18.4 does not warn when this policy is not set and sim-
ply uses OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0060
Link libraries by full path even in implicit directories.
Policy CMP0003 was introduced with the intention of always linking li-
brary files by full path when a full path is given to the tar-
get_link_libraries() command. However, on some platforms (e.g. HP-UX)
the compiler front-end adds alternative library search paths for the
current architecture (e.g. /usr/lib/<arch> has alternatives to li-
braries in /usr/lib for the current architecture). On such platforms
the find_library() may find a library such as /usr/lib/libfoo.so that
does not belong to the current architecture.
Prior to policy CMP0003 projects would still build in such cases be-
cause the incorrect library path would be converted to -lfoo on the
link line and the linker would find the proper library in the arch-spe-
cific search path provided by the compiler front-end implicitly. At
the time we chose to remain compatible with such projects by always
converting library files found in implicit link directories to -lfoo
flags to ask the linker to search for them. This approach allowed ex-
isting projects to continue to build while still linking to libraries
outside implicit link directories via full path (such as those in the
build tree).
CMakvariables like CMAKE_<LANG>_FLAGS_DEBUG and only use CMakes
built-in defaults for the current compiler and platform.
The NEW behavior of this policy is to honor config-specific flag vari-
abldes like CMAKE_<LANG>_FLAGS_DEBUG.
This policy was introduced in CMake version 3.7. Unlike most policies,
CMake version 3.18.4 does not warn by default when this policy is not
set and simply uses OLD behavior. See documentation of the CMAKE_POL-
ICY_WARNING_CMP0066 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.
POLICIES INTRODUCED BY CMAKE 3.4
CMP0065
Do not add flags to export symbols from executables without the EN-
ABLE_EXPORTS target property.
CMake 3.3 and below, for historical reasons, always linked executables
on some platforms with flags like -rdynamic to export symbols from the
executables for use by any plugins they may load via dlopen. CMake 3.4
and above prefer to do this only for executables that are explicitly
marked with the ENABLE_EXPORTS target property.
The OLD behavior of this policy is to always use the additional link
flags when linking executables regardless of the value of the EN-
ABLE_EXPORTS target property.
The NEW behavior of this policy is to only use the additional link
flags when linking executables if the ENABLE_EXPORTS target property is
set to True.
This policy was introduced in CMake version 3.4. Unlike most policies,
CMake version 3.18.4 does not warn by default when this policy is not
set and simply uses OLD behavior. See documentation of the CMAKE_POL-
ICY_WARNING_CMP0065 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.
CMP0064
Recognize TEST as a operator for the if() command.
The TEST operator was added to the if() command to determine if a given
test name was created by the add_test() command.
The OLD behavior for this policy is to ignore the TEST operator. The
NEW behavior is to interpret the TEST operator.
This policy was introduced in CMake version 3.4. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
POLICIES INTRODUCED BY CMAKE 3.3
CMP0063
Honor visibility properties for all target types.
The <LANG>_VISIBILITY_PRESET and VISIBILITY_INLINES_HIDDEN target prop-
erties affect visibility of symbols during dynamic linking. When first
introduced these properties affected compilation of sources only in
shared libraries, module libraries, and executables with the ENABLE_EX-
PORTS property set. This was sufficient for the basic use cases of
shared libraries and executables with plugins. However, some sources
may be compiled as part of static libraries or object libraries and
then linked into a shared library later. CMake 3.3 and above prefer to
honor these properties for sources compiled in all target types. This
policy preserves compatibility for projects expecting the properties to
work only for some target types.
The OLD behavior for this policy is to ignore the visibility properties
for static libraries, object libraries, and executables without ex-
ports. The NEW behavior for this policy is to honor the visibility
properties for all target types.
This policy was introduced in CMake version 3.3. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0062
Disallow install() of export() result.
The export() command generates a file containing Imported Targets,
which is suitable for use from the build directory. It is not suitable
for installation because it contains absolute paths to buildsystem lo-
cations, and is particular to a single build configuration.
The install(EXPORT) generates and installs files which contain Imported
Targets. These files are generated with relative paths (unless the
user specifies absolute paths), and are designed for multi-configura-
tion use. See Creating Packages for more.
CMake 3.3 no longer allows the use of the install(FILES) command with
the result of the export() command.
The OLD behavior for this policy is to allow installing the result of
an export() command. The NEW behavior for this policy is not to allow
installing the result of an export() command.
This policy was introduced in CMake version 3.3. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0061
CTest does not by default tell make to ignore errors (-i).
The ctest_build() and build_command() commands no longer generate build
commands for Makefile Generators with the -i option. Previously this
was done to help build as much of tested projects as possible. How-
ever, this behavior is not consistent with other generators and also
causes the return code of the make tool to be meaningless.
Of course users may still add this option manually by setting
CTEST_BUILD_COMMAND or the MAKECOMMAND cache entry. See the CTest
Build Step MakeCommand setting documentation for their effects.
The OLD behavior for this policy is to add -i to make calls in CTest.
The NEW behavior for this policy is to not add -i.
This policy was introduced in CMake version 3.3. Unlike most policies,
CMake version 3.18.4 does not warn when this policy is not set and sim-
ply uses OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0060
Link libraries by full path even in implicit directories.
Policy CMP0003 was introduced with the intention of always linking li-
brary files by full path when a full path is given to the tar-
get_link_libraries() command. However, on some platforms (e.g. HP-UX)
the compiler front-end adds alternative library search paths for the
current architecture (e.g. /usr/lib/<arch> has alternatives to li-
braries in /usr/lib for the current architecture). On such platforms
the find_library() may find a library such as /usr/lib/libfoo.so that
does not belong to the current architecture.
Prior to policy CMP0003 projects would still build in such cases be-
cause the incorrect library path would be converted to -lfoo on the
link line and the linker would find the proper library in the arch-spe-
cific search path provided by the compiler front-end implicitly. At
the time we chose to remain compatible with such projects by always
converting library files found in implicit link directories to -lfoo
flags to ask the linker to search for them. This approach allowed ex-
isting projects to continue to build while still linking to libraries
outside implicit link directories via full path (such as those in the
build tree).
CMakvariables like CMAKE_<LANG>_FLAGS_DEBUG and only use CMakes
built-in defaults for the current compiler and platform.
The NEW behavior of this policy is to honor config-specific flag vari-
abldes like CMAKE_<LANG>_FLAGS_DEBUG.
This policy was introduced in CMake version 3.7. Unlike most policies,
CMake version 3.18.4 does not warn by default when this policy is not
set and simply uses OLD behavior. See documentation of the CMAKE_POL-
ICY_WARNING_CMP0066 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.
POLICIES INTRODUCED BY CMAKE 3.4
CMP0065
Do not add flags to export symbols from executables without the EN-
ABLE_EXPORTS target property.
CMake 3.3 and below, for historical reasons, always linked executables
on some platforms with flags like -rdynamic to export symbols from the
executables for use by any plugins they may load via dlopen. CMake 3.4
and above prefer to do this only for executables that are explicitly
marked with the ENABLE_EXPORTS target property.
The OLD behavior of this policy is to always use the additional link
flags when linking executables regardless of the value of the EN-
ABLE_EXPORTS target property.
The NEW behavior of this policy is to only use the additional link
flags when linking executables if the ENABLE_EXPORTS target property is
set to True.
This policy was introduced in CMake version 3.4. Unlike most policies,
CMake version 3.18.4 does not warn by default when this policy is not
set and simply uses OLD behavior. See documentation of the CMAKE_POL-
ICY_WARNING_CMP0065 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.
CMP0064
Recognize TEST as a operator for the if() command.
The TEST operator was added to the if() command to determine if a given
test name was created by the add_test() command.
The OLD behavior for this policy is to ignore the TEST operator. The
NEW behavior is to interpret the TEST operator.
This policy was introduced in CMake version 3.4. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
POLICIES INTRODUCED BY CMAKE 3.3
CMP0063
Honor visibility properties for all target types.
The <LANG>_VISIBILITY_PRESET and VISIBILITY_INLINES_HIDDEN target prop-
erties affect visibility of symbols during dynamic linking. When first
introduced these properties affected compilation of sources only in
shared libraries, module libraries, and executables with the ENABLE_EX-
PORTS property set. This was sufficient for the basic use cases of
shared libraries and executables with plugins. However, some sources
may be compiled as part of static libraries or object libraries and
then linked into a shared library later. CMake 3.3 and above prefer to
honor these properties for sources compiled in all target types. This
policy preserves compatibility for projects expecting the properties to
work only for some target types.
The OLD behavior for this policy is to ignore the visibility properties
for static libraries, object libraries, and executables without ex-
ports. The NEW behavior for this policy is to honor the visibility
properties for all target types.
This policy was introduced in CMake version 3.3. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0062
Disallow install() of export() result.
The export() command generates a file containing Imported Targets,
which is suitable for use from the build directory. It is not suitable
for installation because it contains absolute paths to buildsystem lo-
cations, and is particular to a single build configuration.
The install(EXPORT) generates and installs files which contain Imported
Targets. These files are generated with relative paths (unless the
user specifies absolute paths), and are designed for multi-configura-
tion use. See Creating Packages for more.
CMake 3.3 no longer allows the use of the install(FILES) command with
the result of the export() command.
The OLD behavior for this policy is to allow installing the result of
an export() command. The NEW behavior for this policy is not to allow
installing the result of an export() command.
This policy was introduced in CMake version 3.3. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0061
CTest does not by default tell make to ignore errors (-i).
The ctest_build() and build_command() commands no longer generate build
commands for Makefile Generators with the -i option. Previously this
was done to help build as much of tested projects as possible. How-
ever, this behavior is not consistent with other generators and also
causes the return code of the make tool to be meaningless.
Of course users may still add this option manually by setting
CTEST_BUILD_COMMAND or the MAKECOMMAND cache entry. See the CTest
Build Step MakeCommand setting documentation for their effects.
The OLD behavior for this policy is to add -i to make calls in CTest.
The NEW behavior for this policy is to not add -i.
This policy was introduced in CMake version 3.3. Unlike most policies,
CMake version 3.18.4 does not warn when this policy is not set and sim-
ply uses OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0060
Link libraries by full path even in implicit directories.
Policy CMP0003 was introduced with the intention of always linking li-
brary files by full path when a full path is given to the tar-
get_link_libraries() command. However, on some platforms (e.g. HP-UX)
the compiler front-end adds alternative library search paths for the
current architecture (e.g. /usr/lib/<arch> has alternatives to li-
braries in /usr/lib for the current architecture). On such platforms
the find_library() may find a library such as /usr/lib/libfoo.so that
does not belong to the current architecture.
Prior to policy CMP0003 projects would still build in such cases be-
cause the incorrect library path would be converted to -lfoo on the
link line and the linker would find the proper library in the arch-spe-
cific search path provided by the compiler front-end implicitly. At
the time we chose to remain compatible with such projects by always
converting library files found in implicit link directories to -lfoo
flags to ask the linker to search for them. This approach allowed ex-
isting projects to continue to build while still linking to libraries
outside implicit link directories via full path (such as those in the
build tree).
CMakvariables like CMAKE_<LANG>_FLAGS_DEBUG and only use CMakes
built-in defaults for the current compiler and platform.
The NEW behavior of this policy is to honor config-specific flag vari-
abldes like CMAKE_<LANG>_FLAGS_DEBUG.
This policy was introduced in CMake version 3.7. Unlike most policies,
CMake version 3.18.4 does not warn by default when this policy is not
set and simply uses OLD behavior. See documentation of the CMAKE_POL-
ICY_WARNING_CMP0066 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.
POLICIES INTRODUCED BY CMAKE 3.4
CMP0065
Do not add flags to export symbols from executables without the EN-
ABLE_EXPORTS target property.
CMake 3.3 and below, for historical reasons, always linked executables
on some platforms with flags like -rdynamic to export symbols from the
executables for use by any plugins they may load via dlopen. CMake 3.4
and above prefer to do this only for executables that are explicitly
marked with the ENABLE_EXPORTS target property.
The OLD behavior of this policy is to always use the additional link
flags when linking executables regardless of the value of the EN-
ABLE_EXPORTS target property.
The NEW behavior of this policy is to only use the additional link
flags when linking executables if the ENABLE_EXPORTS target property is
set to True.
This policy was introduced in CMake version 3.4. Unlike most policies,
CMake version 3.18.4 does not warn by default when this policy is not
set and simply uses OLD behavior. See documentation of the CMAKE_POL-
ICY_WARNING_CMP0065 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.
CMP0064
Recognize TEST as a operator for the if() command.
The TEST operator was added to the if() command to determine if a given
test name was created by the add_test() command.
The OLD behavior for this policy is to ignore the TEST operator. The
NEW behavior is to interpret the TEST operator.
This policy was introduced in CMake version 3.4. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
POLICIES INTRODUCED BY CMAKE 3.3
CMP0063
Honor visibility properties for all target types.
The <LANG>_VISIBILITY_PRESET and VISIBILITY_INLINES_HIDDEN target prop-
erties affect visibility of symbols during dynamic linking. When first
introduced these properties affected compilation of sources only in
shared libraries, module libraries, and executables with the ENABLE_EX-
PORTS property set. This was sufficient for the basic use cases of
shared libraries and executables with plugins. However, some sources
may be compiled as part of static libraries or object libraries and
then linked into a shared library later. CMake 3.3 and above prefer to
honor these properties for sources compiled in all target types. This
policy preserves compatibility for projects expecting the properties to
work only for some target types.
The OLD behavior for this policy is to ignore the visibility properties
for static libraries, object libraries, and executables without ex-
ports. The NEW behavior for this policy is to honor the visibility
properties for all target types.
This policy was introduced in CMake version 3.3. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0062
Disallow install() of export() result.
The export() command generates a file containing Imported Targets,
which is suitable for use from the build directory. It is not suitable
for installation because it contains absolute paths to buildsystem lo-
cations, and is particular to a single build configuration.
The install(EXPORT) generates and installs files which contain Imported
Targets. These files are generated with relative paths (unless the
user specifies absolute paths), and are designed for multi-configura-
tion use. See Creating Packages for more.
CMake 3.3 no longer allows the use of the install(FILES) command with
the result of the export() command.
The OLD behavior for this policy is to allow installing the result of
an export() command. The NEW behavior for this policy is not to allow
installing the result of an export() command.
This policy was introduced in CMake version 3.3. CMake version 3.18.4
warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0061
CTest does not by default tell make to ignore errors (-i).
The ctest_build() and build_command() commands no longer generate build
commands for Makefile Generators with the -i option. Previously this
was done to help build as much of tested projects as possible. How-
ever, this behavior is not consistent with other generators and also
causes the return code of the make tool to be meaningless.
Of course users may still add this option manually by setting
CTEST_BUILD_COMMAND or the MAKECOMMAND cache entry. See the CTest
Build Step MakeCommand setting documentation for their effects.
The OLD behavior for this policy is to add -i to make calls in CTest.
The NEW behavior for this policy is to not add -i.
This policy was introduced in CMake version 3.3. Unlike most policies,
CMake version 3.18.4 does not warn when this policy is not set and sim-
ply uses OLD behavior.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0060
Link libraries by full path even in implicit directories.
Policy CMP0003 was introduced with the intention of always linking li-
brary files by full path when a full path is given to the tar-
get_link_libraries() command. However, on some platforms (e.g. HP-UX)
the compiler front-end adds alternative library search paths for the
current architecture (e.g. /usr/lib/<arch> has alternatives to li-
braries in /usr/lib for the current architecture). On such platforms
the find_library() may find a library such as /usr/lib/libfoo.so that
does not belong to the current architecture.
Prior to policy CMP0003 projects would still build in such cases be-
cause the incorrect library path would be converted to -lfoo on the
link line and the linker would find the proper library in the arch-spe-
cific search path provided by the compiler front-end implicitly. At
the time we chose to remain compatible with such projects by always
converting library files found in implicit link directories to -lfoo
flags to ask the linker to search for them. This approach allowed ex-
isting projects to continue to build while still linking to libraries
outside implicit link directories via full path (such as those in the
build tree).
CMakvariables like CMAKE_<LANG>_FLAGS_DEBUG and only use CMakes
built-in defaults for the current compiler and platform.
The NEW behavior of this policy is to honor config-specific flag vari-
abldes like CMAKE_<LANG>_FLAGS.8.9 and higher prefer instead to use the
POSITION_INDEPENDENT_CODE target property to determine what targets
should be position independent, and new undocumented platform variables
to select flags while ignoring CMAKE_SHARED_LIBRARY_<Lang>_FLAGS com-
pletely.
The default for either approach produces identical compilation flags,
but if a project modifies CMAKE_SHARED_LIBRARY_<Lang>_FLAGS from its
original value this policy determines which approach to use.
The OLD behavior for this policy is to ignore the POSITION_INDEPEN-
DENT_CODE property for all targets and use the modified value of
CMAKE_SHARED_LIBRARY_<Lang>_FLAGS for SHARED and MODULE libraries.
The NEW behavior for this policy is to ignore CMAKE_SHARED_LI-
BRARY_<Lang>_FLAGS whether it is modified or not and honor the POSI-
TION_INDEPENDENT_CODE target property.
This policy was introduced in CMake version 2.8.9. CMake version
3.18.4 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0017
Prefer files from the CMake module directory when including from there.
Starting with CMake 2.8.4, if a cmake-module shipped with CMake (i.e.
located in the CMake module directory) calls include() or find_pack-
age(), the files located in the CMake module directory are preferred
over the files in CMAKE_MODULE_PATH. This makes sure that the modules
belonging to CMake always get those files included which they expect,
and against which they were developed and tested. In all other cases,
the files found in CMAKE_MODULE_PATH still take precedence over the
ones in the CMake module directory. The OLD behavior is to always pre-
fer files from CMAKE_MODULE_PATH over files from the CMake modules di-
rectory.
This policy was introduced in CMake version 2.8.4. CMake version
3.18.4 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0016
target_link_libraries() reports error if its only argument is not a
target.
In CMake 2.8.2 and lower the target_link_libraries() command silently
ignored if it was called with only one argument, and this argument
wasnt a valid target. In CMake 2.8.3 and above it reports an error in
this case.
This policy was introduced in CMake version 2.8.3. CMake version
3.18.4 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0015
link_directories() treats paths relative to the source dir.
In CMake 2.8.0 and lower the link_directories() command passed relative
paths unchanged to the linker. In CMake 2.8.1 and above the link_di-
rectories() command prefers to interpret relative paths with respect to
CMAKE_CURRENT_SOURCE_DIR, which is consistent with include_directo-
ries() and other commands. The OLD behavior for this policy is to use
relative paths verbatim in the linker command. The NEW behavior for
this policy is to convert relative paths to absolute paths by appending
the relative path to CMAKE_CURRENT_SOURCE_DIR.
This policy was introduced in CMake version 2.8.1. CMake version
3.18.4 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0014
Input directories must have CMakeLists.txt.
CMake versions before 2.8 silently ignored missing CMakeLists.txt files
in directories referenced by add_subdirectory() or subdirs(), treating
them as if present but empty. In CMake 2.8.0 and above this cmake_pol-
icy() determines whether or not the case is an error. The OLD behavior
for this policy is to silently ignore the problem. The NEW behavior
for this policy is to report an error.
This policy was introduced in CMake version 2.8.0. CMake version
3.18.4 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0013
Duplicate binary directories are not allowed.
CMake 2.6.3 and below silently permitted add_subdirectory() calls to
create the same binary directory multiple times. During build system
generation files would be written and then overwritten in the build
tree and could lead to strange behavior. CMake 2.6.4 and above explic-
itly detect duplicate binary directories. CMake 2.6.4 always considers
this case an error. In CMake 2.8.0 and above this policy determines
whether or not the case is an error. The OLD behavior for this policy
is to allow duplicate binary directories. The NEW behavior for this
policy is to disallow duplicate binary directories with an error.
This policy was introduced in CMake version 2.8.0. CMake version
3.18.4 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0012
if() recognizes numbers and boolean constants.
In CMake versions 2.6.4 and lower the if() command implicitly derefer-
enced arguments corresponding to variables, even those named like num-
bers or boolean constants, except for 0 and 1. Numbers and boolean
constants such as true, false, yes, no, on, off, y, n, notfound, ignore
(all case insensitive) were recognized in some cases but not all. For
example, the code if(TRUE) might have evaluated as false. Numbers such
as 2 were recognized only in boolean expressions like if(NOT 2) (lead-
ing to false) but not as a single-argument like if(2) (also leading to
false). Later versions of CMake prefer to treat numbers and boolean
constants literally, so they should not be used as variable names.
The OLD behavior for this policy is to implicitly dereference variables
named like numbers and boolean constants. The NEW behavior for this
policy is to recognize numbers and boolean constants without derefer-
encing variables with such names.
This policy was introduced in CMake version 2.8.0. CMake version
3.18.4 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
POLICIES INTRODUCED BY CMAKE 2.6
CMP0011
Included scripts do automatic cmake_policy() PUSH and POP.
In CMake 2.6.2 and below, CMake Policy settings in scripts loaded by
the include() and find_package() commands would affect the includer.
Explicit invocations of .8.9 and higher prefer instead to use the POSI-
TION_INDEPENDENT_CODE target property to determine what targets should
be position independent, and new undocumented platform variables to se-
lect flags while ignoring CMAKE_SHARED_LIBRARY_<Lang>_FLAGS completely.
The default for either approach produces identical compilation flags,
but if a project modifies CMAKE_SHARED_LIBRARY_<Lang>_FLAGS from its
original value this policy determines which approach to use.
The OLD behavior for this policy is to ignore the POSITION_INDEPEN-
DENT_CODE property for all targets and use the modified value of
CMAKE_SHARED_LIBRARY_<Lang>_FLAGS for SHARED and MODULE libraries.
The NEW behavior for this policy is to ignore CMAKE_SHARED_LI-
BRARY_<Lang>_FLAGS whether it is modified or not and honor the POSI-
TION_INDEPENDENT_CODE target property.
This policy was introduced in CMake version 2.8.9. CMake version
3.18.4 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0017
Prefer files from the CMake module directory when including from there.
Starting with CMake 2.8.4, if a cmake-module shipped with CMake (i.e.
located in the CMake module directory) calls include() or find_pack-
age(), the files located in the CMake module directory are preferred
over the files in CMAKE_MODULE_PATH. This makes sure that the modules
belonging to CMake always get those files included which they expect,
and against which they were developed and tested. In all other cases,
the files found in CMAKE_MODULE_PATH still take precedence over the
ones in the CMake module directory. The OLD behavior is to always pre-
fer files from CMAKE_MODULE_PATH over files from the CMake modules di-
rectory.
This policy was introduced in CMake version 2.8.4. CMake version
3.18.4 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0016
target_link_libraries() reports error if its only argument is not a
target.
In CMake 2.8.2 and lower the target_link_libraries() command silently
ignored if it was called with only one argument, and this argument
wasnt a valid target. In CMake 2.8.3 and above it reports an error in
this case.
This policy was introduced in CMake version 2.8.3. CMake version
3.18.4 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0015
link_directories() treats paths relative to the source dir.
In CMake 2.8.0 and lower the link_directories() command passed relative
paths unchanged to the linker. In CMake 2.8.1 and above the link_di-
rectories() command prefers to interpret relative paths with respect to
CMAKE_CURRENT_SOURCE_DIR, which is consistent with include_directo-
ries() and other commands. The OLD behavior for this policy is to use
relative paths verbatim in the linker command. The NEW behavior for
this policy is to convert relative paths to absolute paths by appending
the relative path to CMAKE_CURRENT_SOURCE_DIR.
This policy was introduced in CMake version 2.8.1. CMake version
3.18.4 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0014
Input directories must have CMakeLists.txt.
CMake versions before 2.8 silently ignored missing CMakeLists.txt files
in directories referenced by add_subdirectory() or subdirs(), treating
them as if present but empty. In CMake 2.8.0 and above this cmake_pol-
icy() determines whether or not the case is an error. The OLD behavior
for this policy is to silently ignore the problem. The NEW behavior
for this policy is to report an error.
This policy was introduced in CMake version 2.8.0. CMake version
3.18.4 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0013
Duplicate binary directories are not allowed.
CMake 2.6.3 and below silently permitted add_subdirectory() calls to
create the same binary directory multiple times. During build system
generation files would be written and then overwritten in the build
tree and could lead to strange behavior. CMake 2.6.4 and above explic-
itly detect duplicate binary directories. CMake 2.6.4 always considers
this case an error. In CMake 2.8.0 and above this policy determines
whether or not the case is an error. The OLD behavior for this policy
is to allow duplicate binary directories. The NEW behavior for this
policy is to disallow duplicate binary directories with an error.
This policy was introduced in CMake version 2.8.0. CMake version
3.18.4 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0012
if() recognizes numbers and boolean constants.
In CMake versions 2.6.4 and lower the if() command implicitly derefer-
enced arguments corresponding to variables, even those named like num-
bers or boolean constants, except for 0 and 1. Numbers and boolean
constants such as true, false, yes, no, on, off, y, n, notfound, ignore
(all case insensitive) were recognized in some cases but not all. For
example, the code if(TRUE) might have evaluated as false. Numbers such
as 2 were recognized only in boolean expressions like if(NOT 2) (lead-
ing to false) but not as a single-argument like if(2) (also leading to
false). Later versions of CMake prefer to treat numbers and boolean
constants literally, so they should not be used as variable names.
The OLD behavior for this policy is to implicitly dereference variables
named like numbers and boolean constants. The NEW behavior for this
policy is to recognize numbers and boolean constants without derefer-
encing variables with such names.
This policy was introduced in CMake version 2.8.0. CMake version
3.18.4 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
POLICIES INTRODUCED BY CMAKE 2.6
CMP0011
Included scripts do automatic cmake_policy() PUSH and POP.
In CMake 2.6.2 and below, CMake Policy settings in scripts loaded by
the include() and find_package() commands would affect the includer.
Explicit invocations of .8.9 and higher prefer instead to use the POSI-
TION_INDEPENDENT_CODE target property to determine what targets should
be position independent, and new undocumented platform variables to se-
lect flags while ignoring CMAKE_SHARED_LIBRARY_<Lang>_FLAGS completely.
The default for either approach produces identical compilation flags,
but if a project modifies CMAKE_SHARED_LIBRARY_<Lang>_FLAGS from its
original value this policy determines which approach to use.
The OLD behavior for this policy is to ignore the POSITION_INDEPEN-
DENT_CODE property for all targets and use the modified value of
CMAKE_SHARED_LIBRARY_<Lang>_FLAGS for SHARED and MODULE libraries.
The NEW behavior for this policy is to ignore CMAKE_SHARED_LI-
BRARY_<Lang>_FLAGS whether it is modified or not and honor the POSI-
TION_INDEPENDENT_CODE target property.
This policy was introduced in CMake version 2.8.9. CMake version
3.18.4 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0017
Prefer files from the CMake module directory when including from there.
Starting with CMake 2.8.4, if a cmake-module shipped with CMake (i.e.
located in the CMake module directory) calls include() or find_pack-
age(), the files located in the CMake module directory are preferred
over the files in CMAKE_MODULE_PATH. This makes sure that the modules
belonging to CMake always get those files included which they expect,
and against which they were developed and tested. In all other cases,
the files found in CMAKE_MODULE_PATH still take precedence over the
ones in the CMake module directory. The OLD behavior is to always pre-
fer files from CMAKE_MODULE_PATH over files from the CMake modules di-
rectory.
This policy was introduced in CMake version 2.8.4. CMake version
3.18.4 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0016
target_link_libraries() reports error if its only argument is not a
target.
In CMake 2.8.2 and lower the target_link_libraries() command silently
ignored if it was called with only one argument, and this argument
wasnt a valid target. In CMake 2.8.3 and above it reports an error in
this case.
This policy was introduced in CMake version 2.8.3. CMake version
3.18.4 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0015
link_directories() treats paths relative to the source dir.
In CMake 2.8.0 and lower the link_directories() command passed relative
paths unchanged to the linker. In CMake 2.8.1 and above the link_di-
rectories() command prefers to interpret relative paths with respect to
CMAKE_CURRENT_SOURCE_DIR, which is consistent with include_directo-
ries() and other commands. The OLD behavior for this policy is to use
relative paths verbatim in the linker command. The NEW behavior for
this policy is to convert relative paths to absolute paths by appending
the relative path to CMAKE_CURRENT_SOURCE_DIR.
This policy was introduced in CMake version 2.8.1. CMake version
3.18.4 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0014
Input directories must have CMakeLists.txt.
CMake versions before 2.8 silently ignored missing CMakeLists.txt files
in directories referenced by add_subdirectory() or subdirs(), treating
them as if present but empty. In CMake 2.8.0 and above this cmake_pol-
icy() determines whether or not the case is an error. The OLD behavior
for this policy is to silently ignore the problem. The NEW behavior
for this policy is to report an error.
This policy was introduced in CMake version 2.8.0. CMake version
3.18.4 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0013
Duplicate binary directories are not allowed.
CMake 2.6.3 and below silently permitted add_subdirectory() calls to
create the same binary directory multiple times. During build system
generation files would be written and then overwritten in the build
tree and could lead to strange behavior. CMake 2.6.4 and above explic-
itly detect duplicate binary directories. CMake 2.6.4 always considers
this case an error. In CMake 2.8.0 and above this policy determines
whether or not the case is an error. The OLD behavior for this policy
is to allow duplicate binary directories. The NEW behavior for this
policy is to disallow duplicate binary directories with an error.
This policy was introduced in CMake version 2.8.0. CMake version
3.18.4 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0012
if() recognizes numbers and boolean constants.
In CMake versions 2.6.4 and lower the if() command implicitly derefer-
enced arguments corresponding to variables, even those named like num-
bers or boolean constants, except for 0 and 1. Numbers and boolean
constants such as true, false, yes, no, on, off, y, n, notfound, ignore
(all case insensitive) were recognized in some cases but not all. For
example, the code if(TRUE) might have evaluated as false. Numbers such
as 2 were recognized only in boolean expressions like if(NOT 2) (lead-
ing to false) but not as a single-argument like if(2) (also leading to
false). Later versions of CMake prefer to treat numbers and boolean
constants literally, so they should not be used as variable names.
The OLD behavior for this policy is to implicitly dereference variables
named like numbers and boolean constants. The NEW behavior for this
policy is to recognize numbers and boolean constants without derefer-
encing variables with such names.
This policy was introduced in CMake version 2.8.0. CMake version
3.18.4 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
POLICIES INTRODUCED BY CMAKE 2.6
CMP0011
Included scripts do automatic cmake_policy() PUSH and POP.
In CMake 2.6.2 and below, CMake Policy settings in scripts loaded by
the include() and find_package() commands would affect the includer.
Explicit invocations of .8.9 and higher prefer instead to use the POSI-
TION_INDEPENDENT_CODE target property to determine what targets should
be position independent, and new undocumented platform variables to se-
lect flags while ignoring CMAKE_SHARED_LIBRARY_<Lang>_FLAGS completely.
The default for either approach produces identical compilation flags,
but if a project modifies CMAKE_SHARED_LIBRARY_<Lang>_FLAGS from its
original value this policy determines which approach to use.
The OLD behavior for this policy is to ignore the POSITION_INDEPEN-
DENT_CODE property for all targets and use the modified value of
CMAKE_SHARED_LIBRARY_<Lang>_FLAGS for SHARED and MODULE libraries.
The NEW behavior for this policy is to ignore CMAKE_SHARED_LI-
BRARY_<Lang>_FLAGS whether it is modified or not and honor the POSI-
TION_INDEPENDENT_CODE target property.
This policy was introduced in CMake version 2.8.9. CMake version
3.18.4 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy() command to set it to OLD or NEW explicitly.
NOTE:
The OLD behavior of a policy is deprecated by definition and may be
removed in a future version of CMake.
CMP0017
Prefer files from the CMake module directory when including from there.
Starting with CMake 2.8.4, if a cmake-module shipped with CMake (i.e.
located in the CMake module directory) calls include() or find_pack-
age(), the files located in the CMake module directory are preferred
over the files in CMAKE_MODULE_PATH. This makes sure that the modules
belonging to CMake always get those files included which they expect,
and against which the
3.18.4 September 13, 2021 CMAKE-POLICIES(7)
Czas wygenerowania: 0.00039 sek.
Created with the man page lookup class by Andrew Collington.
Based on a C man page viewer by Vadim Pavlov
Unicode soft-hyphen fix (as used by RedHat) by Dan Edwards
Some optimisations by Eli Argon
Caching idea and code contribution by James Richardson
Copyright © 2003-2025 Linux.pl
Hosted by Hosting Linux.pl