googletest
googletest copied to clipboard
Add GTEST_HAS_ABSL support into gmock cmake for MSVC
trafficstars
Why this change
When building with MSVC, the sources of gtest are included directly in gmock rather than linking to gtest as a separate library. This resulted in GTEST_HAS_ABSL not being defined, causing gmock to miss linking with the necessary Abseil and RE2 libraries.
How this change fix this issue
- Added conditional compilation definitions for
GTEST_HAS_ABSLwhen building with MSVC. - Configured
gmockandgmock_mainto link with Abseil and RE2 dependencies explicitly. - Ensured that the dependencies are linked correctly by defining
GTEST_HAS_ABSLand specifying the required libraries, thus resolving build and runtime issues.
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.