• 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: Propagate build settings to source files?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Propagate build settings to source files?


  • Subject: Re: Propagate build settings to source files?
  • From: Camillo Lugaresi <email@hidden>
  • Date: Sun, 8 Jan 2006 20:34:14 +0100

On 08/gen/06, at 19:18, Joachim wrote:

I use the build setting functionality (Xcode 2.2) to store version, build numbers etc in one, central place, and this information is carried over to my .plist files. Now, it would be nice if I could propagate information from the build settings to my other source files.

What I'm specifically interested in is to store an expiration timestamp in the build setting for my Development and Test build configurations so that the application will stop working on a specific date as I don't want to support these versions in the future.

Ideally, I'd like to process this information at build time so that I can include/exclude code based on #ifdef statements in my source files.

Is there a way to do this?

Add a preprocessor macro with the same name, setting its value to the corresponding shell variable. For example, if you define a custom build setting called MYVAR, you can add this to the Preprocessor Macros build setting:


MYVAR=$(MYVAR)

If the value can contain spaces, put backslash-escaped double quotes around the variable reference.

Camillo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Propagate build settings to source files?
      • From: Joachim <email@hidden>
References: 
 >Propagate build settings to source files? (From: Joachim <email@hidden>)

  • Prev by Date: Re: NSMatrix NSImageCell binding
  • Next by Date: Printing an Image View
  • Previous by thread: Propagate build settings to source files?
  • Next by thread: Re: Propagate build settings to source files?
  • Index(es):
    • Date
    • Thread