Skip to content

Commit

Permalink
Fix warning maybe-uninitialized in install-dependencies
Browse files Browse the repository at this point in the history
Recent versions of gcc changed some rule about uninitialized variables, causing a warning which is for some reason considered as an error when I try to run `bootstrap.sh`. See google/googletest#3219 and google/googletest#3024

This fixes it by applying a patch  which is already in the master branch of googletest, but not in the release version used by the script.
  • Loading branch information
PiRK committed Jan 12, 2022
1 parent cc8dafe commit 51f8040
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/install-dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ cp $ROOT/tools/*.patch .
patch CMakeLists.txt gtest.patch
patch googletest/CMakeLists.txt gtest_test.patch
patch googlemock/CMakeLists.txt gtest_mock.patch
# see https://github.com/google/googletest/pull/3024
sed -i 's/int dummy;/int dummy = 0;/g' googletest/src/gtest-death-test.cc

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

0 comments on commit 51f8040

Please sign in to comment.