59 lines
2.0 KiB
Diff
59 lines
2.0 KiB
Diff
From 3a821331fb0884607b6c77865ed9fbc1e8197e20 Mon Sep 17 00:00:00 2001
|
|
From: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de>
|
|
Date: Sat, 28 Feb 2015 20:55:42 +0100
|
|
Subject: [PATCH] CMakeLists.txt: check launch file if testing is on
|
|
|
|
When building with CATKIN_ENABLE_TESTING deactivated, configure
|
|
fails with:
|
|
|
|
| -- Using CATKIN_ENABLE_TESTING: 0
|
|
| -- catkin 0.6.14
|
|
| -- Using these message generators: gencpp;genlisp;genpy
|
|
| CMake Error at /opt/ros/indigo/share/roslaunch/cmake/roslaunch-extras.cmake:35 (catkin_run_tests_target):
|
|
| Unknown CMake command "catkin_run_tests_target".
|
|
| Call Stack (most recent call first):
|
|
| CMakeLists.txt:34 (roslaunch_add_file_check)
|
|
|
|
|
|
|
|
| -- Configuring incomplete, errors occurred!
|
|
|
|
Configure fails as the test command 'catkin_run_tests_target' is
|
|
only defined in catkin if CATKIN_ENABLE_TESTING is enabled.
|
|
Hence, this commit changes CMakeLists.txt so that the command is
|
|
only used if CATKIN_ENABLE_TESTING is enabled.
|
|
|
|
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de>
|
|
|
|
Upstream-Status: Submitted [https://github.com/ros-perception/imu_pipeline/pull/6]
|
|
---
|
|
imu_transformer/CMakeLists.txt | 6 ++++--
|
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/imu_transformer/CMakeLists.txt b/imu_transformer/CMakeLists.txt
|
|
index 9a498dc..7a9dfc6 100644
|
|
--- a/imu_transformer/CMakeLists.txt
|
|
+++ b/imu_transformer/CMakeLists.txt
|
|
@@ -5,7 +5,6 @@ find_package(catkin REQUIRED COMPONENTS
|
|
message_filters
|
|
nodelet
|
|
roscpp
|
|
- roslaunch
|
|
sensor_msgs
|
|
geometry_msgs
|
|
tf2
|
|
@@ -31,7 +30,10 @@ target_link_libraries(imu_transformer_nodelet ${catkin_LIBRARIES})
|
|
add_executable(imu_transformer_node src/imu_transformer_node.cpp)
|
|
target_link_libraries(imu_transformer_node ${catkin_LIBRARIES})
|
|
|
|
-roslaunch_add_file_check(launch)
|
|
+if(CATKIN_ENABLE_TESTING)
|
|
+ find_package(roslaunch REQUIRED)
|
|
+ roslaunch_add_file_check(launch)
|
|
+endif()
|
|
|
|
install(TARGETS imu_transformer_node imu_transformer_nodelet
|
|
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
|
--
|
|
1.9.3
|
|
|