Re: How to detect the configuration?
Re: How to detect the configuration?
- Subject: Re: How to detect the configuration?
- From: Jens Alfke <email@hidden>
- Date: Thu, 29 May 2008 11:11:15 -0700
On 29 May '08, at 10:54 AM, Brian Stern wrote:
The whole point of DEBUG/RELEASE macros is that some build
configurations #define one and the rest #define the other. It
wouldn't make sense to #define DEBUG for all the build
configurations in a project (at least not to me).
No, you can define per-project build settings that are also per-
configuration. So in the project's Build inspector you define one
macro for Debug and a different one for Release. That gets inherited
by all targets.
At this point there's too much diversity in configuration names and
developers' existing macros for us to impose this on projects
unilaterally.
I really have to disagree. The Xcode team is letting the perfect be
the enemy of the good. It would be good for the project templates
to have DEBUG/RELEASE macros that matched the Debug/Release build
configurations.
I agree with you on this; it's always an annoyance when setting up
projects.
But Chris is correct that there are multiple conventions. Unix
software tends to use an "NDEBUG" macro to test for a _non_-debug
configuration. I find this annoying ("#ifndef NDEBUG" is a double
negative that always makes me think twice) but it's quite widespread,
even in the standard C/C++ libraries. Xcode should probably set up the
project template to define this as well as RELEASE.
—Jens
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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