catkin
catkin copied to clipboard
Externally provided 3rd-parties (googletest, Boost, etc.) installation
Question
- Is there a way to use a
googletest
/googlemock
,Boost
, implementations provided by a dependency-manager (such asConan
,vcpkg
, etc.) orCMake
'sfetch_content
,
instead of the system one, in a ROS (1) project ?
Motivations
The key idea is to get newer versions, in order to:
- Get rid of some warnings produced by modern compilers and tools
- Ease the transition to C++20, 23
Examples:
- using
fetch_content
in aCMakeLists.txt
FetchContent_Declare(
googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG v1.14.0 # f8d7d77c06936315286eb55f8de22cd23c188571
OVERRIDE_FIND_PACKAGE
)
FetchContent_MakeAvailable(googletest)
FetchContent_MakeAvailable(googlemock)