Re: Deriving Buildsettings
Re: Deriving Buildsettings
- Subject: Re: Deriving Buildsettings
- From: James Bucanek <email@hidden>
- Date: Sun, 16 Oct 2005 08:04:02 -0700
Andreas Grosam wrote on Sunday, October 16, 2005:
>Is this possible (or suoposed to work):
>
>Suppose, in the project settings i have set these build settings, say
>
>Header Search Path = /op/local
>Other Warning Flags = -Wall
>
>
>Is it now possible to _derive_ (as opposed to override) a *target*
>build setting, e.g. using:
>
>Header Search = $(HEADER_SEARCH_PATHS) /my/other/path
>Other Warning Flags = $(WARNING_CFLAGS) -Wno-non-virtual-dtor
Absolutely. This is explained in detail in the Xcode build settings documention. In short, if the value of your build settings contains a self-referential macro, the value of that macro will be obtained by looking for the same build setting in a _lower_ layer of build settings. The short list of build setting layers are:
Command-line (when using xcodebuild) <-- top layer
Target
Project
Environment <-- bottom layer
So a target can reference the same build setting in a project or environment layer, and the project can reference the value of a environment setting.
Settings can also reference a different build setting in any layer. For example, a new project build setting of MY_NEW_SETTING=My product name is $(PRODUCT_NAME) will change whenever the target changes, becuase the value of PRODUCT_NAME changes with the target.
--
James Bucanek
_______________________________________________
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