diff options
author | Saku Laesvuori <saku@laesvuori.fi> | 2023-05-25 22:12:02 +0300 |
---|---|---|
committer | Jonathan Brielmaier <jonathan.brielmaier@web.de> | 2023-05-28 13:09:40 +0200 |
commit | c10c24e9567643b8dc46ad62ad3b6c779553e833 (patch) | |
tree | b73e2c86670d8c4da210dfb82cdf3a1bae7a1b64 /gnu/packages/patches | |
parent | 5c959d0fa745618ebee337ac2a21d22a6ec3a6a8 (diff) | |
download | guix-c10c24e9567643b8dc46ad62ad3b6c779553e833.tar guix-c10c24e9567643b8dc46ad62ad3b6c779553e833.tar.gz |
gnu: c++-gsl: Update to 4.0.0
* gnu/packages/cpp.scm (c++gsl): Update to 4.0.0.
* gnu/packages/patches/c++-gsl-find-system-gtest.patch: Delete file.
* gnu/packages/patches/c++-gsl-move-array-bounds-tests.patch: Delete
file.
* gnu/local.mk (dist_patch_DATA): Remove deleted patches.
Signed-off-by: Jonathan Brielmaier <jonathan.brielmaier@web.de>
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/c++-gsl-find-system-gtest.patch | 96 | ||||
-rw-r--r-- | gnu/packages/patches/c++-gsl-move-array-bounds-tests.patch | 126 |
2 files changed, 0 insertions, 222 deletions
diff --git a/gnu/packages/patches/c++-gsl-find-system-gtest.patch b/gnu/packages/patches/c++-gsl-find-system-gtest.patch deleted file mode 100644 index 2def650292..0000000000 --- a/gnu/packages/patches/c++-gsl-find-system-gtest.patch +++ /dev/null @@ -1,96 +0,0 @@ -From f5cf01083baf7e8dc8318db3648bc6098dc32d67 Mon Sep 17 00:00:00 2001 -From: Nicholas Guriev <guriev-ns@ya.ru> -Date: Sat, 18 Apr 2020 13:30:17 +0300 -Subject: [PATCH] Search for GoogleTest via pkg-config first - ---- - tests/CMakeLists.txt | 55 ++++++++++++++++++++++++-------------------- - 1 file changed, 30 insertions(+), 25 deletions(-) - -diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt -index 02193197..53d475c2 100644 ---- a/tests/CMakeLists.txt -+++ b/tests/CMakeLists.txt -@@ -1,36 +1,41 @@ - cmake_minimum_required(VERSION 3.0.2) - - project(GSLTests CXX) -+include(FindPkgConfig) - - # will make visual studio generated project group files - set_property(GLOBAL PROPERTY USE_FOLDERS ON) - --configure_file(CMakeLists.txt.in googletest-download/CMakeLists.txt) --execute_process( -- COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . -- RESULT_VARIABLE result -- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download --) --if(result) -- message(FATAL_ERROR "CMake step for googletest failed: ${result}") --endif() -+pkg_search_module(GTestMain gtest_main) -+if (NOT GTestMain_FOUND) -+ configure_file(CMakeLists.txt.in googletest-download/CMakeLists.txt) -+ execute_process( -+ COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . -+ RESULT_VARIABLE result -+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download -+ ) -+ if(result) -+ message(FATAL_ERROR "CMake step for googletest failed: ${result}") -+ endif() - --execute_process( -- COMMAND ${CMAKE_COMMAND} --build . -- RESULT_VARIABLE result -- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download --) --if(result) -- message(FATAL_ERROR "CMake step for googletest failed: ${result}") --endif() -+ execute_process( -+ COMMAND ${CMAKE_COMMAND} --build . -+ RESULT_VARIABLE result -+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download -+ ) -+ if(result) -+ message(FATAL_ERROR "CMake step for googletest failed: ${result}") -+ endif() - --set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) -+ set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) -+ set(GTestMain_LIBRARIES gtest_main) - --add_subdirectory( -- ${CMAKE_CURRENT_BINARY_DIR}/googletest-src -- ${CMAKE_CURRENT_BINARY_DIR}/googletest-build -- EXCLUDE_FROM_ALL --) -+ add_subdirectory( -+ ${CMAKE_CURRENT_BINARY_DIR}/googletest-src -+ ${CMAKE_CURRENT_BINARY_DIR}/googletest-build -+ EXCLUDE_FROM_ALL -+ ) -+endif() - - if (MSVC AND (GSL_CXX_STANDARD EQUAL 17)) - set(GSL_CPLUSPLUS_OPT -Zc:__cplusplus -permissive-) -@@ -149,7 +154,7 @@ function(add_gsl_test name) - target_link_libraries(${name} - GSL - gsl_tests_config -- gtest_main -+ ${GTestMain_LIBRARIES} - ) - add_test( - ${name} -@@ -254,7 +259,7 @@ function(add_gsl_test_noexcept name) - target_link_libraries(${name} - GSL - gsl_tests_config_noexcept -- gtest_main -+ ${GTestMain_LIBRARIES} - ) - add_test( - ${name} diff --git a/gnu/packages/patches/c++-gsl-move-array-bounds-tests.patch b/gnu/packages/patches/c++-gsl-move-array-bounds-tests.patch deleted file mode 100644 index 0629212688..0000000000 --- a/gnu/packages/patches/c++-gsl-move-array-bounds-tests.patch +++ /dev/null @@ -1,126 +0,0 @@ -Description: Move tests that trigger -Warray-bounds to separate compilation unit - GCC 10 is now smart enough to detect violation of array boundaries that tests - are actually tested. Along with -Werror this led to tests failure, so I move - such tests to another compilation unit to have the warning deactivated for - only these tests. -Bug-Debian: https://bugs.debian.org/966895 -Author: Nicholas Guriev <guriev-ns@ya.ru> -Last-Modified: Wed, 19 Aug 2020 08:55:52 +0300 - ---- a/tests/CMakeLists.txt -+++ b/tests/CMakeLists.txt -@@ -179,6 +179,7 @@ add_gsl_test(owner_tests) - add_gsl_test(byte_tests) - add_gsl_test(algorithm_tests) - add_gsl_test(strict_notnull_tests) -+add_gsl_test(array_bounds) - - - # No exception tests ---- /dev/null -+++ b/tests/array_bounds.cpp -@@ -0,0 +1,68 @@ -+/////////////////////////////////////////////////////////////////////////////// -+// -+// Copyright (c) 2015 Microsoft Corporation. All rights reserved. -+// -+// This code is licensed under the MIT License (MIT). -+// -+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -+// THE SOFTWARE. -+// -+/////////////////////////////////////////////////////////////////////////////// -+ -+#ifdef __GNUC__ -+#pragma GCC diagnostic warning "-Warray-bounds" -+#endif // __GNUC__ -+ -+#include <gtest/gtest.h> -+ -+#include <gsl/multi_span> // for gsl::multi_span -+ -+namespace gsl -+{ -+struct fail_fast; -+} // namespace gsl -+ -+namespace -+{ -+static constexpr char deathstring[] = "Expected Death"; -+} // namespace -+ -+TEST(array_bounds, subspan_from_multi_span_test) -+{ -+ int arr[5] = {1, 2, 3, 4, 5}; -+ gsl::multi_span<int> av = arr; -+ -+ std::set_terminate([] { -+ std::cerr << "Expected Death. subspan"; -+ std::abort(); -+ }); -+ -+ EXPECT_DEATH(av.subspan(6).length(), deathstring); -+} -+ -+TEST(array_bounds, strided_span_bounds_from_strided_span_tests) -+{ -+ int arr[] = {0, 1, 2, 3}; -+ gsl::multi_span<int> av(arr); -+ -+ std::set_terminate([] { -+ std::cerr << "Expected Death. strided_span_bounds"; -+ std::abort(); -+ }); -+ -+ // incorrect sections -+ EXPECT_DEATH(av.section(0, 0)[0], deathstring); -+ EXPECT_DEATH(av.section(1, 0)[0], deathstring); -+ EXPECT_DEATH(av.section(1, 1)[1], deathstring); -+ -+ EXPECT_DEATH(av.section(2, 5), deathstring); -+ EXPECT_DEATH(av.section(5, 2), deathstring); -+ EXPECT_DEATH(av.section(5, 0), deathstring); -+ EXPECT_DEATH(av.section(0, 5), deathstring); -+ EXPECT_DEATH(av.section(5, 5), deathstring); -+} ---- a/tests/multi_span_tests.cpp -+++ b/tests/multi_span_tests.cpp -@@ -1042,10 +1042,6 @@ TEST(multi_span_test, subspan) - EXPECT_TRUE(av.subspan(1).length() == 4); - EXPECT_TRUE(av.subspan(4).length() == 1); - EXPECT_TRUE(av.subspan(5).length() == 0); -- // Disabled test instead of fixing since multi_span is deprecated. (PR#835) --#if !(defined(__GNUC__) && __GNUC__ == 8) -- EXPECT_DEATH(av.subspan(6).length(), deathstring); --#endif - auto av2 = av.subspan(1); - for (int i = 0; i < 4; ++i) EXPECT_TRUE(av2[i] == i + 2); - } ---- a/tests/strided_span_tests.cpp -+++ b/tests/strided_span_tests.cpp -@@ -403,20 +403,6 @@ TEST(strided_span_tests, strided_span_bo - }); - - { -- // incorrect sections -- -- EXPECT_DEATH(av.section(0, 0)[0], deathstring); -- EXPECT_DEATH(av.section(1, 0)[0], deathstring); -- EXPECT_DEATH(av.section(1, 1)[1], deathstring); -- -- EXPECT_DEATH(av.section(2, 5), deathstring); -- EXPECT_DEATH(av.section(5, 2), deathstring); -- EXPECT_DEATH(av.section(5, 0), deathstring); -- EXPECT_DEATH(av.section(0, 5), deathstring); -- EXPECT_DEATH(av.section(5, 5), deathstring); -- } -- -- { - // zero stride - strided_span<int, 1> sav{av, {{4}, {}}}; - EXPECT_TRUE(sav[0] == 0); |