Dash:
[t2.git] / package / develop / cmake / uname.patch
blobb05b182de9fede647549741f373f188cc87ff6d8
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by scripts/Create-CopyPatch.
3 #
4 # T2 SDE: package/*/cmake/uname.patch
5 # Copyright (C) 2006 - 2021 The T2 SDE Project
6 #
7 # More information can be found in the files COPYING and README.
8 #
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
14 # version.
15 # --- T2-COPYRIGHT-NOTE-END ---
17 Cmake combines stderr and stdout, as T2 emmits a warning to stderr
18 we need to get rid of it.
20 NOTE: Don't remove the | cat, as cmake appends 2>&1 so it would undo it!
22 - Rene Rebe <rene@exactcode.de>
24 --- cmake-3.21.2/Modules/CMakeDetermineSystem.cmake.vanilla 2021-08-29 19:02:39.382626212 +0200
25 +++ cmake-3.21.2/Modules/CMakeDetermineSystem.cmake 2021-08-29 19:04:58.716633400 +0200
26 @@ -42,10 +42,10 @@
27 unset(_CMAKE_HOST_SYSTEM_MAJOR_VERSION)
28 unset(_CMAKE_HOST_SYSTEM_MINOR_VERSION)
29 else()
30 - exec_program(${CMAKE_UNAME} ARGS -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION)
31 + exec_program(${CMAKE_UNAME} ARGS -r 2>/dev/null | cat OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION)
32 endif()
33 if(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|CYGWIN.*|MSYS.*|^GNU$|Android")
34 - exec_program(${CMAKE_UNAME} ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
35 + exec_program(${CMAKE_UNAME} ARGS -m 2>/dev/null | cat OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
36 RETURN_VALUE val)
37 elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin")
38 # If we are running on Apple Silicon, honor CMAKE_APPLE_SILICON_PROCESSOR.
39 @@ -55,10 +55,10 @@
40 exec_program(arch ARGS -s OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
41 RETURN_VALUE val)
42 else()
43 - exec_program(${CMAKE_UNAME} ARGS -p OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
44 + exec_program(${CMAKE_UNAME} ARGS -p 2>/dev/null | cat OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
45 RETURN_VALUE val)
46 if("${val}" GREATER 0)
47 - exec_program(${CMAKE_UNAME} ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
48 + exec_program(${CMAKE_UNAME} ARGS -m 2>/dev/null | cat OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
49 RETURN_VALUE val)
50 endif()
51 endif()
52 --- cmake-3.20.0/Tests/RunCMake/ParseImplicitData/CMakeLists.txt.vanilla 2021-04-06 14:24:14.646308256 +0200
53 +++ cmake-3.20.0/Tests/RunCMake/ParseImplicitData/CMakeLists.txt 2021-04-06 14:25:00.870310641 +0200
54 @@ -21,7 +21,7 @@
56 project(gen_implicit_include_data ${LANGUAGES})
58 -set(UNAME "${CMAKE_SYSTEM_NAME}" CACHE STRING "System uname")
59 +set(UNAME "${CMAKE_SYSTEM_NAME}" 2>/dev/null CACHE STRING "System uname")
60 string(TOLOWER "${UNAME}" UNAME)
61 message("Generate input for system type: ${UNAME}")