Re: testing build setting value in prefix file at compile time
Re: testing build setting value in prefix file at compile time
- Subject: Re: testing build setting value in prefix file at compile time
- From: James Bucanek <email@hidden>
- Date: Thu, 17 May 2007 17:23:18 -0700
Steve Caine wrote on Thursday, May 17, 2007:
>How can I set compile-time flags in a header file so they will be
>"on" in debug builds but "off" in release builds?
See the Xcode build settings "Preprocessor Macros" and "Preprocessor Macro Not Used in Precompiled Header".
In your Debug build, define a processor macro. In my projects, I define "IS_DEVELOPMENT=1".
In your Release build, either leave the macro undefined or define it as "IS_DEVELOPMENT=0".
In you code, you can then
#if IS_DEVELOPMENT
...
#endif
James Bucanek
____________________________________________________________________
Author of Beginning Xcode ISBN: 047175479X
<http://www.beginningxcode.com/>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden