catkin icon indicating copy to clipboard operation
catkin copied to clipboard

Externally provided 3rd-parties (googletest, Boost, etc.) installation

Open GuillaumeDua opened this issue 11 months ago • 0 comments

Question

  • Is there a way to use a googletest/googlemock, Boost, implementations provided by a dependency-manager (such as Conan, vcpkg, etc.) or CMake's fetch_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 a CMakeLists.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)

GuillaumeDua avatar Mar 11 '24 16:03 GuillaumeDua