CMP0160ΒΆ

Added in version 3.29.

More read-only target properties now error when trying to set them.

The set_target_properties() and set_property() commands are intended to error out on all read-only properties. However, CMake 3.28 and below only did this for the following properties:

This policy enforces the read-only nature of the following target properties:

The OLD behavior for this policy is to only error out for the properties MANUALLY_ADDED_DEPENDENCIES, NAME, and TYPE. The NEW behavior for this policy is to error out on all target properties that are documented as read-only.

This policy was introduced in CMake version 3.29. It may be set by cmake_policy() or cmake_minimum_required(). If it is not set, CMake warns, and uses OLD behavior.

Note

The OLD behavior of a policy is deprecated by definition and may be removed in a future version of CMake.