ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
In my case I wanted to reuse "test_helpers" file of package A in another package B. I resided to the following setup:
packageA/CMakeLists.txt: ament_package(CONFIG_EXTRAS cmake/extra.cmake.in)
packageA/cmake/extra.cmake: get_filename_component(@PROJECT_NAME@_TEST_DIR @PROJECT_SOURCE_DIR@/test ABSOLUTE)
packageB/CMakeLists.txt: find_package(packageA)
, include_directories(${packageA_TEST_DIR})
include "filename-relative to *_TEST_DIR"
2 | No.2 Revision |
In my case I wanted to reuse "test_helpers" a unittests-related file of package A in another package B.
I resided to the following setup:
packageA/CMakeLists.txt: ament_package(CONFIG_EXTRAS cmake/extra.cmake.in)
packageA/cmake/extra.cmake: get_filename_component(@PROJECT_NAME@_TEST_DIR @PROJECT_SOURCE_DIR@/test ABSOLUTE)
packageB/CMakeLists.txt: find_package(packageA)
, include_directories(${packageA_TEST_DIR})
include "filename-relative to *_TEST_DIR"
3 | No.3 Revision |
In my case I wanted to reuse a unittests-related file of package A in another package B. I resided to the following setup:
packageA/CMakeLists.txt: ament_package(CONFIG_EXTRAS cmake/extra.cmake.in)
packageA/cmake/extra.cmake: get_filename_component(@PROJECT_NAME@_TEST_DIR @PROJECT_SOURCE_DIR@/test ABSOLUTE)
packageB/CMakeLists.txt: find_package(packageA)
, include_directories(${packageA_TEST_DIR})
include #include "filename-relative to *_TEST_DIR"