Files
PX4-Autopilot/test/CMakeLists.txt
T
2015-11-07 14:27:12 -05:00

36 lines
664 B
CMake

set(tests
setIdentity
inverse
matrixMult
vectorAssignment
matrixAssignment
matrixScalarMult
transpose
vector
vector2
vector3
attitude
filter
squareMatrix
)
add_custom_target(test_build)
foreach(test_name ${tests})
add_executable(${test_name}
${test_name}.cpp)
add_test(test_${test_name} ${test_name})
add_dependencies(test_build ${test_name})
endforeach()
if (COVERAGE)
add_custom_target(coverage
COMMAND lcov --capture --directory . --output-file coverage.info
COMMAND genhtml coverage.info --output-directory out
COMMAND x-www-browser out/index.html
WORKING_DIRECTORY ${CMAKE_BUILD_DIR}
DEPENDS coveralls test_build
)
endif()