# Changing XCode settings

**URL:** <https://discourse.cmake.org/t/changing-xcode-settings/7085>\
**Category:** Code\
**Tags:** gen:xcode\
**Created:** [December 16, 2022, 12:51pm UTC](https://discourse.cmake.org/t/changing-xcode-settings/7085 "2022-12-16T12:51:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DrAuraHxC](https://discourse.cmake.org/user_avatar/discourse.cmake.org/draurahxc/32/2827_2.png) [@DrAuraHxC](https://discourse.cmake.org/u/DrAuraHxC)\
**Post date:** [December 16, 2022, 12:51pm UTC](https://discourse.cmake.org/t/changing-xcode-settings/7085/1 "2022-12-16T12:51:04Z")

</div>

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 :

```cmake
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.

---

<div class="post-metadata">

**Author:** ![DrAuraHxC](https://discourse.cmake.org/user_avatar/discourse.cmake.org/draurahxc/32/2827_2.png) [@DrAuraHxC](https://discourse.cmake.org/u/DrAuraHxC)\
**Post date:** [December 16, 2022, 1:41pm UTC](https://discourse.cmake.org/t/changing-xcode-settings/7085/2 "2022-12-16T13:41:32Z")

</div>

With

```cmake
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_*`
