[CMake] CMake 2.8rc2 and "CHECK_TYPE_SIZE found different results" error

Sean McBride sean at rogue-research.com
Fri Oct 2 13:30:25 EDT 2009


Hi all,

I've just tried building VTK with 2.8rc1 and it gives an error:

-- Check size of long
CMake Error at /Applications/CMake 2.8-0.app/Contents/share/cmake-2.8/
Modules/CheckTypeSize.cmake:102 (MESSAGE):
  CHECK_TYPE_SIZE found different results, consider setting
  CMAKE_OSX_ARCHITECTURES or CMAKE_TRY_COMPILE_OSX_ARCHITECTURES to one or no
  architecture !
Call Stack (most recent call first):
  CMake/CMakeBackwardCompatibilityC.cmake:14 (CHECK_TYPE_SIZE)
  CMakeLists.txt:403 (INCLUDE)

I don't recall this happening in earlier versions.

Indeed I have set CMAKE_OSX_ARCHITECTURES to "i386;x86_64" and this
error does go away if I use only one arch.  It is also correct that
'long' has a different size between those 2 architectures. 
Nevertheless, I want/need to build VTK in both architectures.

What is the correct fix here?  I guess it's VTK that needs to change?

Thanks,

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