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:
parent
e03b474fa8
commit
89d7a5a417
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue