diff --git a/CMakeLists.txt b/CMakeLists.txt index 472427d..cc14615 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -232,7 +232,12 @@ if(BUILDING_WITH_CATKIN) DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} ) - if(CATKIN_ENABLE_TESTING) + # Unit tests are OFF by default in both build modes; enable with + # -DBUILD_DEPTH_IMAGE_PROC_TESTS=ON. depth_image_proc_test_node above is not a + # unit test: launch/depth_image_proc_test.launch runs it, so it always builds. + option(BUILD_DEPTH_IMAGE_PROC_TESTS "Build the depth_image_proc unit tests" OFF) + + if(BUILD_DEPTH_IMAGE_PROC_TESTS AND CATKIN_ENABLE_TESTING) find_package(GTest REQUIRED) catkin_add_gtest(test_point_cloud_xyz