build: add BUILD_ACTION_CORE_TESTS option, off by default

Tests used to build whenever CATKIN_ENABLE_TESTING was on. They now also
need -DBUILD_ACTION_CORE_TESTS=ON, in both build modes.
This commit is contained in:
2026-11-17 20:36:11 +07:00
parent 669c3f7c06
commit 70a2913253

View File

@@ -380,7 +380,10 @@ endif()
# ========================================================
# Tests
# ========================================================
if(CATKIN_ENABLE_TESTING AND BUILDING_WITH_CATKIN)
# Tests are OFF by default in both build modes; enable with -DBUILD_ACTION_CORE_TESTS=ON.
option(BUILD_ACTION_CORE_TESTS "Build the action_core unit tests" OFF)
if(BUILD_ACTION_CORE_TESTS AND CATKIN_ENABLE_TESTING AND BUILDING_WITH_CATKIN)
if(NOT COMMAND catkin_add_gtest)
message(FATAL_ERROR "catkin_add_gtest NOT FOUND")