From ada2525f4e7cb750f4217947bbe6b5e75557151a Mon Sep 17 00:00:00 2001 From: v4hn Date: Tue, 6 Aug 2024 16:15:28 +0200 Subject: [PATCH 1/3] remove use of deprecated _1 it was included transitively through ros_comm including --- rosrt/include/rosrt/subscriber.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rosrt/include/rosrt/subscriber.h b/rosrt/include/rosrt/subscriber.h index c1dc9ff..e5be8df 100644 --- a/rosrt/include/rosrt/subscriber.h +++ b/rosrt/include/rosrt/subscriber.h @@ -160,7 +160,8 @@ class Subscriber { ros::SubscribeOptions ops; #ifdef ROS_NEW_SERIALIZATION_API - ops.template init(topic, 1, boost::bind(&Subscriber::callback, this, _1), boost::bind(&lockfree::ObjectPool::allocateShared, pool_)); + auto p{ pool_ }; + ops.template init(topic, 1, [this](auto msg){ callback(msg); }, [p](){ return p->allocateShared(); }); #else ops.template init(topic, 1, boost::bind(&Subscriber::callback, this, _1)); #endif From 4e34d26eb4dc29b501640674d1fa45dd62e13c93 Mon Sep 17 00:00:00 2001 From: v4hn Date: Mon, 23 Sep 2024 00:09:55 +0200 Subject: [PATCH 2/3] remove broken DEPENDS entry --- allocators/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/allocators/CMakeLists.txt b/allocators/CMakeLists.txt index a8f5e15..f362aad 100644 --- a/allocators/CMakeLists.txt +++ b/allocators/CMakeLists.txt @@ -7,7 +7,7 @@ find_package(catkin REQUIRED ) include_directories(include ${Boost_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS}) catkin_package( - DEPENDS include # TODO add dependencies + DEPENDS # TODO add dependencies CATKIN_DEPENDS # TODO INCLUDE_DIRS include # TODO include LIBRARIES # TODO From 6ad6177f78df29ee89b3fd8f42f4e9ff8b8afcf1 Mon Sep 17 00:00:00 2001 From: v4hn Date: Mon, 23 Sep 2024 00:11:35 +0200 Subject: [PATCH 3/3] gate test with ENABLE_TESTING --- allocators/CMakeLists.txt | 8 +++++--- lockfree/CMakeLists.txt | 17 +++++++++-------- rosatomic/CMakeLists.txt | 5 ++++- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/allocators/CMakeLists.txt b/allocators/CMakeLists.txt index f362aad..ce0f762 100644 --- a/allocators/CMakeLists.txt +++ b/allocators/CMakeLists.txt @@ -13,9 +13,11 @@ catkin_package( LIBRARIES # TODO ) -catkin_add_gtest(test_aligned_alloc test/test_aligned_alloc.cpp)## Generate added messages and services with any dependencies listed here -target_link_libraries(test_aligned_alloc ${Boost_LIBRARIES} ${catkin_LIBRARIES}) -#add_dependencies(test_aligned_alloc allocators_gencpp) +if(CATKIN_ENABLE_TESTING) + catkin_add_gtest(test_aligned_alloc test/test_aligned_alloc.cpp)## Generate added messages and services with any dependencies listed here + target_link_libraries(test_aligned_alloc ${Boost_LIBRARIES} ${catkin_LIBRARIES}) + #add_dependencies(test_aligned_alloc allocators_gencpp) +endif() install(DIRECTORY test/ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) diff --git a/lockfree/CMakeLists.txt b/lockfree/CMakeLists.txt index 18559f9..9933f6d 100644 --- a/lockfree/CMakeLists.txt +++ b/lockfree/CMakeLists.txt @@ -16,14 +16,15 @@ add_library(${PROJECT_NAME} src/free_list.cpp) target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES}) #add_dependencies(${PROJECT_NAME} ) -catkin_add_gtest(test_freelist test/test_freelist.cpp) -target_link_libraries(test_freelist ${PROJECT_NAME}) -#add_dependencies(test_freelist ) - -catkin_add_gtest(test_object_pool test/test_object_pool.cpp) -target_link_libraries(test_object_pool ${PROJECT_NAME}) -#add_dependencies(test_object_pool ) - +if(CATKIN_ENABLE_TESTING) + catkin_add_gtest(test_freelist test/test_freelist.cpp) + target_link_libraries(test_freelist ${PROJECT_NAME}) + #add_dependencies(test_freelist ) + + catkin_add_gtest(test_object_pool test/test_object_pool.cpp) + target_link_libraries(test_object_pool ${PROJECT_NAME}) + #add_dependencies(test_object_pool ) +endif() install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} diff --git a/rosatomic/CMakeLists.txt b/rosatomic/CMakeLists.txt index 70e8c8c..136abe1 100644 --- a/rosatomic/CMakeLists.txt +++ b/rosatomic/CMakeLists.txt @@ -9,7 +9,10 @@ catkin_package( LIBRARIES # TODO ) include_directories(include ${catkin_INCLUDE_DIRS}) -catkin_add_gtest(utest test/utest.cpp) + +if(CATKIN_ENABLE_TESTING) + catkin_add_gtest(utest test/utest.cpp) +endif() install(DIRECTORY include/ros include/boost DESTINATION ${CATKIN_GLOBAL_INCLUDE_DESTINATION})