diff options
author | Brad King <brad.king@kitware.com> | 2017-02-21 16:14:03 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2017-02-21 16:14:03 (GMT) |
commit | 3ccad39000281c40e2a7a5e078adc4f977e462dd (patch) | |
tree | 76f26b234414569bc043c2e756b0c0f030e44603 /Modules | |
parent | f5d6d27168fefe3ef05bd1863c25c3e9505e4b04 (diff) | |
parent | 717e1f3056b45e79dcb433b1098e8b6fd813d07b (diff) | |
download | CMake-3ccad39000281c40e2a7a5e078adc4f977e462dd.zip CMake-3ccad39000281c40e2a7a5e078adc4f977e462dd.tar.gz CMake-3ccad39000281c40e2a7a5e078adc4f977e462dd.tar.bz2 |
Merge topic 'cmake-host-system-name'
717e1f30 Use looked up uname path for command execution
0bbd993f Make CMAKE_HOST_SYSTEM_NAME available in scripting context
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeDetermineSystem.cmake | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake index 8675553..f34ec5d 100644 --- a/Modules/CMakeDetermineSystem.cmake +++ b/Modules/CMakeDetermineSystem.cmake @@ -35,10 +35,9 @@ if(CMAKE_HOST_UNIX) find_program(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin ) 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) + exec_program(${CMAKE_UNAME} ARGS -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION) if(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|CYGWIN.*|Darwin|^GNU$") - exec_program(uname ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR + exec_program(${CMAKE_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") @@ -49,10 +48,10 @@ if(CMAKE_HOST_UNIX) exec_program(arch ARGS -s OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR RETURN_VALUE val) else() - exec_program(uname ARGS -p OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR + exec_program(${CMAKE_UNAME} ARGS -p OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR RETURN_VALUE val) if("${val}" GREATER 0) - exec_program(uname ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR + exec_program(${CMAKE_UNAME} ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR RETURN_VALUE val) endif() endif() @@ -67,7 +66,6 @@ if(CMAKE_HOST_UNIX) endif() else() if(CMAKE_HOST_WIN32) - set (CMAKE_HOST_SYSTEM_NAME "Windows") if (DEFINED ENV{PROCESSOR_ARCHITEW6432}) set (CMAKE_HOST_SYSTEM_PROCESSOR "$ENV{PROCESSOR_ARCHITEW6432}") else() |