Re: Propagate build settings to source files?
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