New in version 3.19.
Target file component generator expressions do not add target dependencies.
The following target-based generator expressions that query for directory or file name components no longer add a dependency on the evaluated target.
In CMake 3.18 and lower a dependency on the evaluated target of the above generator expressions would always be added. CMake 3.19 and above prefer to not add this dependency. This policy provides compatibility for projects that have not been updated to expect the new behavior.
OLD behavior for this policy is to add a dependency on the evaluated
target for the above generator expressions. The
NEW behavior of
this policy is to not add a dependency on the evaluated target for the
above generator expressions.
This policy was introduced in CMake version 3.19. Unlike many policies,
CMake version 3.21.7 does not warn by default when this policy
is not set and simply uses
OLD behavior. See documentation of the
variable to control the warning.
OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.