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

BUILD_VOXEL_GRID_TESTS now defaults to OFF in both build modes instead of following
BUILDING_WITH_CATKIN. Enable the tests with -DBUILD_VOXEL_GRID_TESTS=ON.
This commit is contained in:
2026-11-17 20:36:11 +07:00
parent 081c520b8a
commit 5a00be95b9

View File

@@ -131,11 +131,8 @@ endif()
# ======================================================== # ========================================================
# Test executables # Test executables
# ======================================================== # ========================================================
# Tests are a development-machine concern: a catkin workspace is where they run, # Tests are OFF by default in both build modes; enable with -DBUILD_VOXEL_GRID_TESTS=ON.
# while the standalone CMake build is the robot deployment path and must not option(BUILD_VOXEL_GRID_TESTS "Build the robot_voxel_grid unit tests" OFF)
# produce test executables. Force with -DBUILD_VOXEL_GRID_TESTS=ON to build them
# from a standalone build.
option(BUILD_VOXEL_GRID_TESTS "Build the robot_voxel_grid unit tests" ${BUILDING_WITH_CATKIN})
if(BUILD_VOXEL_GRID_TESTS AND (GTest_FOUND OR GTEST_FOUND)) if(BUILD_VOXEL_GRID_TESTS AND (GTest_FOUND OR GTEST_FOUND))
enable_testing() enable_testing()