diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f891c9..af3ee50 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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")