Xcode: Setting GCC_PREPROCESSOR_DEFINITIONS for different build configurations?

Greg Maletic picture Greg Maletic · Oct 8, 2009 · Viewed 11.8k times · Source

I want to set GCC_PREPROCESSOR_DEFINITIONS for each of my four build configurations (Debug, Release, Ad Hoc, and Distribution.) I'd like to have a different setting for each.

The screen I'm looking at is the Target Info window's "Build" tab. When I set the Configuration pop-up to "Debug" I can see my GCC_PREPROCESSOR_DEFINITIONS setting there. When I switch to "Release," or any of the other configurations, it's no longer visible. Yet when I try to add it to those configurations, it says GCC_PREPROCESSOR_DEFINITIONS already exists, and that I can't add it again.

As I said, I want to have a different setting for my various builds. How can I accomplish this?

Thanks very much.

Answer

Cory Kilger picture Cory Kilger · Oct 8, 2009

Make sure there isn't a setting called "Preprocessor Macros". This is the same as GCC_PREPROCESSOR_DEFINITIONS.