diff --git a/CMakeLists.txt b/CMakeLists.txt index 802cb78..0e05948 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -191,9 +191,12 @@ endif() # ======================================================== # Tests # ======================================================== +# Tests are OFF by default in both build modes; enable with -DBUILD_ROBOT_IMAGE_GEOMETRY_TESTS=ON. +option(BUILD_ROBOT_IMAGE_GEOMETRY_TESTS "Build the robot_image_geometry unit tests" OFF) + if(BUILDING_WITH_CATKIN) - if(CATKIN_ENABLE_TESTING AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/test) + if(BUILD_ROBOT_IMAGE_GEOMETRY_TESTS AND CATKIN_ENABLE_TESTING AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/test) add_subdirectory(test) endif()