Files
mpp/test/CMakeLists.txt
2015-08-12 03:34:28 +00:00

25 lines
825 B
CMake

# vim: syntax=cmake
# ----------------------------------------------------------------------------
# mpp built-in unit test case
# ----------------------------------------------------------------------------
# macro for adding mpp sub-module unit test
macro(add_mpp_test module)
set(test_name ${module}_test)
string(TOUPPER ${test_name} test_tag)
#message(STATUS "moduule : ${module}")
#message(STATUS "test_name : ${test_name}")
#message(STATUS "test_tag : ${test_tag}")
option(${test_tag} "Build mpp ${module} unit test" ON)
if(${test_tag})
add_executable(${test_name} ${test_name}.c)
target_link_libraries(${test_name} mpp)
install(TARGETS ${test_name} RUNTIME DESTINATION ${TEST_INSTALL_DIR})
endif()
endmacro()
# info system unit test
add_mpp_test(vpu_api)