[cmake-developers] CheckSymbolExists.cmake
Rolf Eike Beer
eike at sf-mail.de
Wed Jun 5 14:57:07 EDT 2013
Christopher Sean Morrison wrote:
> On Jun 04, 2013, at 04:17 PM, Brad King <brad.king at kitware.com> wrote:
>
> > The discussion that led to that change was here:
> >
> > http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/2523/focu
> > s=2530
> The predicating problem is curious. If a pthreads library was no longer
> being detected, that would imply that CheckSymbolExists was failing, yes?
> Getting optimized out of compilation would have resulted in the check
> *passing*...
The change was two-fold: the new check for pthreads was to first try if
pthread is in the libc itself, i.e. no additional libraries need to be linked
it. If you now have a gcc that drops the symbol before linking the linking
will succeed on the first try, so FindThreads.cmake will think
pthread_create() is in libc. But in fact it is not, and if you _really_ use
the symbol you will get linker errors.
> It possible to quell that conversion warning. Perhaps something like this:
> ((char *)(long)&SYMBOL)[argc] + 1
This will cause errors on those platforms where long and void* are not the
same size, i.e. Windows64.
Eike
P.S.: please fix your mailer to properly insert quote signs as otherwise the
mail is very hard to understand.
--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20130605/0bd66b20/attachment.sig>
More information about the cmake-developers
mailing list