[CMake] Re: [vtkusers] OSX universal binaires for VTK, cmake , ITK

Bill Hoffman bill.hoffman at kitware.com
Tue Jan 30 16:48:11 EST 2007


Mike Jackson wrote:
>
> 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?
>
The Mac is a popular platform, and there is a relatively clean  way to 
fix the problem.  There will be no general purpose way of doing this.   
You will have to figure out endian'ness from some define, or hard code 
it in the cmake cache.  For the linux person, if they use a 
-DVTK_BIG_ENDIAN=XXX when they run cmake it should have the same effect.
> 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..
>
This is defined by apple and it is recommended by Apple to solve this 
problem. So, in the case of apple we can make it just work without 
having to give cmake any special cache variables or -D options. 

http://developer.apple.com/documentation/MacOSX/Conceptual/universal_binary/universal_binary_compiling/chapter_2_section_7.html


-Bill




More information about the vtkusers mailing list