Skip to content

Commit 2977980

Browse files
updated tests on cmake lists
1 parent d29d018 commit 2977980

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

CMakeLists.txt

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14)
1+
cmake_minimum_required(VERSION 3.5)
22

33
project(yolo_onnx_ros)
44

@@ -93,3 +93,25 @@ install(
9393
${PROJECT_NAME}
9494
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
9595
)
96+
97+
# ------------------------------------------------------------------------------------------------
98+
# Testing
99+
# ------------------------------------------------------------------------------------------------
100+
if (CATKIN_ENABLE_TESTING)
101+
#find_package(catkin_lint_cmake REQUIRED)
102+
#catkin_add_catkin_lint_test("-W2 --ignore HEADER_OUTSIDE_PACKAGE_INCLUDE_PATH")
103+
104+
# Utils unit tests (no models needed)
105+
catkin_add_gtest(yolo_test test/yolo_test.cpp)
106+
if(TARGET yolo_test)
107+
target_link_libraries(
108+
yolo_test
109+
${PROJECT_NAME}_lib
110+
${catkin_LIBRARIES}
111+
GTest::gtest
112+
GTest::gtest_main
113+
)
114+
#target_include_directories(yolo_test PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
115+
endif()
116+
117+
endif()

0 commit comments

Comments
 (0)