Re: identify build style during compile?
Re: identify build style during compile?
- Subject: Re: identify build style during compile?
- From: Michael Rawdon <email@hidden>
- Date: Fri, 10 Dec 2004 16:01:12 -0800
Hi Walter -
On Dec 10, 2004, at 11:57 AM, walterw wrote:
I have a Carbon application that I'm developing in XCode and I'd like
to add code that only gets compiled for a development build.
#ifndef DEPLOYMENT_BUILD
if (internal_state_passes_tests() == false)
Debugger(); // break into debugger
#endif
Anyone know how? I've looked at the docs and can't find out how...
The easiest thing to do is probably to add a -D flag (e.g.,
-DDEPLOYMENT_BUILD) to your build style and then use #if or #ifndef
based on that preprocessor macro.
Note that if you really want it to only compile for your development
build, then you probably want to use -DDEVELOPMENT_BUILD in the
development build style rather than -DDEPLOYMENT_BUILD to your
deployment build style, since by default 'xcodebuild' builds with no
build style. Of course, if you're rigorous about always passing
-buildstyle <foo> to xcodebuild, then this doesn't matter.
-- Michael Rawdon Apple Computer, Cupertino CA
Xcode Developer email@hidden
I think we're getting to the point where we'll soon be able to imagine
that we can almost see the light at the end of the tunnel.
_______________________________________________
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