Uli's Web Site
[ Zathras.de - Uli's Web Site ]
Other Sites: Stories
Pix
Abi 2000
Stargate: Resurgence
Lost? Site Map!
 
 
     home | blog | moose | programming | articles >> blog

 Blog Topics
 
 Archive
 

15 Most Recent [RSS]

 Less work through Xcode and shell scripts
2011-12-16 @600
 
 iTunesCantComplain released
2011-10-28 @954
 
 Dennis Ritchie deceased
2011-10-13 @359
 
 Thank you, Steve.
2011-10-06 @374
 
 Cocoa Text System everywhere...
2011-03-27 @788
 
 Blog migration
2011-01-29 @520
 
 All you need to know about the Mac keyboard
2010-08-09 @488
 
 Review: Sherlock
2010-07-31 @978
 
 Playing with Objective C on Debian
2010-05-08 @456
 
 Fruit vs. Obst
2010-05-08 @439
 
 Mixed-language ambiguity
2010-04-15 @994
 
 Uli's 12:07 AM Law
2010-04-12 @881
 
 Uli's 1:24 AM Law
2010-04-12 @874
 
 Uli's 6:28 AM Law
2010-04-12 @869
 
 Uli's 3:57 PM Law
2010-04-12 @867
 

More...

Shared Precompiled Headers considered harmful

Just because we got annoyed by this at work: There's a bug in the way Xcode shares its preompiled headers that may bite you. Xcode stores its precompiled headers in a folder named /Library/Caches/SharedPrecompiledHeaders/501/ProjectName_SettingsHash/.

Now, consider you have two copies of your application checked out of your Subversion repository, the 1.0 branch and the 2.0 branch. Of course, both project files have the same name, so when you switch between projects, the precompiled headers will be from the wrong branch.

So, it's a good idea to change the precompiled headers path to something that's relative to the project, so they will be shared, but not between branches.

Thanks to Stuart for tracking this one down.

Reader Comments: (RSS Feed)
Chris Hanson writes:
It's only really a problem to share these precompiled headers if they're actually incompatible. Generally Xcode tries to be aggressive about calculating the hash of settings it uses to determine whether headers should be shared; look inside the cached precompiled header folder to see what criteria it actually used. For example, if you're using gcc 4.0, the same set of preprocessor definitions, the same precompiled header name, and the contents of your prefix files are the same, there should be no issue sharing the precompiled versions among multiple projects - even projects representing v1.0 and v2.0 of the same product. It's only if there's some criteria that should be affecting whether Xcode thinks they're the same but isn't that they shouldn't be shared. And if you've found that to be the case, please please please file a bug report and describe what that criteria is. Again, you can take a look inside the shared, precompiled prefix file to see what the hashing criteria were; it can be useful to include this information in your bug report along with the build settings that you think should be influencing sharing but aren't.
Or E-Mail Uli privately.

 
Created: 2007-06-06 @501 Last change: 2024-04-26 @437 | Home | Admin | Edit
© Copyright 2003-2024 by M. Uli Kusterer, all rights reserved.