• 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: Where can $(inherited) be used?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Where can $(inherited) be used?


  • Subject: Re: Where can $(inherited) be used?
  • From: Stonewall Ballard <email@hidden>
  • Date: Tue, 26 Jan 2010 10:07:04 -0500

On Jan 26, 2010, at 5:16 AM, Jean-Daniel Dupas wrote:

>
> Le 26 janv. 2010 à 02:13, Stonewall Ballard a écrit :
>
>>
>> On Jan 25, 2010, at 5:36 PM, Jean-Daniel Dupas wrote:
>>
>>>
>>> Le 25 janv. 2010 à 23:26, Stonewall Ballard a écrit :
>>>
>>>> I just refactored some .xcconfig files, and discovered that $(inherited) works in some places but not in others. I didn't see any documentation that even mentions $(inherited). I'd think it would be in the Xcode Build System Guide, but it isn't.
>>>>
>>>> Experimentation showed that you can't use it in a GCC_PREPROCESSOR_DEFINITIONS setting. That seems like one of the best places to use it. A work-around is to set a user-defined symbol, say COMMON_PREPROCESSOR_DEFINITIONS to the definitions used everywhere, then put $(COMMON_PREPROCESSOR_DEFINITIONS) on the downstream definitions.
>>>>
>>>> Should $(inherited) have worked for defines? Is there any doc on where it's valid?
>>>>
>>>
>>> I'm using in GCC_PREPROCESSOR_DEFINITIONS and it works fine (with Xcode 3.2 at least but I'm pretty sure I'm using for a long time).
>>
>> Do you have a snippet of a build setting that you could show me? There might be something subtle that I'm doing wrong.
>
>
>
> I don't have anything unusual.
>
> In project setting, I put
>
> GCC_PREPROCESSOR_DEFINITIONS = FOO
>
> In target setting, I put
>
> GCC_PREPROCESSOR_DEFINITIONS = $(inherited) BAR
>
> And I got "FOO BAR"
>
> <Capture d’écran 2010-01-26 à 11.15.57.png>
>
> It works too if I put some macros in an xcconfig file, and the uses $(inherited) at Project level.

Aha! I see that I was trying to inherit definitions into a .xcconfig file from one that it included. That doesn't work. It does work to use $(inherited) between the setting layers. So, I still need a user-defined setting so that my main .xcconfig file can have values that are added to by the debug and release .xcconfig files that import it, but I can use $(inherited) everywhere else.

Thanks for clearing that up!

 - Stoney

--
Stonewall Ballard
email@hidden           http://stoney.sb.org/

 _______________________________________________
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: Where can $(inherited) be used?
      • From: Scott Tooker <email@hidden>
References: 
 >Where can $(inherited) be used? (From: Stonewall Ballard <email@hidden>)
 >Re: Where can $(inherited) be used? (From: Jean-Daniel Dupas <email@hidden>)
 >Re: Where can $(inherited) be used? (From: Stonewall Ballard <email@hidden>)
 >Re: Where can $(inherited) be used? (From: Jean-Daniel Dupas <email@hidden>)

  • Prev by Date: Re: Where can $(inherited) be used?
  • Next by Date: Re: what's with the admin privilege business
  • Previous by thread: Re: Where can $(inherited) be used?
  • Next by thread: Re: Where can $(inherited) be used?
  • Index(es):
    • Date
    • Thread