
* improve interoperability with rclcpp::Duration and std::chrono Signed-off-by: William Woodall <william@osrfoundation.org> * add to_rmw_time to Duration Signed-off-by: William Woodall <william@osrfoundation.org> * add new QoS class to rclcpp Signed-off-by: William Woodall <william@osrfoundation.org> * changes to NodeBase, NodeTopics, etc in preparation for changes to pub/sub Signed-off-by: William Woodall <william@osrfoundation.org> * refactor publisher creation to use new QoS class Signed-off-by: William Woodall <william@osrfoundation.org> * refactor subscription creation to use new QoS class Signed-off-by: William Woodall <william@osrfoundation.org> * fixing fallout from changes to pub/sub creation Signed-off-by: William Woodall <william@osrfoundation.org> * fixed Windows error: no appropriate default constructor available why? who knows Signed-off-by: William Woodall <william@osrfoundation.org> * fixed Windows error: could not deduce template argument for 'PublisherT' Signed-off-by: William Woodall <william@osrfoundation.org> * fix missing vftable linker error on Windows Signed-off-by: William Woodall <william@osrfoundation.org> * fix more cases of no suitable default constructor errors... Signed-off-by: William Woodall <william@osrfoundation.org> * prevent msvc from trying to interpret some cases as functions Signed-off-by: William Woodall <william@osrfoundation.org> * uncrustify Signed-off-by: William Woodall <william@osrfoundation.org> * cpplint Signed-off-by: William Woodall <william@osrfoundation.org> * add C++ version of default action qos Signed-off-by: William Woodall <william@osrfoundation.org> * fixing lifecycle subscription signatures Signed-off-by: William Woodall <william@osrfoundation.org> * fix allocators (we actually use this already in the pub/sub factory) Signed-off-by: William Woodall <william@osrfoundation.org> * suppress cppcheck on false positive syntax error Signed-off-by: William Woodall <william@osrfoundation.org> * fix more cppcheck syntax error false positives Signed-off-by: William Woodall <william@osrfoundation.org> * fix case where sub-type of QoS is used Signed-off-by: William Woodall <william@osrfoundation.org> * fixup get_node_topics_interface.hpp according to reviews and tests Signed-off-by: William Woodall <william@osrfoundation.org> * additional fixes based on local testing and CI Signed-off-by: William Woodall <william@osrfoundation.org> * another trick to avoid 'no appropriate default constructor available' Signed-off-by: William Woodall <william@osrfoundation.org> * fix compiler error with clang on macOS Signed-off-by: William Woodall <william@osrfoundation.org> * disable build failure tests until we can get Jenkins to ignore their output Signed-off-by: William Woodall <william@osrfoundation.org> * suppress more cppcheck false positives Signed-off-by: William Woodall <william@osrfoundation.org> * add missing visibility macros to default QoS profile classes Signed-off-by: William Woodall <william@osrfoundation.org> * fix another case of 'no appropriate default constructor available' Signed-off-by: William Woodall <william@osrfoundation.org> * unfortunately this actaully fixes a build error on Windows... Signed-off-by: William Woodall <william@osrfoundation.org> * fix typos Signed-off-by: William Woodall <william@osrfoundation.org>
93 lines
2.1 KiB
CMake
93 lines
2.1 KiB
CMake
cmake_minimum_required(VERSION 3.5)
|
|
|
|
project(rclcpp_action)
|
|
|
|
find_package(ament_cmake_ros REQUIRED)
|
|
find_package(action_msgs REQUIRED)
|
|
find_package(rclcpp REQUIRED)
|
|
find_package(rcl_action REQUIRED)
|
|
find_package(rosidl_generator_cpp REQUIRED)
|
|
|
|
# Default to C++14
|
|
if(NOT CMAKE_CXX_STANDARD)
|
|
set(CMAKE_CXX_STANDARD 14)
|
|
endif()
|
|
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|
add_compile_options(-Wall -Wextra -Wpedantic)
|
|
endif()
|
|
|
|
include_directories(include)
|
|
|
|
set(${PROJECT_NAME}_SRCS
|
|
src/client.cpp
|
|
src/qos.cpp
|
|
src/server.cpp
|
|
src/server_goal_handle.cpp
|
|
src/types.cpp
|
|
)
|
|
|
|
add_library(${PROJECT_NAME}
|
|
${${PROJECT_NAME}_SRCS})
|
|
|
|
ament_target_dependencies(${PROJECT_NAME}
|
|
"action_msgs"
|
|
"rcl_action"
|
|
"rclcpp"
|
|
"rosidl_generator_c"
|
|
"rosidl_generator_cpp")
|
|
|
|
# Causes the visibility macros to use dllexport rather than dllimport,
|
|
# which is appropriate when building the dll but not consuming it.
|
|
target_compile_definitions(${PROJECT_NAME}
|
|
PRIVATE "RCLCPP_ACTION_BUILDING_LIBRARY")
|
|
|
|
install(
|
|
DIRECTORY include/
|
|
DESTINATION include)
|
|
|
|
install(
|
|
TARGETS ${PROJECT_NAME}
|
|
ARCHIVE DESTINATION lib
|
|
LIBRARY DESTINATION lib
|
|
RUNTIME DESTINATION bin
|
|
)
|
|
|
|
# specific order: dependents before dependencies
|
|
ament_export_include_directories(include)
|
|
ament_export_libraries(${PROJECT_NAME})
|
|
|
|
ament_export_dependencies(ament_cmake)
|
|
ament_export_dependencies(action_msgs)
|
|
ament_export_dependencies(rclcpp)
|
|
ament_export_dependencies(rcl_action)
|
|
ament_export_dependencies(rosidl_generator_c)
|
|
ament_export_dependencies(rosidl_generator_cpp)
|
|
|
|
if(BUILD_TESTING)
|
|
find_package(ament_cmake_gtest REQUIRED)
|
|
find_package(ament_lint_auto REQUIRED)
|
|
ament_lint_auto_find_test_dependencies()
|
|
|
|
ament_add_gtest(test_client test/test_client.cpp)
|
|
if(TARGET test_client)
|
|
ament_target_dependencies(test_client
|
|
"test_msgs"
|
|
)
|
|
target_link_libraries(test_client
|
|
${PROJECT_NAME}
|
|
)
|
|
endif()
|
|
|
|
ament_add_gtest(test_server test/test_server.cpp)
|
|
if(TARGET test_server)
|
|
ament_target_dependencies(test_server
|
|
"test_msgs"
|
|
)
|
|
target_link_libraries(test_server
|
|
${PROJECT_NAME}
|
|
)
|
|
endif()
|
|
|
|
endif()
|
|
|
|
ament_package()
|