build: add BUILD_DOCK_PATTERN_ACTION_TESTS option, off by default
Tests used to build whenever CATKIN_ENABLE_TESTING was on. They now also need -DBUILD_DOCK_PATTERN_ACTION_TESTS=ON, in both build modes.
This commit is contained in:
@@ -167,7 +167,10 @@ endif()
|
||||
|
||||
# Test chạy qua `catkin_add_gtest` và cần `CATKIN_DEVEL_PREFIX` để biết plugin nằm ở đâu, nên chỉ
|
||||
# có ở nhánh catkin. Ở standalone, plugin vẫn build — chỉ không có test.
|
||||
if(CATKIN_ENABLE_TESTING AND BUILDING_WITH_CATKIN)
|
||||
# Test mặc định OFF trong cả hai chế độ build; bật bằng -DBUILD_DOCK_PATTERN_ACTION_TESTS=ON.
|
||||
option(BUILD_DOCK_PATTERN_ACTION_TESTS "Build the dock_pattern_action unit tests" OFF)
|
||||
|
||||
if(BUILD_DOCK_PATTERN_ACTION_TESTS AND CATKIN_ENABLE_TESTING AND BUILDING_WITH_CATKIN)
|
||||
if(NOT COMMAND catkin_add_gtest)
|
||||
message(FATAL_ERROR "catkin_add_gtest NOT FOUND")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user