I'm using Xcode 3.2 with xcconfig
files. The files are organized by target. For example, I have a debug.xcconfig
file and a release.xcconfig
one. Both uses common settings, so I added a shared.xcconfig
file which is included by both.
The shared.xcconfig
file looks like this:
GCC_C_LANGUAGE_STANDARD = c99
GCC_WARN_ABOUT_RETURN_TYPE = YES
GCC_WARN_UNUSED_VARIABLE = YES
GCC_PREPROCESSOR_DEFINITIONS = SOME_COMMON_DEFINITIONS
The debug.xcconfig
file looks like this:
#include "Shared.xcconfig"
GCC_OPTIMIZATION_LEVEL = 0
Now, I would like to add a DEBUG
preprocessor definition in the debug.xcconfig
file. As shown in this question, the following method is supposed to work:
GCC_PREPROCESSOR_DEFINITIONS = "$(GCC_PREPROCESSOR_DEFINITIONS) DEBUG"
This doesn't work in Xcode 3.2. The Xcode documentation also explicitly mention that modifying variables is not possible, you can only overwrite them.
How would you guys solve this problem?