Changing XCode settings

Hello,

I wanted to know if it was possible to change XCode parameters directly from CMake like for example the field WEAK REFERENCES IN MANUAL RETAIN RELEASE that we can see on the picture ?

I discovered the notion of XCODE_ATTRIBUTE_* but by doing for example :

set_target_properties(${CMAKE_PROJECT_NAME}
                      PROPERTIES
                      XCODE_ATTRIBUTE_WEAK_REFERENCES_IN_MANUAL_RETAIN_RELEASE YES)

I don’t change the value of this parameter so I was wondering what XCODE_ATTRIBUTE_* is for? What does it have an effect on in practice?

I’m asking this question because when loading the project in XCode, we realize that XCode introduces a lot of things by default (like flags at compile time) that we didn’t ask for, so I wanted to know if it was possible to make our XCode project be configured as much as possible as we would like from CMake.

Thanks in advance for your answers.

With

set_target_properties(${CMAKE_PROJECT_NAME}
                      PROPERTIES
                      XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_WEAK YES)

it works. Because CLANG_ENABLE_OBJC_WEAK is the attribute in the project file that it’s related to WEAK REFERENCES IN MANUAL RETAIN RELEASE. I think I understood the concept of XCODE_ATTRIBUTE_*