mavsdk_tests: add to PX4 Makefile/CMakeLists.txt

This commit is contained in:
Julian Oes 2019-10-24 11:32:03 +02:00 committed by Lorenz Meier
parent 5f67075481
commit 97d7925431
3 changed files with 13 additions and 4 deletions

View File

@ -386,6 +386,12 @@ add_custom_target(test_results
WORKING_DIRECTORY ${PX4_BINARY_DIR})
set_target_properties(test_results PROPERTIES EXCLUDE_FROM_ALL TRUE)
# Integration testing using MAVSDK
option(MAVSDK_TESTING "Integration testing using MAVSDK" OFF)
if (MAVSDK_TESTING)
add_subdirectory(mavsdk_tests)
endif()
#=============================================================================
# subdirectories
#

View File

@ -141,6 +141,10 @@ else
endif
ifdef PX4_MAVSDK_TESTING
CMAKE_ARGS += -DMAVSDK_TESTING=ON
endif
# Functions
# --------------------------------------------------------------------
# describe how to build a cmake config

View File

@ -1,9 +1,5 @@
cmake_minimum_required(VERSION 3.5.1)
project(test_mission_multicopter)
add_definitions("-std=c++17 -Wall -Wextra -Werror")
find_package(MAVSDK REQUIRED)
add_executable(test_mission_multicopter
@ -18,3 +14,6 @@ target_link_libraries(test_mission_multicopter
MAVSDK::mavsdk_mission
MAVSDK::mavsdk_telemetry
)
target_compile_options(test_mission_multicopter
PRIVATE -std=c++17 -Wall -Wextra -Werror)