[CMake] string(RANDOM) bug?

James Bigler jamesbigler at gmail.com
Thu Nov 5 12:02:45 EST 2009


On Thu, Nov 5, 2009 at 9:14 AM, David Cole <david.cole at kitware.com> wrote:

> Would anyone object to changing this to call srand only on the very first
> call to STRING(RANDOM in a given invocation of cmake? (Or does somebody have
> a better suggestion? Perhaps passing the seed value in as an optional
> parameter...?)
>
>
I would agree with default seeding only once at the first call.  This would
mirror how almost every other random number generator I've used.

Being able to set the seed may also be useful, and again would mirror most
RNG APIs.  However, it isn't absolutely necessary.

James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20091105/a599f86d/attachment.htm>


More information about the CMake mailing list