[CMake] [Insight-developers] 64 bit build detection

David Cole david.cole at kitware.com
Thu Jun 11 17:25:30 EDT 2009


TRY_COMPILE works fine for cross compiles, just not for *mutiple
configs/architectures "simultaneously"* compiles...


On Thu, Jun 11, 2009 at 3:41 PM, Sean McBride <sean at rogue-research.com>wrote:

> On 6/11/09 3:00 PM, Michael Jackson said:
>
> >-- CMAKE_SIZEOF_VOID_P: 4  <============ THIS IS WRONG FOR X64 builds
>
> Yeah, but gcc on 10.5 and earlier defaults to building 32 bit.  If you
> want 64 bit you need to pass '-arch x86_64' (or ppc64).  Or in the case
> of CMake, use CMAKE_OSX_ARCHITECTURES (or whatever its called).
>
> But if you use multiple architectures, like i386 _and_ x86_64, then each
> arch can and does have a different size void*.  Now sure what CMake does
> there, hopefully warns or errors.
>
> Always best to avoid TRY_RUNs and I guess TRY_COMPILES too for Universal
> Binaries/cross compilation.
>
> --
> ____________________________________________________________
> Sean McBride, B. Eng                 sean at rogue-research.com
> Rogue Research                        www.rogue-research.com
> Mac Software Developer              Montréal, Québec, Canada
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090611/9a003e95/attachment-0001.htm>


More information about the CMake mailing list