Stop building gmock, drop a dead FetchContent option - #74
Merged
Conversation
The suite's fakes model behaviour rather than call expectations, so gmock was built and linked by nobody. GIT_SHALLOW FALSE restated CMake's default, and its comment credited it with a submodule checkout it does not do.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two build-file removals, prompted by asking whether anything in the build existed
to cope with the pre-1.18 googletest. Nothing did — but two lines were doing
nothing useful.
BUILD_GMOCKdefaults on, so gmock's translation units were compiled in everyconfigure and build (native, docker debug/release, valgrind, and the armv7/armv5
cross-builds) and linked by nobody. The suite has zero gmock references: its
tests/mocksare fakes that model behaviour —FakeLinkSocket::Rebind()sets thesocket attached and its groups joined,
FakeInterface::Reidentify()implements thewhole identity state machine — so tests assert outcomes rather than call
expectations. Call expectations would pin how a repair happens instead of that it
happened, which is the opposite of how this suite is written.
GIT_SHALLOW FALSErestated CMake's default (the option is opt-in, adding--depth 1),and its comment credited it with checking out submodules, which it has nothing to do
with — that is
GIT_SUBMODULES. It dated from the initial commit, so it was neverworking around anything.
Verified by purging the fetched dependency and reconfiguring:
googlemock/no longerappears in the build tree, where it previously held
gmock-all.cc.oandgmock_main.910 unit tests native (Debug, ASan/UBSan) and 899 in docker, which builds from a fresh
clone and configure.