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.
This commit is contained in:
2026-08-15 12:43:49 +07:00
parent 915672339a
commit c0406efbda
2 changed files with 8 additions and 2 deletions

View File

@@ -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)

View File

@@ -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)