I have an interesting circumstance where the public API for my package (diagnostics_aggregator) includes a test node which other packages can use as a test fixture in their tests. This test node builds and links against gtest, which isn't available on all platforms, but I would like to make it part of the binary packages where possible.
What is the recommended way to install a binary that is compiled and linked against gtest?
- Having an install statement inside of my check for CATKIN_ENABLE_TESTING feels wrong
- Assuming that gtest is available and can be linked to will likely fail on systems that don't have it
Does catkin expose a separate flag to indicate if gtest has been found or not? Is it set appropriately on the build farm, so that I can guarantee that binary packages are built with all of the expected nodes?
Originally posted by ahendrix on ROS Answers with karma: 47576 on 2014-07-17
Post score: 1
Original comments
Comment by William on 2014-07-18:
I dunno, it might be that you must install the code and build it for each package which uses it. This is essentially how gtest is distributed for Ubuntu (source code goes into /usr/src/gtest
or something like that).