From f1256645fb579e33125228c3da6f2b1ea491f6de Mon Sep 17 00:00:00 2001 From: Dirk Thomas Date: Thu, 9 Nov 2017 16:20:07 -0800 Subject: [PATCH] only find GTest once --- rcl/test/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rcl/test/CMakeLists.txt b/rcl/test/CMakeLists.txt index 3238f14..43e4c6b 100644 --- a/rcl/test/CMakeLists.txt +++ b/rcl/test/CMakeLists.txt @@ -14,6 +14,10 @@ set(extra_test_libraries) set(extra_test_env) set(extra_lib_dirs "${rcl_lib_dir}") +# finding gtest once in the highest scope +# prevents finding it repeatedly in each local scope +ament_find_gtest() + # This subdirectory extends both extra_test_libraries, extra_test_env, and extra_lib_dirs. add_subdirectory(memory_tools)