From 3196a1904046a0f53e8d56fad5393703365e9d06 Mon Sep 17 00:00:00 2001 From: duongtd Date: Sat, 15 Aug 2026 12:43:50 +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. --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d8cf8fe..81f3a62 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,10 @@ set(CMAKE_CXX_EXTENSIONS OFF) # Find dependencies find_package(Eigen3 REQUIRED) find_package(Boost REQUIRED COMPONENTS system thread filesystem) -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) find_package(PCL REQUIRED COMPONENTS common io) find_package(yaml-cpp REQUIRED)