File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313# limitations under the License.
1414
1515macro (find_or_add_gtest )
16- # Check if building on an ament context, i.e. ROS 2
17- # Thanks to https://github.com/facontidavide/PlotJuggler/blob/main/CMakeLists.txt#L66
18- find_package (ament_cmake QUIET )
19-
20- # This is a ROS 2 build
21- if (ament_cmake_FOUND)
22- # Find all GTest vendor required packages
23- find_package (ament_cmake REQUIRED )
24- find_package (gtest_vendor REQUIRED )
25- find_package (ament_cmake_gtest REQUIRED )
26-
27- # Find GTest
28- ament_find_gtest ()
29-
30- # Add aliases for GTest libraries so we can use them as targets independently of the context
31- add_library (GTest::gtest ALIAS gtest )
32- add_library (GTest::gtest_main ALIAS gtest_main )
33- target_link_libraries (gtest_main gtest )
34-
35- # This is a non-ROS 2 build
36- else ()
37- # Find GTest normally
38- find_package (GTest CONFIG REQUIRED )
39- endif ()
16+ # Find GTest normally
17+ find_package (GTest CONFIG REQUIRED )
4018endmacro ()
Original file line number Diff line number Diff line change 11name: fastcdr
22type: cmake
33test-dependencies:
4- # Needed for test compilation in ROS 2 CI
5- - ament_cmake_gtest
6- - ament_cmake
74 # Needed for test compilation in eProsima CI
85 - googletest-distribution
Original file line number Diff line number Diff line change 1717 <buildtool_depend >cmake</buildtool_depend >
1818 <doc_depend >doxygen</doc_depend >
1919
20- <test_depend >ament_cmake_gtest</test_depend >
21- <test_depend >ament_cmake</test_depend >
20+ <test_depend >libgtest-dev</test_depend >
2221
2322 <export >
2423 <build_type >cmake</build_type >
You can’t perform that action at this time.
0 commit comments