Re: TargetConditionals.h + llvm + iphone or Mac conditionals
Re: TargetConditionals.h + llvm + iphone or Mac conditionals
- Subject: Re: TargetConditionals.h + llvm + iphone or Mac conditionals
- From: Jens Alfke <email@hidden>
- Date: Fri, 24 Jun 2011 11:47:28 -0700
On Jun 24, 2011, at 11:36 AM, David Hoerl wrote:
> I need to conditionally compile some code based on whether its targetted to the iPhone or the Mac. iPhone should work on both the device and the simulator.
I use TARGET_OS_IPHONE and TARGET_IPHONE_SIMULATOR for that, and haven’t had any trouble with different compilers.
> There use to be this file TargetConditionals.h with a bunch of conditionals, but its only useful for GCC.
The header comment says:
Note: TargetConditionals.h in 3.4 Universal Interfaces works
with all compilers. This header only recognizes compilers
known to run on Mac OS X.
It’s true that the definitions are wrapped in an #ifdef that checks __GNUC__, but I suspect that flag is defined even under Clang/LLVM since it supports the GNU language extensions.
—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