• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to detect the configuration?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

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>)

  • Prev by Date: Re: How to detect the configuration?
  • Next by Date: Re: How to detect the configuration?
  • Previous by thread: Re: How to detect the configuration?
  • Next by thread: Re: How to detect the configuration?
  • Index(es):
    • Date
    • Thread