-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Find GTest via CONFIG mode to reference gmock #640
Conversation
Codecov Report
@@ Coverage Diff @@
## main #640 +/- ##
=======================================
Coverage 94.49% 94.49%
=======================================
Files 197 197
Lines 9130 9130
=======================================
Hits 8627 8627
Misses 503 503 |
Approved. I trust you on this. But if you can also open this in Windows - Visual Studio 2019 (with Just to confirm it also works well on Windows:
We'd probably need to add the |
Thanks @maxgolov. I validated the VS 2019 build as well which works. |
@ThomsonTan - I'm still checking, for some reason I get the build building successfully with this change.... but no tests run, at least not in Visual Studio 2019 , all tests show 0 tests run 🤷 I reverted just your change by: git revert 3ddda And I got the tests building and running again. Maybe we should add an extra check for |
The default module mode for
find_package(GTest CONFIG)
doesn't include gmock, so switch toCONFIG
mode and append imported targetGTest::gmock
toGTEST_BOTH_LIBRARIES
for linking.For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes