I\'m using Xcode and .xcconfig files. I\'m trying to append some values in the preprocessor definitions, but I simply can\'t make it work.
I tried the following (as
I think I've stumbled on a slightly better approach while trying to integrate the Cocoapods xcconfig files into my own. I like to set the following in my projects
GCC_PREPROCESSOR_DEFINITIONS = CONFIGURATION_$(CONFIGURATION)
Unfortunately this conflicts with the definitions that comes with the Pods.xcconfig. As is stated elsewhere $(inherited) doesn't work as expected. What does work is the following
GCC_PREPROCESSOR_DEFINITIONS[config=*] = CONFIGURATION_$(CONFIGURATION) $(inherited)
UPDATE:
If you need to override a setting for a particular configuration then you'd be tempted to write something like
GCC_PREPROCESSOR_DEFINITIONS[config=*] = CONFIGURATION_$(CONFIGURATION) $(inherited)
GCC_PREPROCESSOR_DEFINITIONS[config=Debug] = DEBUG=1 CONFIGURATION_$(CONFIGURATION) $(inherited)
Sadly this won't work BUT putting the second declaration into a file that only get's loaded by the Debug configuration will properly override setting.