diff options
| author | yangwei <[email protected]> | 2024-11-11 16:35:44 +0800 |
|---|---|---|
| committer | chenzizhan <[email protected]> | 2024-11-15 17:24:17 +0800 |
| commit | 07d55c21c16cba89b1f169427bfc9672f46a3b5a (patch) | |
| tree | 7d2a63312d3bb08bcc554e39920c1bc52a385a7a | |
| parent | ff2357bb1d2af70dda26029ae02f62ef42d96ac2 (diff) | |
🔧 build(patch gtest to fix el9 warning): fix gcc compile warning
| -rw-r--r-- | test/deps/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | test/deps/gtest-death-test.cc.patch | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/test/deps/CMakeLists.txt b/test/deps/CMakeLists.txt index 74860fa..4a03971 100644 --- a/test/deps/CMakeLists.txt +++ b/test/deps/CMakeLists.txt @@ -5,6 +5,7 @@ include(ExternalProject) ExternalProject_Add(libgtest PREFIX libgtest
URL ${CMAKE_SOURCE_DIR}/test/deps/googletest-release-1.10.0.tar.gz
URL_MD5 ecd1fa65e7de707cd5c00bdac56022cd
+ PATCH_COMMAND patch -p1 < ${CMAKE_CURRENT_LIST_DIR}/gtest-death-test.cc.patch
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
ExternalProject_Get_Property(libgtest INSTALL_DIR)
file(MAKE_DIRECTORY ${INSTALL_DIR}/include)
diff --git a/test/deps/gtest-death-test.cc.patch b/test/deps/gtest-death-test.cc.patch new file mode 100644 index 0000000..476981a --- /dev/null +++ b/test/deps/gtest-death-test.cc.patch @@ -0,0 +1,11 @@ +--- a/googletest/src/gtest-death-test.cc.origin 2024-11-11 16:21:17.365946156 +0800 ++++ b/googletest/src/gtest-death-test.cc 2024-11-11 16:21:31.656137890 +0800 +@@ -1296,7 +1296,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; |
