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:
@@ -16,7 +16,10 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|||||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||||
|
|
||||||
# Find dependencies
|
# Find dependencies
|
||||||
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(Threads REQUIRED)
|
find_package(Threads REQUIRED)
|
||||||
|
|
||||||
if (NOT BUILDING_WITH_CATKIN)
|
if (NOT BUILDING_WITH_CATKIN)
|
||||||
|
|||||||
Reference in New Issue
Block a user