[CMake] Bug in Darwin CMAKE_SYSTEM_PROCESSOR

Sean McBride sean at rogue-research.com
Tue Feb 23 10:05:41 EST 2010


On 2/23/10 10:10 AM, Luis Kornblueh said:

>for me it looks like a small bug in determining the processor type
>in Darwin (MacOSX):
>
>uname -m returns always i386 despite of the processor used

No, it can also return ppc or arm, depending.

>uname -p returns on a laptop (Core2duo) running 10.5.x i386
>       (32bit kernel)
>
>uname -p returns on a MacPro (Nehalem)  running 10.6.x x86_64
>       (64bit kernel)
>
>It seems that cmake_system_processor is using for Darwin uname -m 
>instead of uname -p.
>
>I checked as well config.guess, which returns the uname -p results
>(more or less ;-) - i686 instead of i386).
>
>I think, it would be nice, to fix this.

There was a large discussion about uname's output some months ago...
here it is:
<http://lists.apple.com/archives/Darwin-dev/2009/Aug/msg00211.html>

As for changing CMake's current behaviour.... that would all depend
_why_ CMake wants to know the cpu type.  Another technique could be to
use sysctlbyname().  For example:
<http://github.com/tcurdt/feedbackreporter/blob/master/Sources/Main/
FRSystemProfile.m>

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