build: turn tests off by default in catkin and standalone builds

BUILD_DOCK_PLANNER_TESTS now defaults to OFF in both build modes instead of following
BUILDING_WITH_CATKIN. Enable the tests with -DBUILD_DOCK_PLANNER_TESTS=ON.
This commit is contained in:
2026-11-17 20:36:11 +07:00
parent 422a505c3d
commit 7b9a0cede5

View File

@@ -116,16 +116,14 @@ endif()
# Focused contract tests use a tiny self-contained runner so both catkin and
# standalone builds exercise the same code without adding a test dependency.
#
# Tests are a development-machine concern: a catkin workspace is where they run,
# while the standalone CMake build is the robot deployment path and must not
# produce test executables. Force with -DBUILD_DOCK_PLANNER_TESTS=ON to build
# them from a standalone build.
# Tests are OFF by default in both build modes; enable with
# -DBUILD_DOCK_PLANNER_TESTS=ON.
#
# include(CTest) used to sit here for the standalone branch. It is deliberately
# gone: it defines BUILD_TESTING=ON for the WHOLE CMake tree, which switched the
# tests of every other package in the aggregate build back on.
option(BUILD_DOCK_PLANNER_TESTS "Build the dock_planner contract tests"
${BUILDING_WITH_CATKIN})
OFF)
if(BUILD_DOCK_PLANNER_TESTS AND
(NOT BUILDING_WITH_CATKIN OR CATKIN_ENABLE_TESTING))