Repository navigation
Enable Abseil and RE2 integration for GoogleTest in CMake builds. - #1300
Draft
copybara-service[bot] wants to merge 1 commit into
Draft
copybara-service[bot] wants to merge 1 commit into
copybara-service[bot] wants to merge 1 commit into
Conversation
googletest must be fetched before abseil-cpp because ABSL_BUILD_TEST_HELPERS=ON checks TARGET gtest at configure time, preventing GTEST_HAS_ABSL=ON from being configured during FetchContent_MakeAvailable(googletest). Without GTEST_HAS_ABSL=1, GoogleTest falls back to POSIX ERE instead of RE2 for MatchesRegex (breaking logging_test) and omits Abseil failure signal handler support (breaking AllocationGuard.CooperativeDeathTest). Remove FIND_PACKAGE_ARGS NAMES GTest so googletest is always built from source, configure gtest with GTEST_HAS_ABSL=1 and link its Abseil and RE2 dependencies after re2 is fetched, and set GTEST_INSTALL_FAILURE_SIGNAL_HANDLER=1 in TCMALLOC_TEST_ENV to match .bazelrc. PiperOrigin-RevId: 994040837
copybara-service
Bot
force-pushed
the
test_994040837
branch
from
October 9, 2026 05:31
bd9c830 to
d86d5d2
Compare
This branch has not been deployed
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.
Enable Abseil and RE2 integration for GoogleTest in CMake builds.
googletest must be fetched before abseil-cpp because ABSL_BUILD_TEST_HELPERS=ON checks TARGET gtest at configure time, preventing GTEST_HAS_ABSL=ON from being configured during FetchContent_MakeAvailable(googletest). Without GTEST_HAS_ABSL=1, GoogleTest falls back to POSIX ERE instead of RE2 for MatchesRegex (breaking logging_test) and omits Abseil failure signal handler support (breaking AllocationGuard.CooperativeDeathTest).
Remove FIND_PACKAGE_ARGS NAMES GTest so googletest is always built from source, configure gtest with GTEST_HAS_ABSL=1 and link its Abseil and RE2 dependencies after re2 is fetched, and set GTEST_INSTALL_FAILURE_SIGNAL_HANDLER=1 in TCMALLOC_TEST_ENV to match .bazelrc.