94 lines
3.0 KiB
Diff
94 lines
3.0 KiB
Diff
From 560ce8a8855a43565d1798af19cc943c61a72e7f Mon Sep 17 00:00:00 2001
|
|
From: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de>
|
|
Date: Tue, 4 Feb 2014 12:57:23 +0100
|
|
Subject: [PATCH] make rostest in CMakeLists optional (ros/rosdistro#3010)
|
|
|
|
This patch includes the subsequent fix in the indigo-devel branch of the
|
|
ros_comm repository (commit "fix find_package() call with two package names").
|
|
|
|
Upstream-Status: Backport [Accepted in indigo-devel branch]
|
|
---
|
|
tools/rosnode/CMakeLists.txt | 3 ++-
|
|
tools/rostopic/CMakeLists.txt | 3 ++-
|
|
tools/topic_tools/CMakeLists.txt | 3 ++-
|
|
utilities/roswtf/CMakeLists.txt | 3 ++-
|
|
4 files changed, 8 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/tools/rosnode/CMakeLists.txt b/tools/rosnode/CMakeLists.txt
|
|
index a7347b4..f305890 100644
|
|
--- a/tools/rosnode/CMakeLists.txt
|
|
+++ b/tools/rosnode/CMakeLists.txt
|
|
@@ -1,10 +1,11 @@
|
|
cmake_minimum_required(VERSION 2.8.3)
|
|
project(rosnode)
|
|
-find_package(catkin REQUIRED COMPONENTS rostest)
|
|
+find_package(catkin REQUIRED)
|
|
catkin_package()
|
|
|
|
catkin_python_setup()
|
|
|
|
if(CATKIN_ENABLE_TESTING)
|
|
+ find_package(rostest)
|
|
add_rostest(test/rosnode.test)
|
|
endif()
|
|
diff --git a/tools/rostopic/CMakeLists.txt b/tools/rostopic/CMakeLists.txt
|
|
index 0551583..db7917b 100644
|
|
--- a/tools/rostopic/CMakeLists.txt
|
|
+++ b/tools/rostopic/CMakeLists.txt
|
|
@@ -1,6 +1,6 @@
|
|
cmake_minimum_required(VERSION 2.8.3)
|
|
project(rostopic)
|
|
-find_package(catkin REQUIRED COMPONENTS rostest)
|
|
+find_package(catkin REQUIRED)
|
|
catkin_package()
|
|
|
|
catkin_python_setup()
|
|
@@ -9,5 +9,6 @@ install(PROGRAMS scripts/rostopic
|
|
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
|
|
|
|
if(CATKIN_ENABLE_TESTING)
|
|
+ find_package(rostest)
|
|
add_rostest(test/rostopic.test)
|
|
endif()
|
|
diff --git a/tools/topic_tools/CMakeLists.txt b/tools/topic_tools/CMakeLists.txt
|
|
index e441b9a..2d52451 100644
|
|
--- a/tools/topic_tools/CMakeLists.txt
|
|
+++ b/tools/topic_tools/CMakeLists.txt
|
|
@@ -1,6 +1,6 @@
|
|
cmake_minimum_required(VERSION 2.8.3)
|
|
project(topic_tools)
|
|
-find_package(catkin COMPONENTS cpp_common message_generation rosconsole roscpp rostest rostime rosunit std_msgs xmlrpcpp)
|
|
+find_package(catkin COMPONENTS cpp_common message_generation rosconsole roscpp rostime std_msgs xmlrpcpp)
|
|
|
|
include_directories(include)
|
|
include_directories(${catkin_INCLUDE_DIRS})
|
|
@@ -62,6 +62,8 @@ install(PROGRAMS
|
|
|
|
#Testing
|
|
if(CATKIN_ENABLE_TESTING)
|
|
+ find_package(rostest)
|
|
+ find_package(rosunit)
|
|
catkin_add_gtest(${PROJECT_NAME}-utest test/utest.cpp)
|
|
if(TARGET ${PROJECT_NAME}-utest)
|
|
target_link_libraries(${PROJECT_NAME}-utest topic_tools)
|
|
diff --git a/utilities/roswtf/CMakeLists.txt b/utilities/roswtf/CMakeLists.txt
|
|
index dccb342..97a34ff 100644
|
|
--- a/utilities/roswtf/CMakeLists.txt
|
|
+++ b/utilities/roswtf/CMakeLists.txt
|
|
@@ -1,10 +1,11 @@
|
|
cmake_minimum_required(VERSION 2.8.3)
|
|
project(roswtf)
|
|
-find_package(catkin REQUIRED COMPONENTS rostest)
|
|
+find_package(catkin REQUIRED)
|
|
catkin_package()
|
|
catkin_python_setup()
|
|
|
|
if(CATKIN_ENABLE_TESTING)
|
|
+ find_package(rostest)
|
|
add_rostest(test/roswtf.test)
|
|
catkin_add_nosetests(test)
|
|
endif()
|
|
--
|
|
1.8.3.2
|
|
|