Re: Determining deployment target at build time
Re: Determining deployment target at build time
- Subject: Re: Determining deployment target at build time
- From: Jean-Daniel Dupas <email@hidden>
- Date: Tue, 19 May 2009 20:01:56 +0200
Le 19 mai 09 à 19:05, Wade Williams a écrit : I need to determine the deployment target at build time.
In short, a 10.4 header needs casts when its functions are called, while the same header under 10.5 does not. (OSAtomic.h)
To allow our code to build on either system, we like to do something like
#if MACOS_X_DEPLOYMENT_TARGET == "10.4" //use casted version #else //use non-casted version #endif
but obviously you can't do that with the C preprocessor.
Is there another variable which is numeric we can use? I've looked at Availability.h, but unless I'm misunderstanding, I don't think it helps us determine which SDK is being used to build.
I'm not sure it's possible to find a single header in the System's frameworks that does not use this kind of macros.
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
See /usr/include/AvailabilityMacros.h for details.
|
_______________________________________________
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