mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 18:32:47 +08:00
[gtest] Add a patch to fix build error in GCC 11 (#15661)
* [gtest] Add a patch to fix build error in GCC 11 * [gtest] Bump port version to 3 * [gtest] Update version files
This commit is contained in:
parent
d9351c9c3f
commit
6df7d6612b
@ -2270,7 +2270,7 @@
|
|||||||
},
|
},
|
||||||
"gtest": {
|
"gtest": {
|
||||||
"baseline": "1.10.0",
|
"baseline": "1.10.0",
|
||||||
"port-version": 2
|
"port-version": 3
|
||||||
},
|
},
|
||||||
"gtk": {
|
"gtk": {
|
||||||
"baseline": "3.22.19-4",
|
"baseline": "3.22.19-4",
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
{
|
{
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"git-tree": "e94f8c09a8fa6ed7fc618734d412878d83069bfb",
|
||||||
|
"version-string": "1.10.0",
|
||||||
|
"port-version": 3
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"git-tree": "88de073e86bcae80206fca0ff4f4f8e6c165f43a",
|
"git-tree": "88de073e86bcae80206fca0ff4f4f8e6c165f43a",
|
||||||
"version-string": "1.10.0",
|
"version-string": "1.10.0",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
Source: gtest
|
Source: gtest
|
||||||
Version: 1.10.0
|
Version: 1.10.0
|
||||||
Port-Version: 2
|
Port-Version: 3
|
||||||
Homepage: https://github.com/google/googletest
|
Homepage: https://github.com/google/googletest
|
||||||
Description: GoogleTest and GoogleMock testing frameworks.
|
Description: GoogleTest and GoogleMock testing frameworks.
|
||||||
|
22
ports/gtest/fix-build-failure-in-gcc-11.patch
Normal file
22
ports/gtest/fix-build-failure-in-gcc-11.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
diff --git a/googletest/src/gtest-death-test.cc b/googletest/src/gtest-death-test.cc
|
||||||
|
index da09a1cf..43cbd78a 100644
|
||||||
|
--- a/googletest/src/gtest-death-test.cc
|
||||||
|
+++ b/googletest/src/gtest-death-test.cc
|
||||||
|
@@ -1288,7 +1288,7 @@ static void StackLowerThanAddress(const void* ptr,
|
||||||
|
// making comparison result unpredictable.
|
||||||
|
GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_
|
||||||
|
static void StackLowerThanAddress(const void* ptr, bool* result) {
|
||||||
|
- int dummy;
|
||||||
|
+ int dummy = 0;
|
||||||
|
*result = (&dummy < ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1296,7 +1296,7 @@ static void StackLowerThanAddress(const void* ptr, bool* result) {
|
||||||
|
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;
|
@ -11,6 +11,7 @@ vcpkg_from_github(
|
|||||||
PATCHES
|
PATCHES
|
||||||
0002-Fix-z7-override.patch
|
0002-Fix-z7-override.patch
|
||||||
fix-main-lib-path.patch
|
fix-main-lib-path.patch
|
||||||
|
fix-build-failure-in-gcc-11.patch
|
||||||
)
|
)
|
||||||
|
|
||||||
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" GTEST_FORCE_SHARED_CRT)
|
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" GTEST_FORCE_SHARED_CRT)
|
||||||
|
Loading…
Reference in New Issue
Block a user