mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
Add unit testing possibility using googletest on POSIX
This commit is contained in:
@@ -413,6 +413,20 @@ if (NOT EXTERNAL_MODULES_LOCATION STREQUAL "")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
#=============================================================================
|
||||
# Testing - Automatic unit and integration testing with CTest
|
||||
#
|
||||
|
||||
option(unit_testing "Configure unit test targets" OFF)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH ${PX4_SOURCE_DIR}/cmake/gtest/)
|
||||
include(px4_add_gtest)
|
||||
|
||||
if(unit_testing)
|
||||
include(gtest)
|
||||
add_custom_target(unit_test COMMAND GTEST_COLOR=1 ${CMAKE_CTEST_COMMAND} -V -R Test USES_TERMINAL)
|
||||
endif()
|
||||
|
||||
#=============================================================================
|
||||
# subdirectories
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user