diff --git a/Help/prop_tgt/ALIASED_TARGET.rst b/Help/prop_tgt/ALIASED_TARGET.rst index f9e60348db..85e8de2435 100644 --- a/Help/prop_tgt/ALIASED_TARGET.rst +++ b/Help/prop_tgt/ALIASED_TARGET.rst @@ -1,7 +1,10 @@ ALIASED_TARGET -------------- -Name of target aliased by this target. +Read-only property containing the name of target aliased by this target. + +.. versionchanged:: 4.5 + CMake 4.4 and earlier did not enforce the read-only nature of this property. If this is an :ref:`Alias Target `, this property contains the name of the target aliased. diff --git a/Help/release/dev/alias-transparency.rst b/Help/release/dev/alias-transparency.rst index 402e42fd71..c843d7a0eb 100644 --- a/Help/release/dev/alias-transparency.rst +++ b/Help/release/dev/alias-transparency.rst @@ -4,3 +4,5 @@ alias-transparency * The :command:`set_property` and :command:`set_target_properties` commands now accept :ref:`Alias Targets`. Properties are set on the target which the alias references. + +* The :prop_tgt:`ALIASED_TARGET` target property is now read-only. diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 7f8a29d2ff..4349defefc 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -2116,6 +2116,7 @@ bool IsSettableProperty(cmMakefile* context, cmTarget* target, { "SYMBOLIC", { ROC::All } }, { "TYPE", { ROC::All } }, { "ALIAS_GLOBAL", { ROC::All, cmPolicies::CMP0160 } }, + { "ALIASED_TARGET", { ROC::All } }, { "BINARY_DIR", { ROC::All, cmPolicies::CMP0160 } }, { "CXX_MODULE_SETS", { ROC::All, cmPolicies::CMP0160 } }, { "IMPORTED", { ROC::All, cmPolicies::CMP0160 } },