build: default the test executables to the build mode instead of always on
The standalone CMake build is the robot deployment path and must not pull in GTest or produce test executables. A catkin workspace is a development machine and keeps the tests. -DBUILD_COSTMAP_TESTS=ON still forces them on standalone.
This commit is contained in:
@@ -278,7 +278,12 @@ endif()
|
|||||||
# ========================================================
|
# ========================================================
|
||||||
# Test executables
|
# Test executables
|
||||||
# ========================================================
|
# ========================================================
|
||||||
option(BUILD_COSTMAP_TESTS "Build robot_costmap_2d test executables" ON)
|
# Default follows the build mode, not a fixed value: a catkin workspace is a
|
||||||
|
# development machine and gets the tests, while the standalone CMake build is how
|
||||||
|
# the robot is deployed and must not need GTest installed at all. Force it on with
|
||||||
|
# -DBUILD_COSTMAP_TESTS=ON to run the tests from a standalone build.
|
||||||
|
option(BUILD_COSTMAP_TESTS "Build robot_costmap_2d test executables"
|
||||||
|
${BUILDING_WITH_CATKIN})
|
||||||
|
|
||||||
if(BUILD_COSTMAP_TESTS)
|
if(BUILD_COSTMAP_TESTS)
|
||||||
find_package(GTest REQUIRED)
|
find_package(GTest REQUIRED)
|
||||||
|
|||||||
Reference in New Issue
Block a user