Skip to content

Commit

Permalink
update googletest to 1.11.0 (#1916)
Browse files Browse the repository at this point in the history
This fixes a build issue caused by gcc 11 changing the rules about what constitutes a `-Werror=maybe-uninitialized` error (see google/googletest#3024)
As a side benefit, this simplifies the build  script by removing the need for a few patches.
  • Loading branch information
naruhitokaide committed Jan 13, 2022
1 parent ad89218 commit fa67d13
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 41 deletions.
2 changes: 1 addition & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)

# Add googletest directly to our build. This defines
# the gtest and gtest_main targets.
add_subdirectory(${CMAKE_SOURCE_DIR}/build/local/src/gtest/googletest-release-1.10.0
add_subdirectory(${CMAKE_SOURCE_DIR}/build/local/src/gtest/googletest-release-1.11.0
${CMAKE_CURRENT_BINARY_DIR}/googletest-build
EXCLUDE_FROM_ALL)

Expand Down
11 changes: 0 additions & 11 deletions tools/gtest.patch

This file was deleted.

11 changes: 0 additions & 11 deletions tools/gtest_mock.patch

This file was deleted.

11 changes: 0 additions & 11 deletions tools/gtest_test.patch

This file was deleted.

8 changes: 1 addition & 7 deletions tools/install-dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export LD_LIBRARY_PATH="$PREFIX/lib"
export LD_RUN_PATH="$PREFIX/lib"

# Download Google Test
export GTEST_VERSION=1.10.0
export GTEST_VERSION=1.11.0
GTEST_DIR="$ROOT/build/local/src/gtest"
mkdir -p "$GTEST_DIR"
cd "$GTEST_DIR"
Expand All @@ -26,12 +26,6 @@ tar xzf release-$GTEST_VERSION.tar.gz

# Build gtest
cd googletest-release-$GTEST_VERSION
echo "patching cmake minimum version"
cp $ROOT/tools/*.patch .
patch CMakeLists.txt gtest.patch
patch googletest/CMakeLists.txt gtest_test.patch
patch googlemock/CMakeLists.txt gtest_mock.patch

cmake -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX -H.
make -j4
make install
Expand Down

0 comments on commit fa67d13

Please sign in to comment.