CMP0228ΒΆ
Added in version 4.6.
File set usage requirements are evaluated for the consumer.
The INTERFACE_COMPILE_DEFINITIONS,
INTERFACE_COMPILE_OPTIONS, and
INTERFACE_INCLUDE_DIRECTORIES file set properties specify usage
requirements for compiling the sources of a file set in a consuming target.
In CMake 4.5 and below, generator expressions in these properties are
evaluated for the target that owns the file set, so that
TARGET_PROPERTY:prop reads prop from the owner rather than from
the consumer.
CMake 4.6 and above prefer to evaluate these properties for the consumer, as for other usage requirements. This policy provides compatibility with projects that have not been updated to expect the new behavior. Its setting is recorded by each target as it is created, and affects the file sets owned by that target.
The OLD behavior for this policy is to evaluate the properties for the
target that owns the file set. The NEW behavior is to evaluate them for
the consumer.
This policy was introduced in CMake version 4.6.
It may be set by cmake_policy() or cmake_minimum_required().
If it is not set, CMake does not warn, and uses OLD behavior.
Note
The OLD behavior of a policy is
deprecated by definition
and may be removed in a future version of CMake.