[CMake] xcodeproj internal reference lottery

David Cole david.cole at kitware.com
Wed Mar 3 11:11:27 EST 2010


On Wed, Mar 3, 2010 at 8:15 AM, Eric Noulard <eric.noulard at gmail.com> wrote:

> 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.
>
>
All good ideas...

I do not have time or funding to work on these ideas in any sort of near
term time frame...

Patches are welcome.


David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100303/f82321aa/attachment.htm>


More information about the CMake mailing list