Include new upstream patches
This commit is contained in:
parent
c12643cb55
commit
b8b1ab716d
@ -1,7 +1,7 @@
|
||||
From 80df7b174506eb5c7d9db3e65e2ffb59b9e8f16d Mon Sep 17 00:00:00 2001
|
||||
From: Orkun Tokdemir <ilhanorkuntokdemir@gmail.com>
|
||||
Date: Mon, 25 Sep 2023 14:50:59 +0200
|
||||
Subject: [PATCH] Linting: Fix empty evaluated genex
|
||||
Subject: [PATCH 1/6] Linting: Fix empty evaluated genex
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
59
0002-Android-Require-Clang-18-for-std-c-23.patch
Normal file
59
0002-Android-Require-Clang-18-for-std-c-23.patch
Normal file
@ -0,0 +1,59 @@
|
||||
From 75e9918a669666b16e7819b384c50858ea9d868b Mon Sep 17 00:00:00 2001
|
||||
From: Brad King <brad.king@kitware.com>
|
||||
Date: Wed, 27 Sep 2023 12:15:27 -0400
|
||||
Subject: [PATCH 2/6] Android: Require Clang 18 for -std=c++23
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Update the Clang version checks added by
|
||||
|
||||
* commit eacacc70fc (Clang: use -std=c++23 for Clang 17.0+,
|
||||
2023-05-08, v3.27.0-rc1~115^2)
|
||||
* commit 0183956d30 (Clang: C++26 support,
|
||||
2023-05-16, v3.27.0-rc1~85^2)
|
||||
|
||||
to account for Android NDK r26's distribution of a Clang based on a
|
||||
development version of LLVM/Clang 17.0 that pre-dated addition of
|
||||
these flags.
|
||||
|
||||
Follow the pattern from commit 12e6796b62 (Android: Do not pass
|
||||
non-existent Clang -std flags, 2018-04-02, v3.12.0-rc1~284^2),
|
||||
which fixed the same problem for `-std=c++17`.
|
||||
|
||||
Fixes: #25281
|
||||
Signed-off-by: Björn Esser <besser82@fedoraproject.org>
|
||||
---
|
||||
Modules/Compiler/Clang.cmake | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Modules/Compiler/Clang.cmake b/Modules/Compiler/Clang.cmake
|
||||
index 46f5fc1941..e5683c2c03 100644
|
||||
--- a/Modules/Compiler/Clang.cmake
|
||||
+++ b/Modules/Compiler/Clang.cmake
|
||||
@@ -173,7 +173,12 @@ macro(__compiler_clang_cxx_standards lang)
|
||||
|
||||
unset(_clang_version_std17)
|
||||
|
||||
- if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 17.0)
|
||||
+ set(_clang_version_std23 17.0)
|
||||
+ if(CMAKE_SYSTEM_NAME STREQUAL "Android")
|
||||
+ set(_clang_version_std23 18.0)
|
||||
+ endif()
|
||||
+
|
||||
+ if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS "${_clang_version_std23}")
|
||||
set(CMAKE_${lang}23_STANDARD_COMPILE_OPTION "-std=c++23")
|
||||
set(CMAKE_${lang}23_EXTENSION_COMPILE_OPTION "-std=gnu++23")
|
||||
set(CMAKE_${lang}26_STANDARD_COMPILE_OPTION "-std=c++26")
|
||||
@@ -183,6 +188,8 @@ macro(__compiler_clang_cxx_standards lang)
|
||||
set(CMAKE_${lang}23_EXTENSION_COMPILE_OPTION "-std=gnu++2b")
|
||||
endif()
|
||||
|
||||
+ unset(_clang_version_std23)
|
||||
+
|
||||
if("x${CMAKE_${lang}_SIMULATE_ID}" STREQUAL "xMSVC")
|
||||
# The MSVC standard library requires C++14, and MSVC itself has no
|
||||
# notion of operating in a mode not aware of at least that standard.
|
||||
--
|
||||
2.41.0
|
||||
|
43
0003-Tests-Clarify-RunCMake.CTestTimeout-case-name.patch
Normal file
43
0003-Tests-Clarify-RunCMake.CTestTimeout-case-name.patch
Normal file
@ -0,0 +1,43 @@
|
||||
From dd779a4bc2f1b845a03b00885cd33ed2cc8adac3 Mon Sep 17 00:00:00 2001
|
||||
From: Brad King <brad.king@kitware.com>
|
||||
Date: Fri, 29 Sep 2023 08:54:51 -0400
|
||||
Subject: [PATCH 3/6] Tests: Clarify RunCMake.CTestTimeout case name
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Björn Esser <besser82@fedoraproject.org>
|
||||
---
|
||||
...erridesScript-stdout.txt => PropertyOverridesVar-stdout.txt} | 2 +-
|
||||
Tests/RunCMake/CTestTimeout/RunCMakeTest.cmake | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
rename Tests/RunCMake/CTestTimeout/{PropertyOverridesScript-stdout.txt => PropertyOverridesVar-stdout.txt} (72%)
|
||||
|
||||
diff --git a/Tests/RunCMake/CTestTimeout/PropertyOverridesScript-stdout.txt b/Tests/RunCMake/CTestTimeout/PropertyOverridesVar-stdout.txt
|
||||
similarity index 72%
|
||||
rename from Tests/RunCMake/CTestTimeout/PropertyOverridesScript-stdout.txt
|
||||
rename to Tests/RunCMake/CTestTimeout/PropertyOverridesVar-stdout.txt
|
||||
index 6e46485759..aeeb3c9c39 100644
|
||||
--- a/Tests/RunCMake/CTestTimeout/PropertyOverridesScript-stdout.txt
|
||||
+++ b/Tests/RunCMake/CTestTimeout/PropertyOverridesVar-stdout.txt
|
||||
@@ -1,5 +1,5 @@
|
||||
Test project [^
|
||||
-]*/Tests/RunCMake/CTestTimeout/PropertyOverridesScript-build
|
||||
+]*/Tests/RunCMake/CTestTimeout/PropertyOverridesVar-build
|
||||
Start 1: TestTimeout
|
||||
1/1 Test #1: TestTimeout ...................... Passed +[1-9][0-9.]* sec
|
||||
+
|
||||
diff --git a/Tests/RunCMake/CTestTimeout/RunCMakeTest.cmake b/Tests/RunCMake/CTestTimeout/RunCMakeTest.cmake
|
||||
index 2f9eda121d..e9ecc5f20d 100644
|
||||
--- a/Tests/RunCMake/CTestTimeout/RunCMakeTest.cmake
|
||||
+++ b/Tests/RunCMake/CTestTimeout/RunCMakeTest.cmake
|
||||
@@ -92,5 +92,5 @@ block()
|
||||
set(TIMEOUT 4)
|
||||
set(CASE_TEST_PREFIX_CODE "set(CTEST_TEST_TIMEOUT 2)")
|
||||
set(CASE_CMAKELISTS_SUFFIX_CODE "set_property(TEST TestTimeout PROPERTY TIMEOUT 10)\n")
|
||||
- run_ctest_timeout(PropertyOverridesScript)
|
||||
+ run_ctest_timeout(PropertyOverridesVar)
|
||||
endblock()
|
||||
--
|
||||
2.41.0
|
||||
|
@ -0,0 +1,93 @@
|
||||
From d267c128a232e9beb99576f901ee1b9291ba1480 Mon Sep 17 00:00:00 2001
|
||||
From: Brad King <brad.king@kitware.com>
|
||||
Date: Fri, 29 Sep 2023 09:00:30 -0400
|
||||
Subject: [PATCH 4/6] ctest: Restore support for --timeout values higher than
|
||||
default test timeout
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Since refactoring in commit 0a5aeaf302 (cmCTestRunTest: Consolidate test
|
||||
timeout selection logic, 2023-05-04, v3.27.0-rc1~120^2) we accidentally
|
||||
truncate `--timeout` values to ctest's default `TimeOut`. Fix the
|
||||
logic to prefer the flag whenever the `TIMEOUT` property is not set.
|
||||
|
||||
In combination with the prior refactoring, this also fixes a bug that
|
||||
caused `--timeout` values of 10000000 seconds or more to be ignored.
|
||||
|
||||
Fixes: #23979
|
||||
Signed-off-by: Björn Esser <besser82@fedoraproject.org>
|
||||
---
|
||||
Help/manual/ctest.1.rst | 3 ++-
|
||||
Source/CTest/cmCTestRunTest.cxx | 11 ++++++-----
|
||||
.../RunCMake/CTestTimeout/FlagOverridesVar-stdout.txt | 6 ++++++
|
||||
Tests/RunCMake/CTestTimeout/RunCMakeTest.cmake | 7 +++++++
|
||||
4 files changed, 21 insertions(+), 6 deletions(-)
|
||||
create mode 100644 Tests/RunCMake/CTestTimeout/FlagOverridesVar-stdout.txt
|
||||
|
||||
diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst
|
||||
index 994ae47b77..5c3889e3be 100644
|
||||
--- a/Help/manual/ctest.1.rst
|
||||
+++ b/Help/manual/ctest.1.rst
|
||||
@@ -1230,7 +1230,8 @@ Configuration settings include:
|
||||
|
||||
``TimeOut``
|
||||
The default timeout for each test if not specified by the
|
||||
- :prop_test:`TIMEOUT` test property.
|
||||
+ :prop_test:`TIMEOUT` test property or the
|
||||
+ :option:`--timeout <ctest --timeout>` flag.
|
||||
|
||||
* `CTest Script`_ variable: :variable:`CTEST_TEST_TIMEOUT`
|
||||
* :module:`CTest` module variable: ``DART_TESTING_TIMEOUT``
|
||||
diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx
|
||||
index 563439acda..19e505fcfe 100644
|
||||
--- a/Source/CTest/cmCTestRunTest.cxx
|
||||
+++ b/Source/CTest/cmCTestRunTest.cxx
|
||||
@@ -768,11 +768,12 @@ bool cmCTestRunTest::ForkProcess()
|
||||
timeout = this->CTest->GetGlobalTimeout();
|
||||
}
|
||||
|
||||
- // Check CTEST_TEST_TIMEOUT.
|
||||
- cmDuration ctestTestTimeout = this->CTest->GetTimeOut();
|
||||
- if (ctestTestTimeout > cmDuration::zero() &&
|
||||
- (!timeout || ctestTestTimeout < *timeout)) {
|
||||
- timeout = ctestTestTimeout;
|
||||
+ if (!timeout) {
|
||||
+ // Check CTEST_TEST_TIMEOUT.
|
||||
+ cmDuration ctestTestTimeout = this->CTest->GetTimeOut();
|
||||
+ if (ctestTestTimeout > cmDuration::zero()) {
|
||||
+ timeout = ctestTestTimeout;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/Tests/RunCMake/CTestTimeout/FlagOverridesVar-stdout.txt b/Tests/RunCMake/CTestTimeout/FlagOverridesVar-stdout.txt
|
||||
new file mode 100644
|
||||
index 0000000000..f580871638
|
||||
--- /dev/null
|
||||
+++ b/Tests/RunCMake/CTestTimeout/FlagOverridesVar-stdout.txt
|
||||
@@ -0,0 +1,6 @@
|
||||
+Test project [^
|
||||
+]*/Tests/RunCMake/CTestTimeout/FlagOverridesVar-build
|
||||
+ Start 1: TestTimeout
|
||||
+1/1 Test #1: TestTimeout ...................... Passed +[1-9][0-9.]* sec
|
||||
++
|
||||
+100% tests passed, 0 tests failed out of 1
|
||||
diff --git a/Tests/RunCMake/CTestTimeout/RunCMakeTest.cmake b/Tests/RunCMake/CTestTimeout/RunCMakeTest.cmake
|
||||
index e9ecc5f20d..470bbd890d 100644
|
||||
--- a/Tests/RunCMake/CTestTimeout/RunCMakeTest.cmake
|
||||
+++ b/Tests/RunCMake/CTestTimeout/RunCMakeTest.cmake
|
||||
@@ -94,3 +94,10 @@ block()
|
||||
set(CASE_CMAKELISTS_SUFFIX_CODE "set_property(TEST TestTimeout PROPERTY TIMEOUT 10)\n")
|
||||
run_ctest_timeout(PropertyOverridesVar)
|
||||
endblock()
|
||||
+
|
||||
+block()
|
||||
+ set(TIMEOUT 4)
|
||||
+ set(CASE_TEST_PREFIX_CODE "set(CTEST_TEST_TIMEOUT 2)")
|
||||
+ set(CASE_CMAKELISTS_SUFFIX_CODE "set_property(TEST TestTimeout PROPERTY TIMEOUT)\n")
|
||||
+ run_ctest_timeout(FlagOverridesVar --timeout 10000001)
|
||||
+endblock()
|
||||
--
|
||||
2.41.0
|
||||
|
@ -0,0 +1,76 @@
|
||||
From 55bf2a34948a01329f075d2da692c0eba49d45f4 Mon Sep 17 00:00:00 2001
|
||||
From: Brad King <brad.king@kitware.com>
|
||||
Date: Fri, 29 Sep 2023 10:10:39 -0400
|
||||
Subject: [PATCH 5/6] Help: Document CMP0124 behavior on already-set variables
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Improve the documentation from commit 46896d98bb (foreach(): loop
|
||||
variables are only available in the loop scope, 2021-04-25,
|
||||
v3.21.0-rc1~245^2) to follow policy documentation convention.
|
||||
|
||||
Fixes: #25224
|
||||
Inspired-by: Marius Messerschmidt <marius.messerschmidt@googlemail.com>
|
||||
Signed-off-by: Björn Esser <besser82@fedoraproject.org>
|
||||
---
|
||||
Help/policy/CMP0124.rst | 42 ++++++++++++++++++++++++++++++++++++-----
|
||||
1 file changed, 37 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/Help/policy/CMP0124.rst b/Help/policy/CMP0124.rst
|
||||
index 3935166ad5..d5cde64d42 100644
|
||||
--- a/Help/policy/CMP0124.rst
|
||||
+++ b/Help/policy/CMP0124.rst
|
||||
@@ -3,12 +3,44 @@ CMP0124
|
||||
|
||||
.. versionadded:: 3.21
|
||||
|
||||
-When this policy is set to ``NEW``, the scope of loop variables defined by the
|
||||
-:command:`foreach` command is restricted to the loop only. They will be unset
|
||||
-at the end of the loop.
|
||||
+:command:`foreach` loop variables are only available in the loop scope.
|
||||
|
||||
-The ``OLD`` behavior for this policy still clears the loop variables at the end
|
||||
-of the loop, but does not unset them. This leaves them as defined, but empty.
|
||||
+CMake 3.20 and below always leave the loop variable set at the end of the
|
||||
+loop, either to the value it had before the loop, if any, or to the empty
|
||||
+string. CMake 3.21 and above prefer to leave the loop variable in the
|
||||
+state it had before the loop started, either set or unset. This policy
|
||||
+provides compatibility for projects that expect the loop variable to always
|
||||
+be left set.
|
||||
+
|
||||
+The ``OLD`` behavior for this policy is to set the loop variable at the
|
||||
+end of the loop, either to its original value, or to an empty value.
|
||||
+The ``NEW`` behavior for this policy is to restore the loop variable to
|
||||
+the state it had before the loop started, either set or unset.
|
||||
+
|
||||
+For example:
|
||||
+
|
||||
+.. code-block:: cmake
|
||||
+
|
||||
+ set(items a b c)
|
||||
+
|
||||
+ set(var1 "value")
|
||||
+ unset(var2)
|
||||
+
|
||||
+ foreach(var1 IN LISTS items)
|
||||
+ endforeach()
|
||||
+
|
||||
+ foreach(var2 IN LISTS items)
|
||||
+ endforeach()
|
||||
+
|
||||
+ if(DEFINED var1)
|
||||
+ message("var1: ${var1}")
|
||||
+ endif()
|
||||
+ if(DEFINED var2)
|
||||
+ message("var2: ${var2}")
|
||||
+ endif()
|
||||
+
|
||||
+Under the ``OLD`` behavior, this code prints ``var1: value`` and ``var2:``.
|
||||
+Under the ``NEW`` behavior, this code prints only ``var1: value``.
|
||||
|
||||
This policy was introduced in CMake version 3.21. Use the
|
||||
:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly.
|
||||
--
|
||||
2.41.0
|
||||
|
39
0006-FindPostgreSQL-Add-support-for-version-16.patch
Normal file
39
0006-FindPostgreSQL-Add-support-for-version-16.patch
Normal file
@ -0,0 +1,39 @@
|
||||
From 25644a78de165af0cb6373e3ca103a93971041eb Mon Sep 17 00:00:00 2001
|
||||
From: Brad King <brad.king@kitware.com>
|
||||
Date: Mon, 2 Oct 2023 14:43:30 -0400
|
||||
Subject: [PATCH 6/6] FindPostgreSQL: Add support for version 16
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Fixes: #25292
|
||||
Signed-off-by: Björn Esser <besser82@fedoraproject.org>
|
||||
---
|
||||
Modules/FindPostgreSQL.cmake | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Modules/FindPostgreSQL.cmake b/Modules/FindPostgreSQL.cmake
|
||||
index 6e970e8432..84bc1ed2bf 100644
|
||||
--- a/Modules/FindPostgreSQL.cmake
|
||||
+++ b/Modules/FindPostgreSQL.cmake
|
||||
@@ -53,7 +53,7 @@ is set regardless of the presence of the ``Server`` component in find_package ca
|
||||
# In Windows the default installation of PostgreSQL uses that as part of the path.
|
||||
# E.g C:\Program Files\PostgreSQL\8.4.
|
||||
# Currently, the following version numbers are known to this module:
|
||||
-# "15" "14" "13" "12" "11" "10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0"
|
||||
+# "16" "15" "14" "13" "12" "11" "10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0"
|
||||
#
|
||||
# To use this variable just do something like this:
|
||||
# set(PostgreSQL_ADDITIONAL_VERSIONS "9.2" "8.4.4")
|
||||
@@ -102,7 +102,7 @@ set(PostgreSQL_ROOT_DIR_MESSAGE "Set the PostgreSQL_ROOT system variable to wher
|
||||
|
||||
|
||||
set(PostgreSQL_KNOWN_VERSIONS ${PostgreSQL_ADDITIONAL_VERSIONS}
|
||||
- "15" "14" "13" "12" "11" "10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0")
|
||||
+ "16" "15" "14" "13" "12" "11" "10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0")
|
||||
|
||||
# Define additional search paths for root directories.
|
||||
set( PostgreSQL_ROOT_DIRECTORIES
|
||||
--
|
||||
2.41.0
|
||||
|
11
cmake.spec
11
cmake.spec
@ -72,7 +72,7 @@
|
||||
%global patch_version 6
|
||||
|
||||
# For handling bump release by rpmdev-bumpspec and mass rebuild
|
||||
%global baserelease 1
|
||||
%global baserelease 2
|
||||
|
||||
# Set to RC version if building RC, else comment out.
|
||||
#global rcsuf rc1
|
||||
@ -123,8 +123,12 @@ Patch100: %{name}-findruby.patch
|
||||
Patch1: %{name}-rename.patch
|
||||
%endif
|
||||
|
||||
# https://gitlab.kitware.com/cmake/cmake/-/issues/25265
|
||||
Patch10001: 0001-Linting-Fix-empty-evaluated-genex.patch
|
||||
Patch10002: 0002-Android-Require-Clang-18-for-std-c-23.patch
|
||||
Patch10003: 0003-Tests-Clarify-RunCMake.CTestTimeout-case-name.patch
|
||||
Patch10004: 0004-ctest-Restore-support-for-timeout-values-higher-than.patch
|
||||
Patch10005: 0005-Help-Document-CMP0124-behavior-on-already-set-variab.patch
|
||||
Patch10006: 0006-FindPostgreSQL-Add-support-for-version-16.patch
|
||||
|
||||
BuildRequires: coreutils
|
||||
BuildRequires: findutils
|
||||
@ -552,6 +556,9 @@ popd
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Oct 03 2023 Björn Esser <besser82@fedoraproject.org> - 3.27.6-2
|
||||
- Include new upstream patches
|
||||
|
||||
* Wed Sep 27 2023 Björn Esser <besser82@fedoraproject.org> - 3.27.6-1
|
||||
- cmake-3.27.6
|
||||
Fixes rhbz#2239015, rhbz#2240311
|
||||
|
Loading…
Reference in New Issue
Block a user