[CMake] uname -p -> unknown

Andreas Schneider mail at cynapses.org
Fri Mar 28 11:58:53 EDT 2008


Mathieu Malaterre wrote:
> On Fri, Mar 28, 2008 at 12:16 PM, Mathieu Malaterre
> <mathieu.malaterre at gmail.com> wrote:
>> Hi
>>
>>  according to the doc of uname:
>>
>>  ...
>>    -p, --processor
>>               print the processor type or "unknown"
>>  ...
>>
>>  Well this is happening in my case:
>>
>>  $ uname -a
>>  Linux arrakis 2.6.18-4-amd64 #1 SMP Fri May 4 00:37:33 UTC 2007 x86_64 GNU/Linux
>>  $ uname -p
>>  unknown
>>  $ uname -m
>>  x86_64
>>
>>
>>  I do not know how important CMAKE_SYSTEM_PROCESSOR is, but could we
>>  switch to 'uname -m' when 'uname -p' returns 'unknown'.
> 
> Nevermind, this is fixed in CMake CVS. I could only reproduce it with
> cmake 2.4.8.
> 
> Sorry for the noise,

I guess you use it to check the plattform.

You shouldn't use CMAKE_SYSTEM_PROCESSOR to check if you have to compile for 
x86_64. If you have a 32bit chroot and want to compile your project there for 
32bit it will still report x86_64.

You should check for the pointer size of void.

if (CMAKE_SIZEOF_VOID_P MATCHES "8")


	-- andreas


-- 
http://www.cynapses.org/ - cybernetic synapses


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 257 bytes
Desc: OpenPGP digital signature
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080328/c4a0ee55/attachment-0003.pgp>


More information about the CMake mailing list