From 6bd812bd409f6e4e66f96b7d5a7735229e9c1e99 Mon Sep 17 00:00:00 2001 From: duongtd Date: Tue, 17 Nov 2026 20:36:11 +0700 Subject: [PATCH] build: turn tests off by default in catkin and standalone builds BUILD_ROBOT_NAV_MSGS_TESTS now defaults to OFF in both build modes instead of following BUILDING_WITH_CATKIN. Enable the tests with -DBUILD_ROBOT_NAV_MSGS_TESTS=ON. --- robot_nav_msgs/CMakeLists.txt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/robot_nav_msgs/CMakeLists.txt b/robot_nav_msgs/CMakeLists.txt index 9f8e95c..2a7a66e 100644 --- a/robot_nav_msgs/CMakeLists.txt +++ b/robot_nav_msgs/CMakeLists.txt @@ -146,11 +146,8 @@ endif() # ======================================================== # Test executables # ======================================================== -# 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_ROBOT_NAV_MSGS_TESTS=ON to build them -# from a standalone build. -option(BUILD_ROBOT_NAV_MSGS_TESTS "Build the robot_nav_msgs unit tests" ${BUILDING_WITH_CATKIN}) +# Tests are OFF by default in both build modes; enable with -DBUILD_ROBOT_NAV_MSGS_TESTS=ON. +option(BUILD_ROBOT_NAV_MSGS_TESTS "Build the robot_nav_msgs unit tests" OFF) if(BUILD_ROBOT_NAV_MSGS_TESTS AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/test/main.cpp) add_executable(${PROJECT_NAME}_test test/main.cpp)