Re: Xcode-users Digest, Vol 7, Issue 51
Re: Xcode-users Digest, Vol 7, Issue 51
- Subject: Re: Xcode-users Digest, Vol 7, Issue 51
- From: Dan Spirlock <email@hidden>
- Date: Fri, 29 Jan 2010 10:00:06 -0800
> On Jan 28, 2010, at 4:34 PM, Dan Spirlock wrote:
>
>> I have a project that uses a precompiled header. I want all of my source files to use the precompiled header except for one file. I know in Visual Studio you can set precompiled header settings on a per file basis. Is this possible in Xcode? So far, I've only been able to find a way to include or exclude precompiled headers for the whole target.
>
> No, Xcode doesn't really have a facility for this. You can add compiler flags on a per-file basis but you can't generally change build settings per-file.
>
> Unfortunately the best approach is to create a Static Library target for the one file, set that target to the identical build settings of the current target except for the precompiled header, then add the target's resulting .a file to the original target.
>
> You can mass-propagate build settings with Select All / Copy / Paste, or (better yet) create .xcconfig files for the build settings shared between the two targets and have both targets Based On the same .xcconfig.
>
> Chris
>
> ------------------------------
Thank you, Chris. Your solution would definitely work, but it seems like more of a workaround than anything. Not sure if this is the right place for feature requests, but it would be great if there were at least a subset of build settings that were configurable on a per-file basis. For situations like this it is quite convenient.
Thanks again,
Dan _______________________________________________
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