[CMake] Specifying build architectures on Mac OS X (ppc7400 does
not work?)
Bill Hoffman
bill.hoffman at kitware.com
Tue May 15 14:22:30 EDT 2007
Sean McBride wrote:
> On 2007-05-07 11:26, Sean McBride said:
>
>
>> Has anyone tried to build a Universal Binary with the following:
>>
>> CMAKE_OSX_ARCHITECTURES:STRING=ppc7400;i386
>>
>> instead of the usual:
>>
>> CMAKE_OSX_ARCHITECTURES:STRING=ppc;i386
>>
>> If I do a 'lipo -info' on the build result it tells me "Architectures in
>> the fat file: foo.a are: ppc i386". It should say "ppc7400 i386", which
>> I do get when I build with Xcode instead of CMake.
>>
>> (ppc7400 is for the G4, which is the oldest CPU I want to target, I
>> don't care about the G3.)
>>
>> Anyone else tried this? Thanks,
>>
>
> Replying to myself... :(
>
> It seems this actually partly works. Let's say I'm building VTK. I've
> set CMAKE_OSX_ARCHITECTURES:STRING=ppc7400;i386. I do 'make' and in the
> resulting /bin directory are, amongst other files:
>
> CommonCxxTests (an executable)
> libvtkRendering.a (a static lib)
>
> If I do 'lipo -info' on each, I learn:
>
> $ lipo -info /Users/sean/kitware/VTK-pristine-bin/bin/CommonCxxTests
> Architectures in the fat file: /Users/sean/kitware/VTK-pristine-bin/bin/
> CommonCxxTests are: ppc7400 i386
>
> $ lipo -info /Users/sean/kitware/VTK-pristine-bin/bin/libvtkRendering.a
> Architectures in the fat file: /Users/sean/kitware/VTK-pristine-bin/bin/
> libvtkRendering.a are: ppc i386
>
> Very strange! It seems that for all executables it is 'ppc7400' as
> expected, but for all static libs it is 'ppc'.
>
> Any ideas why?? Thanks,
>
>
Did you try a make VERBOSE=1 to see what flags were being used during
the building of stuff to find out where it went wrong?
-Bill
More information about the CMake
mailing list