|
Notes |
|
|
(0005828)
|
|
Bill Hoffman
|
|
2006-11-29 15:09
|
|
I think the problem is that some machines (commerical unix) do not support -m. So the code actually does this:
EXEC_PROGRAM(uname ARGS -p OUTPUT_VARIABLE CMAKE_SYSTEM_PROCESSOR
RETURN_VALUE val)
# if the uname -p failed with an error try -m
IF("${val}" GREATER 0)
EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE CMAKE_SYSTEM_PROCESSOR
RETURN_VALUE val)
ENDIF("${val}" GREATER 0)
For example on an IRIX machine I get this:
laserX 1% uname -p
mips
laserX 2% uname -m
IP35
The -p is better....
|
|
|
|
(0005829)
|
|
Didier Link
|
|
2006-11-29 16:43
|
|
Yes the -p is better for IRIX but in the posix specs this option doesn't exist !?
Maybe it's necessary to add a test case for use the -m option with posix compliant uname (like the GNU one, present on a lot of hardware ... see debian hardware compatibility for example).
What do you think about this point ?
|
|
|
|
(0005832)
|
|
Bill Hoffman
|
|
2006-11-29 20:32
|
|
|
|
|
(0005847)
|
|
Didier Link
|
|
2006-12-01 03:02
|
|
For the FreeBSD uname's command, it's the same behaviour of the Linux ones. The -p option "just" send the "commercial name" of the processor ...
I send you a patch for experiment my idea on Linux. Maybe a more in-depth work need to be done for include more unixes flavour in the test case ...
|
|
|
|
(0006505)
|
|
Bill Hoffman
|
|
2007-02-21 10:52
|
|
|