diff options
author | Brad King <brad.king@kitware.com> | 2014-01-21 13:51:36 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-01-21 13:51:36 (GMT) |
commit | ceecda12531385d81a4cf23d21d91ae15f9fa380 (patch) | |
tree | f27fbd214d7b0878c447a5e21d94e24e25e7087f | |
parent | 1eb4d035c0594fb653cdd79c3a523c24e74af1b8 (diff) | |
parent | 9d2a0900ed48eb4ae2df0e7672b9ede5af28e193 (diff) | |
download | CMake-ceecda12531385d81a4cf23d21d91ae15f9fa380.zip CMake-ceecda12531385d81a4cf23d21d91ae15f9fa380.tar.gz CMake-ceecda12531385d81a4cf23d21d91ae15f9fa380.tar.bz2 |
Merge topic 'osx-host-arch'
9d2a0900 OS X: Use 'uname -m' for processor (#14712)
-rw-r--r-- | Modules/CMakeDetermineSystem.cmake | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake index 7756273..f1bad99 100644 --- a/Modules/CMakeDetermineSystem.cmake +++ b/Modules/CMakeDetermineSystem.cmake @@ -47,9 +47,14 @@ 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.*") + if(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|CYGWIN.*|Darwin") exec_program(uname ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR RETURN_VALUE val) + if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin" AND + CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "Power Macintosh") + # OS X ppc 'uname -m' may report 'Power Macintosh' instead of 'powerpc' + set(CMAKE_HOST_SYSTEM_PROCESSOR "powerpc") + endif() elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "OpenBSD") exec_program(arch ARGS -s OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR RETURN_VALUE val) |