[cmake-developers] CheckSymbolExists.cmake

Christopher Sean Morrison brlcad at mac.com
Wed Jun 5 15:16:28 EDT 2013



On Jun 05, 2013, at 02:57 PM, Rolf Eike Beer <eike at sf-mail.de> wrote:

> 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.

Yes, uintptr_t would be ideal but we don't have access to that.  They don't need to be the same size.

If long is 32-bit, it'll just be using a truncated portion of the address, but it a) should compile, b) requires declaration to pass compilation, and c) requires the symbol to be defined to link and run.  That fits the purpose of the test while getting past GCC's pedantic point about direct type conversion.

P.S.: please fix your mailer to properly insert quote signs as otherwise the 
mail is very hard to understand.

Having to reply with a web-based mailer as I am away from my computer, and with no control over the quoting.  The delivered version displayed correctly on my end, so perhaps it's a limitation of your own reader?  Apologies either with the distraction either way.

Cheers!
Sean

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20130605/4de62d8b/attachment.html>


More information about the cmake-developers mailing list