CMAKE_XCODE_ATTRIBUTE_... variables only have effect if set in top level CMakeLists.txt
The code in cmGlobalXCodeGenerator.cxx appears to be the only place where CMAKE_XCODE_ATTRIBUTE_...
variables are processed. Testing shows this only processes such variables that are set in the top level CMakeLists.txt file. If such a variable is set in a subdirectory, it has no effect. I encountered this because I was finding that I had to specifically set the XCODE_ATTRIBUTE_...
property on targets defined in subdirectories rather than setting a CMAKE_XCODE_ATTRIBUTE_...
variable within that subdirectory, otherwise the attribute wasn't being set on the target.
The documentation for the XCODE_ATTRIBUTE_...
target property says the following:
See the
CMAKE_XCODE_ATTRIBUTE_<an-attribute>
variable to set attributes on all targets in a directory tree.
This doesn't seem to imply any such restriction as that reported above.
This behavior is not restricted to the 3.14.0-rc4 release candidate, the same behavior exists in 3.13 too (at least).