From c0406efbda168c554bc5380b01a8539466fecd26 Mon Sep 17 00:00:00 2001 From: duongtd Date: Sat, 15 Aug 2026 12:43:49 +0700 Subject: [PATCH] build: look up GTest quietly instead of requiring it GTest is only used by the test executables, which the robot deployment build does not produce. Requiring it at the top of the file made cmake fail to configure on a machine without GTest installed even with the tests off. --- robot_tf3_geometry_msgs/CMakeLists.txt | 5 ++++- robot_tf3_sensor_msgs/CMakeLists.txt | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/robot_tf3_geometry_msgs/CMakeLists.txt b/robot_tf3_geometry_msgs/CMakeLists.txt index d050c17..943653b 100755 --- a/robot_tf3_geometry_msgs/CMakeLists.txt +++ b/robot_tf3_geometry_msgs/CMakeLists.txt @@ -18,7 +18,10 @@ set(CMAKE_CXX_EXTENSIONS OFF) # Find dependencies find_package(Boost REQUIRED COMPONENTS system thread) find_package(Eigen3 REQUIRED) -find_package(GTest REQUIRED) +# GTest is only needed by the test executables, which the robot deployment build +# does not produce. QUIET, not REQUIRED: a robot without GTest installed must +# still configure. The test block below requires it where it is actually used. +find_package(GTest QUIET) if (NOT BUILDING_WITH_CATKIN) diff --git a/robot_tf3_sensor_msgs/CMakeLists.txt b/robot_tf3_sensor_msgs/CMakeLists.txt index cded734..3172d58 100755 --- a/robot_tf3_sensor_msgs/CMakeLists.txt +++ b/robot_tf3_sensor_msgs/CMakeLists.txt @@ -18,7 +18,10 @@ set(CMAKE_CXX_EXTENSIONS OFF) # Find dependencies find_package(Boost REQUIRED COMPONENTS system thread) find_package(Eigen3 REQUIRED) -find_package(GTest REQUIRED) +# GTest is only needed by the test executables, which the robot deployment build +# does not produce. QUIET, not REQUIRED: a robot without GTest installed must +# still configure. The test block below requires it where it is actually used. +find_package(GTest QUIET) if (NOT BUILDING_WITH_CATKIN)