[Cmake-commits] CMake branch, next, updated. v3.8.0-rc1-276-g76fbab5
Brad King
brad.king at kitware.com
Mon Feb 20 10:50:49 EST 2017
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 76fbab5740aae8fbc9cd7566af34cc0b86909aea (commit)
via 717e1f3056b45e79dcb433b1098e8b6fd813d07b (commit)
via 0bbd993f618e4ded1d949e64ba778dfab3106262 (commit)
from 51286f98bb800640d3d39e53366e09012bffb824 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=76fbab5740aae8fbc9cd7566af34cc0b86909aea
commit 76fbab5740aae8fbc9cd7566af34cc0b86909aea
Merge: 51286f9 717e1f3
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Feb 20 10:50:48 2017 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Feb 20 10:50:48 2017 -0500
Merge topic 'cmake-host-system-name' into next
717e1f30 Use looked up uname path for command execution
0bbd993f Make CMAKE_HOST_SYSTEM_NAME available in scripting context
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=717e1f3056b45e79dcb433b1098e8b6fd813d07b
commit 717e1f3056b45e79dcb433b1098e8b6fd813d07b
Author: Gregor Jasny <gjasny at googlemail.com>
AuthorDate: Sun Feb 19 17:28:49 2017 +0100
Commit: Gregor Jasny <gjasny at googlemail.com>
CommitDate: Sun Feb 19 19:27:34 2017 +0100
Use looked up uname path for command execution
diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake
index fb1a9ed..f34ec5d 100644
--- a/Modules/CMakeDetermineSystem.cmake
+++ b/Modules/CMakeDetermineSystem.cmake
@@ -35,9 +35,9 @@
if(CMAKE_HOST_UNIX)
find_program(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin )
if(CMAKE_UNAME)
- 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")
@@ -48,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()
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0bbd993f618e4ded1d949e64ba778dfab3106262
commit 0bbd993f618e4ded1d949e64ba778dfab3106262
Author: Gregor Jasny <gjasny at googlemail.com>
AuthorDate: Mon Dec 26 16:08:51 2016 +0100
Commit: Gregor Jasny <gjasny at googlemail.com>
CommitDate: Sun Feb 19 19:27:34 2017 +0100
Make CMAKE_HOST_SYSTEM_NAME available in scripting context
diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake
index 8675553..fb1a9ed 100644
--- a/Modules/CMakeDetermineSystem.cmake
+++ b/Modules/CMakeDetermineSystem.cmake
@@ -35,7 +35,6 @@
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)
if(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|CYGWIN.*|Darwin|^GNU$")
exec_program(uname ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
@@ -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()
diff --git a/Source/cmStateSnapshot.cxx b/Source/cmStateSnapshot.cxx
index c6288a5..80e494b 100644
--- a/Source/cmStateSnapshot.cxx
+++ b/Source/cmStateSnapshot.cxx
@@ -18,6 +18,10 @@
#include "cmVersion.h"
#include "cmake.h"
+#if !defined(_WIN32)
+#include <sys/utsname.h>
+#endif
+
#if defined(__CYGWIN__)
#include "cmSystemTools.h"
#endif
@@ -298,9 +302,15 @@ void cmStateSnapshot::SetDefaultDefinitions()
#if defined(_WIN32)
this->SetDefinition("WIN32", "1");
this->SetDefinition("CMAKE_HOST_WIN32", "1");
+ this->SetDefinition("CMAKE_HOST_SYSTEM_NAME", "Windows");
#else
this->SetDefinition("UNIX", "1");
this->SetDefinition("CMAKE_HOST_UNIX", "1");
+
+ struct utsname uts_name;
+ if (uname(&uts_name) == 0) {
+ this->SetDefinition("CMAKE_HOST_SYSTEM_NAME", uts_name.sysname);
+ }
#endif
#if defined(__CYGWIN__)
std::string legacy;
diff --git a/Tests/CMakeTests/ToolchainTest.cmake.in b/Tests/CMakeTests/ToolchainTest.cmake.in
index 96e7196..ea44f42 100644
--- a/Tests/CMakeTests/ToolchainTest.cmake.in
+++ b/Tests/CMakeTests/ToolchainTest.cmake.in
@@ -48,7 +48,6 @@ set(CMAKE_SYSTEM_NAME)
set(CMAKE_SYSTEM_VERSION)
set(CMAKE_SYSTEM_PROCESSOR)
set(CMAKE_HOST_SYSTEM)
-set(CMAKE_HOST_SYSTEM_NAME)
set(CMAKE_HOST_SYSTEM_VERSION)
set(CMAKE_HOST_SYSTEM_PROCESSOR)
-----------------------------------------------------------------------
Summary of changes:
Modules/CMakeDetermineSystem.cmake | 10 ++++------
Source/cmStateSnapshot.cxx | 10 ++++++++++
Tests/CMakeTests/ToolchainTest.cmake.in | 1 -
3 files changed, 14 insertions(+), 7 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list