• 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
Determining deployment target at build time
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Determining deployment target at build time


  • Subject: Determining deployment target at build time
  • From: Wade Williams <email@hidden>
  • Date: Tue, 19 May 2009 12:05:33 -0500

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.

Thanks,

Wade
_______________________________________________
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


  • Follow-Ups:
    • Re: Determining deployment target at build time
      • From: Jean-Daniel Dupas <email@hidden>
  • Prev by Date: Re: gcc poison, how to catch use of strcpy()?
  • Next by Date: Xcode, SCM and External Editors - Not picking up changes?
  • Previous by thread: Re: gcc poison, how to catch use of strcpy()?
  • Next by thread: Re: Determining deployment target at build time
  • Index(es):
    • Date
    • Thread