From 0f63855d82b1ddc665a70bf5dcb6cce0c23b4193 Mon Sep 17 00:00:00 2001 From: duongtd Date: Tue, 17 Nov 2026 20:36:12 +0700 Subject: [PATCH] build: add BUILD_ROBOT_LINE_EXTRACTION_TESTS option, off by default Tests used to build whenever CATKIN_ENABLE_TESTING was on. They now also need -DBUILD_ROBOT_LINE_EXTRACTION_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 17d6908..5a9cc92 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -128,7 +128,10 @@ endif() # ======================================================== # Tests # ======================================================== -if(CATKIN_ENABLE_TESTING AND BUILDING_WITH_CATKIN) +# Tests are OFF by default in both build modes; enable with -DBUILD_ROBOT_LINE_EXTRACTION_TESTS=ON. +option(BUILD_ROBOT_LINE_EXTRACTION_TESTS "Build the robot_line_extraction unit tests" OFF) + +if(BUILD_ROBOT_LINE_EXTRACTION_TESTS AND CATKIN_ENABLE_TESTING AND BUILDING_WITH_CATKIN) if(NOT COMMAND catkin_add_gtest) message(FATAL_ERROR "catkin_add_gtest NOT FOUND")