diff --git a/CMakeLists.txt b/CMakeLists.txt index a77e429..1c43522 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -152,7 +152,10 @@ endif() # ======================================================== # Tests # ======================================================== -if(CATKIN_ENABLE_TESTING AND BUILDING_WITH_CATKIN) +# Tests are OFF by default in both build modes; enable with -DBUILD_DOCK_PATTERN_DETECTOR_TESTS=ON. +option(BUILD_DOCK_PATTERN_DETECTOR_TESTS "Build the dock_pattern_detector unit tests" OFF) + +if(BUILD_DOCK_PATTERN_DETECTOR_TESTS AND CATKIN_ENABLE_TESTING AND BUILDING_WITH_CATKIN) if(NOT COMMAND catkin_add_gtest) message(FATAL_ERROR "catkin_add_gtest NOT FOUND")