mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-01 19:04:07 +08:00
cmake add ECL_TESTS option only enabled in standalone build
This commit is contained in:
parent
fabd216ca5
commit
a892ececf8
@ -104,6 +104,7 @@ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
|
||||
enable_testing()
|
||||
|
||||
if(BUILD_TESTING)
|
||||
option(ECL_TESTS "Build ECL tests" ON)
|
||||
|
||||
add_custom_target(check
|
||||
COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C Debug
|
||||
|
||||
@ -39,9 +39,8 @@ add_dependencies(ecl_validation prebuild_targets)
|
||||
target_compile_definitions(ecl_validation PRIVATE -DMODULE_NAME="ecl/validation")
|
||||
target_include_directories(ecl_validation PUBLIC ${ECL_SOURCE_DIR})
|
||||
|
||||
if(BUILD_TESTING)
|
||||
if(ECL_TESTS)
|
||||
add_definitions(-UNDEBUG) # keep assert
|
||||
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
|
||||
@ -35,5 +35,5 @@ add_executable(ecl_tests_data_validator test_data_validator.cpp)
|
||||
target_link_libraries(ecl_tests_data_validator ecl_validation)
|
||||
|
||||
add_test(NAME ecl_tests_data_validator
|
||||
COMMAND ecl_tests_data_validator
|
||||
)
|
||||
COMMAND ecl_tests_data_validator
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user