Repository navigation
Conversation
There was a problem hiding this comment.
Since the _prefix variable is only used in one branch later it should also only be defined there.
|
Please also add a note in |
|
Ok 02cb1ef, I also added the LICENSE file and added the BSD license in the |
|
LGTM |
|
Ok, the Linux and Windows jobs failed. On Windows, it seems that older (successful) builds were not finding gtest nor gmock: http://ci.ros2.org/job/ros2_batch_ci_windows/225/consoleFull (search for For the new job, it fails to link for gtest in On Linux a similar thing is happening where the new job is finding the gtest provided from gmock and is failing: http://ci.ros2.org/job/ros2_batch_ci_linux/222/consoleFull (search for The old jobs found gtest in http://ci.ros2.org/job/ros2_batch_ci_linux/221/consoleFull (search for I guess the logic in The side effect of delegating to gmock when finding gtest is that it will never find gtest in |
|
The reason that the OS X job succeeded was that I think before we merge this, I think we need to have a consensus on how this should work in different scenarios and make behave that way. I'm not actually using gmock in rclcpp, so I can avoid merging this for the time being. |
|
Whenever In general the search should first look for user provided input, then in the system location and as a last option use the bundled code. |
|
I cherry-picked 5d2f8f8215feadc5337152b5ecfd3946ad99b5b1 to the master. I will look into creating a third-party gmock package (similar to uncrustify) which is then optionally used by |
02cb1ef to
e4819da
Compare
|
I have imported the gmock sources into a standalone package: https://github.com/ament/gmock_vendor #25 will replace this PR. |
This pull request adds an embedded (vendor) version of gmock (1.7.0) which it will use as a last resort if
GMOCK_DIRis not set in the environment and if it is not found in/usr/src/...from the Debian package on Ubuntu.This makes it easier to use on OS X and Windows. The vendor files number 5 and include two headers, two source files, and a
CMakeLists.txt. This seems to be the recommended practice for gtest and gmock:Obviously the fact that others do it isn't proof in of itself, but I think it's a good indication that this is ok.
Also Homebrew actively discourages distributing
gmockandgtestin the package manager and recommends you distribute it with your project: