Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to detect the configuration?




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:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden

References: 
 >Thanks for the warm invite! (From: Fred Gaddis <email@hidden>)
 >Re: Thanks for the warm invite! (From: "Michael Crawford" <email@hidden>)
 >Re: Thanks for the warm invite! (From: Jens Alfke <email@hidden>)
 >Re: Thanks for the warm invite! (From: "Michael Crawford" <email@hidden>)
 >How to detect the configuration? (From: Richard Kennaway <email@hidden>)
 >Re: How to detect the configuration? (From: "Clark Cox" <email@hidden>)
 >Re: How to detect the configuration? (From: Brian Stern <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.