Fix CMAKE_HOST_SYSTEM_PROCESSOR detection on GNU/Hurd (#15147)

On Debian GNU/Hurd 'uname -p' prints "unknown", so use 'uname -m'
instead.
This commit is contained in:
Felix Geyer 2014-09-10 08:55:00 -04:00 committed by Brad King
parent e03b474fa8
commit 89d7a5a417
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ if(CMAKE_HOST_UNIX)
if(CMAKE_UNAME)
exec_program(uname ARGS -s OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_NAME)
exec_program(uname ARGS -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION)
if(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|CYGWIN.*|Darwin")
if(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|CYGWIN.*|Darwin|^GNU$")
exec_program(uname ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
RETURN_VALUE val)
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin" AND