[CMake] Specifying build architectures on Mac OS X (ppc7400
does not work?)
Sean McBride
sean at rogue-research.com
Tue May 15 15:17:14 EDT 2007
On 2007-05-15 14:22, Bill Hoffman said:
>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?
Hi Bill,
Thanks for your quick reply. I have just tried your suggestion. I
changed one vtk source file: vtkImageReslice.cxx. I did "make
VERBOSE=1". It sure is verbose. :) The relevant parts seem to be:
---------
[ 20%] Building CXX object Imaging/CMakeFiles/vtkImaging.dir/vtkImageReslice.o
/usr/bin/c++ -arch ppc7400 -arch i386 -isysroot /Developer/SDKs/
MacOSX10.4u.sdk <SNIP>
Linking CXX static library ../bin/libvtkImaging.a
cd /Users/sean/kitware/VTK-pristine-bin/Imaging && /Users/sean/kitware/
CMake-install/bin/cmake -P CMakeFiles/vtkImaging.dir/cmake_clean_target.cmake
cd /Users/sean/kitware/VTK-pristine-bin/Imaging && /Users/sean/kitware/
CMake-install/bin/cmake -E cmake_link_script CMakeFiles/vtkImaging.dir/
link.txt --verbose=1
/usr/bin/ar cr ../bin/libvtkImaging.a <SNIP> "CMakeFiles/vtkImaging.dir/
vtkImageReslice.o" <SNIP>
/usr/bin/ranlib ../bin/libvtkImaging.a
---------
It seems to be passing "-arch ppc7400" correctly. Also,
lipo -info /Users/sean/kitware/VTK-pristine-bin/Imaging/CMakeFiles/
vtkImaging.dir/vtkImageReslice.o
says:
Architectures in the fat file: /Users/sean/kitware/VTK-pristine-bin/
Imaging/CMakeFiles/vtkImaging.dir/vtkImageReslice.o are: ppc7400 i386
Good, the .o file is ok! Yet,
lipo -info /Users/sean/kitware/VTK-pristine-bin/bin/libvtkImaging.a
incorrectly gives:
Architectures in the fat file: /Users/sean/kitware/VTK-pristine-bin/bin/
libvtkImaging.a are: ppc i386
Could 'ar' or 'ranlib' have done something weird?
--
____________________________________________________________
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