On Jun 15, 2007, at 6:58 PM, Emile Tobenfeld (a. k. a Dr. T) wrote: I've complained about this before, and it becomes more and more annoying as our product gets closer to completion.
A lot (perhaps all) or our projects. have extremely fragile precompiled headers. They do a full rebuild whenever any change is made to the project, including changes that have no effect on how the precompiled header builds.
e.g. They rebuild when: 1 I add a file (cpp, .mm. .h) to a project or enable a file in a target. 2. I switch to a different target and build it, or just switch targets and switch back 3. I add an executable to the project, or switch executables. 4. Make any change to any setting in a target info window.
and sometimes for no apparent reason.
Is there anything we can do to fix this?
Our Precompiled Headers Cache Path is set to SHARED_PRECOMPS_DIR = $(OBJROOT)/Precomps
You'll have to provide more information than just symptoms. Build transcripts would be useful, if only just of the steps that build the precompiled headers.
You are correct that 1, 2, and 3, should not cause precompiled headers to need to be rebuilt. 4. should happen when substantive changes are made, that is, a change that affects the flags sent to the compiler that control preprocessing and code generation; but not just any build setting.
Some things to check:
1) Does your prefix file #include frequently-changing project headers, or just the rarely-changing system headers? It ends up to not be worth it, in most cases, to precompile your project headers, as you spend more time rebuilding the pchs than you save in having them precompiled. Best to just have your prefix file #include only the system framework headers you're using.
2) Is OBJROOT fixed or is it different for different projects? Having precompiled headers in different locations may cause some thrashing.
3) What's your threshhold for the precompiled header cache size and aging? It could be that you're losing older precomps because the directory's getting too full, and those have to be regenerated when you need them. See the Expert Preferences for the setting to make the threshhold larger.
If you can come up with a case where you can reliably reproduce the pch rebuilding when it shouldn't have to, write a Radar bug detailing the steps and we'll respond with some commands that generate diagnostics that will help us isolate it.
Chris |