• 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: Build Configuration Enhancement (Re: How to create dependent projects?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Build Configuration Enhancement (Re: How to create dependent projects?)


  • Subject: Re: Build Configuration Enhancement (Re: How to create dependent projects?)
  • From: Alastair Houghton <email@hidden>
  • Date: Wed, 22 Jul 2009 22:29:05 +0100

On 22 Jul 2009, at 13:33, Daniel Jalkut wrote:

One interesting thing that stands out as useful about this approach, is that it allows for the dependency to be built using a specific build configuration. This reminds me of a recurring interest I have in how to solve a major nuisance with project dependencies: ensuring that the dependent project's build configurations match at least in name, and hopefully in spirit as well.

As far as I can tell there is no way to explicitly specify the build configuration used for a dependent target. It will always use the current configuration of the root project, or else "Default".

Some control over the build configuration for a dependent target would be empowering. At a minimum, being able to link configuration names might be useful (e.g. map my "Debug" to dependent "Development").

But even better would be if Xcode built in some ability to override settings in the dependent target. At first, I thought a new level in the "build config cascade" would be appropriate. If the root project could define a "dynamic overrides" level that overrides even Target, it could be helpful.

I've been pondering this a bit more, since it's an interesting notion. Can't you already get some of what you're asking for using build configuration files?


For instance, your dependent project could include a .xcconfig file like this:

  // Include settings from parent project
  #include "../global.xcconfig"

and then you'd be able to control the configuration of the dependent project by editing the "global.xcconfig" file.

If you also want to be able to build the dependent projects on their own sometimes, without adding any extra features to Xcode (e.g. #if support in the .xcconfig files), you have two choices I think:

1. Put an empty "global.xcconfig" file in the folder above the one containing the project, or

2. Create separate "Standalone Release" and "Standalone Debug" configurations that don't use the "global.xcconfig" include.

If I understand you correctly, I think that should get you a fair bit of what you're asking for, right? In that your top level project can (to some extent) override settings in the dependent project. And it doesn't suffer from the problem of confusing newbies because, well, newbies don't use .xcconfig files anyway :-)

Some features that might be useful in this regard:

o The ability to use a #if to determine whether the project is being built as a dependent project or not

o The ability to #include an .xcconfig from the *top level* project rather than just the directory above.

o The ability to #include an .xcconfig from the *containing* project rather than just the directory above.

o The ability to specify a search path for .xcconfig files for subprojects (e.g. maybe you want a folder in your top level project called "config", but you don't want dependent projects to know about it)

Just some ideas... hope someone finds them useful :-)

Kind regards,

Alastair.

--
http://alastairs-place.net



_______________________________________________
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: Build Configuration Enhancement (Re: How to create dependent projects?)
      • From: Daniel Jalkut <email@hidden>
References: 
 >How to create dependent projects? (From: Jack Repenning <email@hidden>)
 >Re: How to create dependent projects? (From: John Mikros <email@hidden>)
 >Re: How to create dependent projects? (From: Chris Espinosa <email@hidden>)
 >Build Configuration Enhancement (Re: How to create dependent projects?) (From: Daniel Jalkut <email@hidden>)

  • Prev by Date: Re: Build Configuration Enhancement (Re: How to create dependent projects?)
  • Next by Date: PackageMaker 3.0.3 issue - can't get it to install anything.
  • Previous by thread: Re: Build Configuration Enhancement (Re: How to create dependent projects?)
  • Next by thread: Re: Build Configuration Enhancement (Re: How to create dependent projects?)
  • Index(es):
    • Date
    • Thread