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

Sean McBride sean at rogue-research.com
Thu Jun 11 15:41:48 EDT 2009


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




More information about the CMake mailing list