Skip to content

Commit

Permalink
Remove redundant gtest compile flags for MinGW
Browse files Browse the repository at this point in the history
When compiling with MinGW, we no longer need to use
-Dgtest_disable_pthreads=ON.

See google/googletest#856
and google/googletest#721
  • Loading branch information
dneto0 committed Aug 9, 2023
1 parent 6e2416a commit 94bbf01
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,11 @@ ctest -C {Release|Debug|MinSizeRel|RelWithDebInfo}
```

4c) Or build with MinGW on Linux for Windows:
(Skip building threaded unit tests due to
[Googletest bug 606](https://github.com/google/googletest/issues/606))

```sh
cd $BUILD_DIR
cmake -GNinja -DCMAKE_BUILD_TYPE={Debug|Release|RelWithDebInfo} $SOURCE_DIR \
-DCMAKE_TOOLCHAIN_FILE=$SOURCE_DIR/cmake/linux-mingw-toolchain.cmake \
-Dgtest_disable_pthreads=ON
-DCMAKE_TOOLCHAIN_FILE=$SOURCE_DIR/cmake/linux-mingw-toolchain.cmake
ninja
```

Expand Down
2 changes: 1 addition & 1 deletion kokoro/linux/build-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ then
ADDITIONAL_CMAKE_FLAGS="-DDISABLE_EXCEPTIONS=ON -DDISABLE_RTTI=ON"
elif [ $CONFIG = "RELEASE_MINGW" ]
then
ADDITIONAL_CMAKE_FLAGS="-Dgtest_disable_pthreads=ON -DCMAKE_TOOLCHAIN_FILE=$ROOT_DIR/cmake/linux-mingw-toolchain.cmake"
ADDITIONAL_CMAKE_FLAGS="-DCMAKE_TOOLCHAIN_FILE=$ROOT_DIR/cmake/linux-mingw-toolchain.cmake"
SKIP_TESTS="True"
fi

Expand Down

0 comments on commit 94bbf01

Please sign in to comment.