-
Notifications
You must be signed in to change notification settings - Fork 130
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
GTest improvements #563
base: rolling
Are you sure you want to change the base?
GTest improvements #563
Conversation
Port ament#543 to gmock Signed-off-by: Andrej Valek <[email protected]>
Instead of always compiling own gmock/gtestG, try to use GTest targets from FindGTest cmake config, but without changing the old behavior. Signed-off-by: Andrej Valek <[email protected]>
I don't think this PR relates to this issue. Is there another one you meant to link? |
else() | ||
# try to find and use gmock from GTest | ||
find_package(GTest QUIET) | ||
if(GTest_FOUND) | ||
set(GMOCK_FOUND TRUE) | ||
set(GMOCK_LIBRARIES GTest::gmock) | ||
set(GMOCK_MAIN_LIBRARIES GTest::gmock_main) | ||
endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks a little strange to me. Mind explaining when we can assume GTest
will provide targets for gmock
prefixed with GTest::
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it's in the documentation? :)
https://cmake.org/cmake/help/latest/module/FindGTest.html#imported-targets
Ah, I see. I was thinking, that there was a missing option to add external gmock library. |
ament_cmake_gmock-extras
gtest
orgmock
targets fromGTest