ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
catkin
currently only provides functions to support the user in using gtest
.
We have added gmock
support in a forked version but there these modifications are not easily deployable to ROS. The reason is that once any package is using gtest
a later package within the same workspace can't use gmock
since it requires to switch the gtest version being used (when the workspace is build without isolation.
The only viable option would be to remove the dependency on gtest
and replacing it with gmock
- even if packages only use gtest
. Such a change could be considered for the next ROS distro (Jade). I would hesitate to backport such a severe change into a long-ago released ROS release simply for stability reasons.
Anyway, I don't think that your statement that catkin
makes it "downright impossible" to use gmock is true. It does not provide any support for it but any package is "free" to use gmock and setup everything necessary for it on its own. The only thing you have to make sure is to "find" gtest (from within gmock) before finding catkin. In that case the whole logic in catkin to find gtest will be skipped (https://github.com/ros/catkin/blob/8033824d340d801eb7a9b2a94504b501173aaff9/cmake/test/gtest.cmake#L62).
This approach will still have the caveat mentioned above when you try to build your package together with other packages without isolation.