mirror of
https://github.com/westonrobot/ugv_sdk
synced 2023-04-08 06:32:14 +08:00
18 lines
572 B
CMake
18 lines
572 B
CMake
# 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
|
|
set(GRAPH_TESTS
|
|
unit_tests/scout_can_protocol_test.cpp
|
|
)
|
|
add_executable(gtest_all ${GRAPH_TESTS})
|
|
target_link_libraries(gtest_all gtest gmock gtest_main wrp_sdk)
|