Skip to content
Open
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
10 changes: 6 additions & 4 deletions allocators/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@ 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
)

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})

Expand Down
17 changes: 9 additions & 8 deletions lockfree/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
5 changes: 4 additions & 1 deletion rosatomic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
3 changes: 2 additions & 1 deletion rosrt/include/rosrt/subscriber.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ class Subscriber
{
ros::SubscribeOptions ops;
#ifdef ROS_NEW_SERIALIZATION_API
ops.template init<M>(topic, 1, boost::bind(&Subscriber::callback, this, _1), boost::bind(&lockfree::ObjectPool<M>::allocateShared, pool_));
auto p{ pool_ };
ops.template init<M>(topic, 1, [this](auto msg){ callback(msg); }, [p](){ return p->allocateShared(); });
#else
ops.template init<M>(topic, 1, boost::bind(&Subscriber::callback, this, _1));
#endif
Expand Down