[CMake] Re: [vtkusers] OSX universal binaires for VTK, cmake , ITK
Mike Jackson
mike.jackson at imts.us
Tue Jan 30 16:03:42 EST 2007
On Jan 30, 2007, at 3:54 PM, Bill Hoffman wrote:
> Mike Jackson wrote:
>> Sean will chime in pretty quick but basically since CMake uses
>> compilations to test things like endian then you run the risk of
>> creating binaries that will not work. At the moment I build each
>> type (PPC or Intel) on their respective machines then lipo them
>> together on one of the machines. This is very labor intensive to
>> do it this way but seems to be the only way to get the binaries to
>> work right.
>>
>> Sean may have more..
> VTK should be changed to support the mac universal binaries. In
> vtkConfigure.h.in this line:
> #cmakedefine VTK_WORDS_BIGENDIAN
>
> IT should be chanced to this:
>
> #ifndef __APPLE__
> # cmakedefine VTK_WORDS_BIGENDIAN
> #else
> #ifdef __BIG_ENDIAN__
> # define VTK_WORDS_BIGENDIAN
> #endif
>
> That should fix the problem, and allow for universal binaries to be
> created. The other issue is the SIZEOF stuff. Same sort of thing
> can be done with that.
>
> Basically, vtkConfigure.h.in needs to have a large ifdef __APPLE__
> section that hard codes, or otherwise sets defines to the right
> values based on built-in defines from the compiler and not the
> results of try-run tests.
>
> If someone can test this and create a patch for vtkConfigure.h.in I
> will put it in VTK.
>
> -Bill
>
So if we #ifdef special case for Apple then what about the guy on a
linux intel box trying to cross compile for Linux PPC? Would he have
the same problems? Isn't this becoming a cross compile issue?
And just what is #defining "__BIG_ENDIAN__"? GCC or something else?
Can we depend on that? What about the IBM C++ compiler? Having never
used it..
Just some random thoughts as I read this post.
--
Mike Jackson Senior Research Engineer
Innovative Management & Technology Services
More information about the vtkusers
mailing list