Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 29 additions & 3 deletions controller_manager/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ find_package(rclcpp REQUIRED)

add_library(controller_manager SHARED
src/controller_manager.cpp
src/resource_manager.cpp
)
target_include_directories(controller_manager PRIVATE include)
ament_target_dependencies(controller_manager
Expand Down Expand Up @@ -65,6 +66,10 @@ if(BUILD_TESTING)
target_include_directories(test_controller PRIVATE include)
target_link_libraries(test_controller controller_manager)
target_compile_definitions(test_controller PRIVATE "CONTROLLER_MANAGER_BUILDING_DLL")
install(TARGETS test_controller
DESTINATION lib
)
pluginlib_export_plugin_description_file(controller_interface test/test_controller.xml)

ament_add_gmock(
test_controller_manager
Expand Down Expand Up @@ -101,11 +106,32 @@ if(BUILD_TESTING)
test_robot_hardware
)

pluginlib_export_plugin_description_file(controller_interface test/test_controller.xml)

install(TARGETS test_controller
add_library(test_hardware_resources SHARED
test/test_hardware_resources/test_actuator_hardware.cpp
test/test_hardware_resources/test_joint_component.cpp
test/test_hardware_resources/test_sensor_component.cpp
test/test_hardware_resources/test_sensor_hardware.cpp
test/test_hardware_resources/test_system_hardware.cpp)
target_include_directories(test_hardware_resources PRIVATE include)
ament_target_dependencies(test_hardware_resources
hardware_interface
pluginlib
)
install(TARGETS test_hardware_resources
DESTINATION lib
)
pluginlib_export_plugin_description_file(
hardware_interface test/test_hardware_resources.xml)

ament_add_gmock(
test_resource_manager
test/test_resource_manager.cpp
ENV ASAN_OPTIONS=detect_container_overflow=0
)
target_include_directories(test_resource_manager PRIVATE include src)
target_link_libraries(test_resource_manager controller_manager test_hardware_resources)
set_target_properties(test_resource_manager PROPERTIES COMPILE_FLAGS "-fsanitize=undefined -fsanitize=address")
set_target_properties(test_resource_manager PROPERTIES LINK_FLAGS "-fsanitize=undefined -fsanitize=address")
endif()

ament_export_libraries(
Expand Down
Loading