Browse Source

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
sbg
Julian Oes 5 years ago committed by Matthias Grob
parent
commit
b895a356aa
  1. 7
      CMakeLists.txt

7
CMakeLists.txt

@ -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

Loading…
Cancel
Save