forked from agilexrobotics/ugv_sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
23 lines (19 loc) · 827 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Google tests
message(STATUS "Build unit tests with Google Test.")
add_subdirectory(googletest)
# reference: https://cliutils.gitlab.io/modern-cmake/chapters/testing/googletest.html
mark_as_advanced(
BUILD_GMOCK BUILD_GTEST BUILD_SHARED_LIBS
gmock_build_tests gtest_build_samples gtest_build_tests
gtest_disable_pthreads gtest_force_shared_crt gtest_hide_internal_symbols
)
# add unit tests
add_executable(utests
unit_tests/utest_scout_v1_command.cpp
unit_tests/utest_hunter_v1_command.cpp)
target_link_libraries(utests PRIVATE gtest gmock gtest_main ${PROJECT_NAME})
get_target_property(PRIVATE_HEADERS ${PROJECT_NAME} INCLUDE_DIRECTORIES)
target_include_directories(utests PRIVATE ${PRIVATE_HEADERS})
# gtest_discover_tests(utests)
# add_test(NAME gtest_all COMMAND utests)
# add_subdirectory(devel)