Skip to content
Snippets Groups Projects
Commit de0bdea9 authored by Lukas Bulwahn's avatar Lukas Bulwahn
Browse files

filters: initial commit

parent e488acf8
No related branches found
Tags v0.1rc1
No related merge requests found
From 2607c82034cdfbf96fe372c9637b0133b6ba6970 Mon Sep 17 00:00:00 2001
From: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de>
Date: Sat, 12 Oct 2013 11:39:36 +0200
Subject: [PATCH] check for CATKIN_ENABLE_TESTING
---
CMakeLists.txt | 64 +++++++++++++++++++++++++++++++---------------------------
package.xml | 2 +-
2 files changed, 35 insertions(+), 31 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index aaf586d..ccb54f9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,33 +40,35 @@ target_link_libraries(median ${catkin_LIBRARIES} ${Boost_LIBRARIES})
add_library(transfer_function src/transfer_function.cpp)
target_link_libraries(transfer_function ${catkin_LIBRARIES} ${Boost_LIBRARIES})
-# Test median filter
-add_executable(median_test EXCLUDE_FROM_ALL test/test_median.cpp )
-target_link_libraries(median_test median ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${GTEST_LIBRARIES})
-add_rostest(test/test_median.launch)
-
-# Test transfer function filter
-add_executable(transfer_function_test EXCLUDE_FROM_ALL test/test_transfer_function.cpp)
-target_link_libraries(transfer_function_test transfer_function ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${GTEST_LIBRARIES})
-add_rostest(test/test_transfer_function.launch)
-
-# Test mean filter
-add_executable(mean_test EXCLUDE_FROM_ALL test/test_mean.cpp)
-target_link_libraries(mean_test mean ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${GTEST_LIBRARIES})
-add_rostest(test/test_mean.launch)
-
-# Test params filter
-add_executable(params_test EXCLUDE_FROM_ALL test/test_params.cpp)
-target_link_libraries(params_test params ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${GTEST_LIBRARIES})
-add_rostest(test/test_params.launch)
-
-# Test plugin loading into filter chain
-add_executable(chain_test EXCLUDE_FROM_ALL test/test_chain.cpp)
-target_link_libraries(chain_test increment ${Boost_libraries} ${catkin_LIBRARIES} ${GTEST_LIBRARIES}) # Needed for OSX
-add_rostest(test/test_chain.launch)
-
-# Test realtime safe buffer class
-catkin_add_gtest(realtime_buffer_test EXCLUDE_FROM_ALL test/test_realtime_circular_buffer.cpp)
+if(CATKIN_ENABLE_TESTING)
+ # Test median filter
+ add_executable(median_test EXCLUDE_FROM_ALL test/test_median.cpp )
+ target_link_libraries(median_test median ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${GTEST_LIBRARIES})
+ add_rostest(test/test_median.launch)
+
+ # Test transfer function filter
+ add_executable(transfer_function_test EXCLUDE_FROM_ALL test/test_transfer_function.cpp)
+ target_link_libraries(transfer_function_test transfer_function ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${GTEST_LIBRARIES})
+ add_rostest(test/test_transfer_function.launch)
+
+ # Test mean filter
+ add_executable(mean_test EXCLUDE_FROM_ALL test/test_mean.cpp)
+ target_link_libraries(mean_test mean ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${GTEST_LIBRARIES})
+ add_rostest(test/test_mean.launch)
+
+ # Test params filter
+ add_executable(params_test EXCLUDE_FROM_ALL test/test_params.cpp)
+ target_link_libraries(params_test params ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${GTEST_LIBRARIES})
+ add_rostest(test/test_params.launch)
+
+ # Test plugin loading into filter chain
+ add_executable(chain_test EXCLUDE_FROM_ALL test/test_chain.cpp)
+ target_link_libraries(chain_test increment ${Boost_libraries} ${catkin_LIBRARIES} ${GTEST_LIBRARIES}) # Needed for OSX
+ add_rostest(test/test_chain.launch)
+
+ # Test realtime safe buffer class
+ catkin_add_gtest(realtime_buffer_test EXCLUDE_FROM_ALL test/test_realtime_circular_buffer.cpp)
+endif()
##############################################################################
# Install
@@ -88,6 +90,8 @@ install(FILES default_plugins.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
-if(TARGET tests)
-add_dependencies(tests median_test transfer_function_test mean_test params_test chain_test)
-endif()
\ No newline at end of file
+if(CATKIN_ENABLE_TESTING)
+ if(TARGET tests)
+ add_dependencies(tests median_test transfer_function_test mean_test params_test chain_test)
+ endif()
+endif()
diff --git a/package.xml b/package.xml
index c5bc897..dd66070 100644
--- a/package.xml
+++ b/package.xml
@@ -11,7 +11,7 @@
<license>BSD</license>
<url>http://ros.org/wiki/filters</url>
- <buildtool_depend>catkin</buildtool_depend>
+ <buildtool_depend version_gte="0.5.68">catkin</buildtool_depend>
<build_depend>roslib</build_depend>
<build_depend>rosconsole</build_depend>
--
1.8.1.2
DESCRIPTION = "This library provides a standardized interface for processing data as a sequence of filters."
SECTION = "devel"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://package.xml;beginline=11;endline=11;md5=d566ef916e9dedc494f5f793a6690ba5"
DEPENDS = "roslib rosconsole roscpp pluginlib rostest"
SRC_URI = "https://github.com/ros/${ROS_SPN}/archive/${PV}.tar.gz;downloadfilename=${ROS_SP}.tar.gz"
SRC_URI[md5sum] = "0dd26504be16afa7816e9a5aa11715f1"
SRC_URI[sha256sum] = "fb71f1fbeaf89726877fce66dce1db8957c5cc6dffa1973d6a104a10233f8237"
SRC_URI += "file://0001-check-for-CATKIN_ENABLE_TESTING.patch"
inherit catkin
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment