From 042c10b403609e3de2e700f036d84f0ace01cfcd Mon Sep 17 00:00:00 2001 From: CastagnaIT Date: Mon, 27 Feb 2023 10:08:39 +0100 Subject: [PATCH 1/2] [googletest] Version bump v1.13 --- .../0001-FixWarningMaybe-uninitialized.patch | 20 ------------------- depends/common/googletest/CMakeLists.txt | 16 +++++++++++---- depends/common/googletest/googletest.sha256 | 2 +- depends/common/googletest/googletest.txt | 2 +- 4 files changed, 14 insertions(+), 26 deletions(-) delete mode 100644 depends/common/googletest/0001-FixWarningMaybe-uninitialized.patch diff --git a/depends/common/googletest/0001-FixWarningMaybe-uninitialized.patch b/depends/common/googletest/0001-FixWarningMaybe-uninitialized.patch deleted file mode 100644 index 2cad4ef7b..000000000 --- a/depends/common/googletest/0001-FixWarningMaybe-uninitialized.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/googletest/src/gtest-death-test.cc -+++ b/googletest/src/gtest-death-test.cc -@@ -1281,7 +1281,7 @@ - GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_ - GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_ - static void StackLowerThanAddress(const void* ptr, bool* result) { -- int dummy; -+ int dummy = 0; - *result = (&dummy < ptr); - } - -@@ -1289,7 +1289,7 @@ - GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_ - GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_ - static bool StackGrowsDown() { -- int dummy; -+ int dummy = 0; - bool result; - StackLowerThanAddress(&dummy, &result); - return result; diff --git a/depends/common/googletest/CMakeLists.txt b/depends/common/googletest/CMakeLists.txt index f11bbb521..69e360823 100644 --- a/depends/common/googletest/CMakeLists.txt +++ b/depends/common/googletest/CMakeLists.txt @@ -1,19 +1,27 @@ # Note: CMake support is community-based. The maintainers do not use CMake # internally. -cmake_minimum_required(VERSION 2.8.8) +cmake_minimum_required(VERSION 3.5) if (POLICY CMP0048) cmake_policy(SET CMP0048 NEW) endif (POLICY CMP0048) +if (POLICY CMP0069) + cmake_policy(SET CMP0069 NEW) +endif (POLICY CMP0069) + +if (POLICY CMP0077) + cmake_policy(SET CMP0077 NEW) +endif (POLICY CMP0077) + project(googletest-distribution) -set(GOOGLETEST_VERSION 1.10.0) +set(GOOGLETEST_VERSION 1.13.0) if (CMAKE_VERSION VERSION_LESS "3.1") - add_definitions(-std=c++11) + add_definitions(-std=c++14) else() - set(CMAKE_CXX_STANDARD 11) + set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) if(NOT CYGWIN) set(CMAKE_CXX_EXTENSIONS OFF) diff --git a/depends/common/googletest/googletest.sha256 b/depends/common/googletest/googletest.sha256 index 4f374c0f3..178f59dc0 100644 --- a/depends/common/googletest/googletest.sha256 +++ b/depends/common/googletest/googletest.sha256 @@ -1 +1 @@ -9dc9157a9a1551ec7a7e43daea9a694a0bb5fb8bec81235d8a1e6ef64c716dcb +ad7fdba11ea011c1d925b3289cf4af2c66a352e18d4c7264392fead75e919363 diff --git a/depends/common/googletest/googletest.txt b/depends/common/googletest/googletest.txt index 6aa2c32f0..383273771 100644 --- a/depends/common/googletest/googletest.txt +++ b/depends/common/googletest/googletest.txt @@ -1 +1 @@ -googletest http://mirrors.kodi.tv/build-deps/sources/googletest-1.10.0.tar.gz +googletest https://mirrors.kodi.tv/build-deps/sources/googletest-1.13.0.tar.gz From 64b2b4789a87dd2d121e7b36f181d0d8df1d4644 Mon Sep 17 00:00:00 2001 From: CastagnaIT Date: Mon, 27 Feb 2023 10:25:42 +0100 Subject: [PATCH 2/2] [googletest] Add UWP build fix --- .../googletest/0001-fix-UWP-death-test.patch | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 depends/common/googletest/0001-fix-UWP-death-test.patch diff --git a/depends/common/googletest/0001-fix-UWP-death-test.patch b/depends/common/googletest/0001-fix-UWP-death-test.patch new file mode 100644 index 000000000..62f25f308 --- /dev/null +++ b/depends/common/googletest/0001-fix-UWP-death-test.patch @@ -0,0 +1,24 @@ +From 10493e3854db0c4709f9ddd1ac10b974d30219f5 Mon Sep 17 00:00:00 2001 +From: Sergey +Date: Tue, 21 Feb 2023 13:29:20 -0700 +Subject: [PATCH] Fix error in_death_test_child_process: undeclared identifier + +The error occurs if !GTEST_HAS_DEATH_TEST on Windows. +--- + googletest/src/gtest.cc | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc +index a60a042cc5..dd7752cf19 100644 +--- a/googletest/src/gtest.cc ++++ b/googletest/src/gtest.cc +@@ -5416,6 +5416,9 @@ int UnitTest::Run() { + impl()->set_catch_exceptions(GTEST_FLAG_GET(catch_exceptions)); + + #if GTEST_OS_WINDOWS ++#if !GTEST_HAS_DEATH_TEST ++ const bool in_death_test_child_process = false; ++#endif + // Either the user wants Google Test to catch exceptions thrown by the + // tests or this is executing in the context of death test child + // process. In either case the user does not want to see pop-up dialogs