ERR: On systems where uname does not support -p, try -m. Fixes Bug #426 - CMAKE_SYSTEM_PROCESSOR unknown and inconsistent
This commit is contained in:
parent
de30a184a2
commit
46aaf2dae8
|
@ -31,6 +31,12 @@ IF(UNIX)
|
||||||
EXEC_PROGRAM(uname ARGS -s OUTPUT_VARIABLE CMAKE_SYSTEM_NAME)
|
EXEC_PROGRAM(uname ARGS -s OUTPUT_VARIABLE CMAKE_SYSTEM_NAME)
|
||||||
EXEC_PROGRAM(uname ARGS -r OUTPUT_VARIABLE CMAKE_SYSTEM_VERSION)
|
EXEC_PROGRAM(uname ARGS -r OUTPUT_VARIABLE CMAKE_SYSTEM_VERSION)
|
||||||
EXEC_PROGRAM(uname ARGS -p OUTPUT_VARIABLE CMAKE_SYSTEM_PROCESSOR)
|
EXEC_PROGRAM(uname ARGS -p OUTPUT_VARIABLE CMAKE_SYSTEM_PROCESSOR)
|
||||||
|
IF(${CMAKE_SYSTEM_PROCESSOR} MATCHES "--help")
|
||||||
|
EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE CMAKE_SYSTEM_PROCESSOR)
|
||||||
|
ENDIF(${CMAKE_SYSTEM_PROCESSOR} MATCHES "--help")
|
||||||
|
IF(${CMAKE_SYSTEM_PROCESSOR} MATCHES "--help")
|
||||||
|
SET(CMAKE_SYSTEM_PROCESSOR "unknown")
|
||||||
|
ENDIF(${CMAKE_SYSTEM_PROCESSOR} MATCHES "--help")
|
||||||
SET(CMAKE_UNAME ${CMAKE_UNAME} CACHE INTERNAL "uname command")
|
SET(CMAKE_UNAME ${CMAKE_UNAME} CACHE INTERNAL "uname command")
|
||||||
ENDIF(CMAKE_UNAME)
|
ENDIF(CMAKE_UNAME)
|
||||||
ELSE(UNIX)
|
ELSE(UNIX)
|
||||||
|
|
Loading…
Reference in New Issue