mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
cmake: fix warning
When not building for testing, test_mixer_multirotor is not available and causes a waraning with cmake 3.17: This project specifies custom command DEPENDS on files in the build tree that are not specified as the OUTPUT or BYPRODUCTS of any add_custom_command or add_custom_target: test_mixer_multirotor
This commit is contained in:
committed by
Matthias Grob
parent
e898b7f110
commit
b895a356aa
@@ -368,9 +368,8 @@ list(APPEND CMAKE_MODULE_PATH ${PX4_SOURCE_DIR}/cmake/gtest/)
|
|||||||
include(px4_add_gtest)
|
include(px4_add_gtest)
|
||||||
if(BUILD_TESTING)
|
if(BUILD_TESTING)
|
||||||
include(gtest)
|
include(gtest)
|
||||||
endif()
|
|
||||||
|
|
||||||
add_custom_target(test_results
|
add_custom_target(test_results
|
||||||
COMMAND GTEST_COLOR=1 ${CMAKE_CTEST_COMMAND} --output-on-failure -T Test -R ${TESTFILTER} USES_TERMINAL
|
COMMAND GTEST_COLOR=1 ${CMAKE_CTEST_COMMAND} --output-on-failure -T Test -R ${TESTFILTER} USES_TERMINAL
|
||||||
DEPENDS
|
DEPENDS
|
||||||
px4
|
px4
|
||||||
@@ -379,7 +378,9 @@ add_custom_target(test_results
|
|||||||
USES_TERMINAL
|
USES_TERMINAL
|
||||||
COMMENT "Running tests"
|
COMMENT "Running tests"
|
||||||
WORKING_DIRECTORY ${PX4_BINARY_DIR})
|
WORKING_DIRECTORY ${PX4_BINARY_DIR})
|
||||||
set_target_properties(test_results PROPERTIES EXCLUDE_FROM_ALL TRUE)
|
set_target_properties(test_results PROPERTIES EXCLUDE_FROM_ALL TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# subdirectories
|
# subdirectories
|
||||||
|
|||||||
Reference in New Issue
Block a user