CMP0125ΒΆ
New in version 3.21.
The find_file()
, find_path()
, find_library()
and
find_program()
commands handle cache variables in the same way
regardless of whether they are defined on the command line, with or without a
type, or using the set()
command.
Starting with CMake 3.21, the find_file()
, find_path()
,
find_library()
, and find_program()
commands ensure that the
cache variables will be used in the same way regardless how they were defined
and the result will be always successful if the searched artifact exists.
The OLD
behavior for this policy is to have the find commands' behaviors
differ depending on how the cache variable is defined. The NEW
behavior for
this policy is to have consistent behavior.
This policy was introduced in CMake version 3.21. Use the
cmake_policy()
command to set it to OLD
or NEW
explicitly.
Unlike many policies, CMake version 3.21.0 does not warn when the 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.