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.
This commit is contained in:
2026-11-17 20:36:12 +07:00
parent a37cabd18e
commit 32aef5df16

View File

@@ -191,9 +191,12 @@ endif()
# ======================================================== # ========================================================
# Tests # 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(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) add_subdirectory(test)
endif() endif()