4
votes

I'm currently trying to use CMake to generate an Xcode project file, but I would like to undefine certain user-defined settings that CMake generates automatically when making an Xcode project. More specifically, I want to undefine WARNING_CFLAGS that CMake wants to set for my build targets in Xcode. I've tried the following in my CMakeLists.txt file:

set(CMAKE_XCODE_ATTRIBUTE_WARNING_CFLAGS "")

However, that has no effect at all. Any advice?

1

1 Answers

2
votes

Try this:

set_target_properties(<target> PROPERTIES XCODE_ATTRIBUTE_WARNING_CFLAGS "")