• 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: Setting Conditionals in Targets
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting Conditionals in Targets


  • Subject: Re: Setting Conditionals in Targets
  • From: "Glenn L. Austin" <email@hidden>
  • Date: Thu, 21 Oct 2010 15:50:48 -0700

I use target-specific defines all of the time.

Double-click on the target and add the new defines to Preprocessor Macros. That is probably the easiest way to do this.

On Oct 21, 2010, at 12:46 PM, Gordon Apple wrote:

> Actually, the former did work when I tried it again.
>
> One more question.  Is there a way to do this at the target level?  I tried
> User-defined settings, to no avail.  Or is there simply a way to detect
> which target is being used, that can be used for conditional compiles
> throughout the project?
>
>
> On 10/20/10 9:14 PM, "Glenn L. Austin" <email@hidden> wrote:
>
>> You probably want -Dxyz to be able to use #ifdef xyz.
>>
>> Personally, I'd use -Dxyz=1 so I could use #if xyz.
>>
>> On Oct 20, 2010, at 7:02 PM, Gordon Apple wrote:
>>
>>> After some more research, I did find that you can supposedly select a file,
>>> click Info, and set compiler flags for a target.  However, I could not get
>>> it to work.  I added "-xyz". (Don't ask me what the "-" is for.  it won't
>>> compile without it.)  But if I put an "#ifdef xyz" into the code, it ignores
>>> it.  So I'm still doing something wrong.
>>
>
>
>
> _______________________________________________
> 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

 _______________________________________________
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

References: 
 >Re: Setting Conditionals in Targets (From: Gordon Apple <email@hidden>)

  • Prev by Date: Re: Setting Conditionals in Targets
  • Next by Date: help! cc1obj: error: one or more PCH files were found, but they were invalid
  • Previous by thread: Re: Setting Conditionals in Targets
  • Next by thread: Re: Setting Conditionals in Targets
  • Index(es):
    • Date
    • Thread