xref: /rockchip-linux_mpp/kmpp/test/CMakeLists.txt (revision 437bfbeb9567cca9cd9080e3f6954aa9d6a94f18)
1# vim: syntax=cmake
2# ----------------------------------------------------------------------------
3# kmpp/base built-in unit test case
4# ----------------------------------------------------------------------------
5# macro for adding osal sub-module unit test
6macro(add_kmpp_test module)
7    set(test_name ${module}_test)
8    string(TOUPPER ${test_name} test_tag)
9    #message(STATUS "moduule   : ${module}")
10    #message(STATUS "test_name : ${test_name}")
11    #message(STATUS "test_tag  : ${test_tag}")
12
13    option(${test_tag} "Build base ${module} unit test" ${BUILD_TEST})
14    if(${test_tag})
15        add_executable(${test_name} ${test_name}.c)
16        target_link_libraries(${test_name} ${MPP_SHARED})
17        set_target_properties(${test_name} PROPERTIES FOLDER "kmpp/test")
18        add_test(NAME ${test_name} COMMAND ${test_name})
19    endif()
20endmacro()
21
22# kmpp venc unit test
23add_kmpp_test(kmpp_venc)
24
25# kmpp vdec unit test
26add_kmpp_test(kmpp_vdec)
27
28