From a046ceff7376a74a5de76bf39071d22a0476f378 Mon Sep 17 00:00:00 2001 From: duongtd Date: Tue, 17 Nov 2026 20:36:11 +0700 Subject: [PATCH] build: add BUILD_MISSION_ADAPTERS_TESTS option, off by default Tests used to build whenever CATKIN_ENABLE_TESTING was on. They now also need -DBUILD_MISSION_ADAPTERS_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 0bef086..5696f37 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -360,7 +360,10 @@ endif() # EXCLUDE_FROM_ALL để binary có mặt sau `catkin_make` thường — chạy thẳng # ./devel/lib/mission_adapters/ theo đúng quy trình verify của repo. # ======================================================== -if(CATKIN_ENABLE_TESTING AND BUILDING_WITH_CATKIN) +# Test mặc định OFF trong cả hai chế độ build; bật bằng -DBUILD_MISSION_ADAPTERS_TESTS=ON. +option(BUILD_MISSION_ADAPTERS_TESTS "Build the mission_adapters unit tests" OFF) + +if(BUILD_MISSION_ADAPTERS_TESTS AND CATKIN_ENABLE_TESTING AND BUILDING_WITH_CATKIN) if(NOT COMMAND catkin_add_gtest) message(FATAL_ERROR "catkin_add_gtest NOT FOUND")