[CMake] xcodeproj internal reference lottery
Eric Noulard
eric.noulard at gmail.com
Wed Mar 3 08:15:03 EST 2010
2010/3/3 David Cole <david.cole at kitware.com>:
> The CMake generator for Xcode simply uses object pointers as the seed for
> those hex ids: that's why they change every time you run cmake. It's also
> what makes it easy to guarantee that those ids are unique without having a
> data structure to track it.
> Re-using the same ids would be possible, but it would add complexity to the
> xcode generator, and the ids would have to be cached and tracked somehow.
> It's a fairly tall order... If you have the time to propose how to do it,
> perhaps submitting a feature request and a patch to the bug tracker, I would
> be happy to review it.
Don't know in which case Hex id are used (and I'm not an Mac OS user) but
may be it would be possible to derive those id as a simple hash function
(like http://sites.google.com/site/murmurhash/)
of something which somehow unique but invariant
like the filename + path + project name + etc...
Since this kind of function should be fast, may be you do not even
have to cache the hexid.
Theoretically there may be some collision but occurence probability
should be very low.
My 2 cents idea.
--
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
More information about the CMake
mailing list