Re: Define default header include per cpp file
Re: Define default header include per cpp file
- Subject: Re: Define default header include per cpp file
- From: Greg Guerin <email@hidden>
- Date: Thu, 27 Sep 2007 14:44:36 -0700
Olivier Tristan wrote:
>My question was on a per file basis, which might not be possible in xcode...
>
>I just want specific cpp file to have this include.
Sorry, I misunderstood what you meant by "per cpp file".
Two ideas:
a) IIRC, PCH can differ per target. So compile files with the same PCH
under one target, and others with another PCH under another target. Change
which header is used by moving a src file between targets.
b) add "#include "MyCommonInclude" to each file. If it's for a zillion
files, write a script that adds it for you. In bash, it's for + cat + mv.
I think it's a little odd to be putting per-file includes anywhere except
in the source itself. Either the included file is a common preface that
should apply to all files, or at least a large number of tiles, in which
case I'd use PCH, or it's different for each source file, in which case it
should be in the source file.
Having lots of per-file build metadata stuffed into Xcode settings just
doesn't seem like a good idea to me. If the Xcode project file breaks, all
the carefully built-up per-file build metadata goes with it, and it becomes
a real nightmare to reconstruct it.
-- GG
_______________________________________________
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