From 32aef5df162a42b5d313841ff9e640a7ccc10978 Mon Sep 17 00:00:00 2001 From: duongtd Date: Tue, 17 Nov 2026 20:36:12 +0700 Subject: [PATCH] build: add BUILD_ROBOT_IMAGE_GEOMETRY_TESTS option, off by default Tests used to build whenever CATKIN_ENABLE_TESTING was on. They now also need -DBUILD_ROBOT_IMAGE_GEOMETRY_TESTS=ON, in both build modes. --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 802cb78..0e05948 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -191,9 +191,12 @@ endif() # ======================================================== # Tests # ======================================================== +# Tests are OFF by default in both build modes; enable with -DBUILD_ROBOT_IMAGE_GEOMETRY_TESTS=ON. +option(BUILD_ROBOT_IMAGE_GEOMETRY_TESTS "Build the robot_image_geometry unit tests" OFF) + if(BUILDING_WITH_CATKIN) - if(CATKIN_ENABLE_TESTING AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/test) + if(BUILD_ROBOT_IMAGE_GEOMETRY_TESTS AND CATKIN_ENABLE_TESTING AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/test) add_subdirectory(test) endif()