Files
mpp/kmpp/base/test/CMakeLists.txt
Herman Chen 6b51725df4 feat[kmpp]: Add kmpp_frame_test
1. Add kmpp frame / buffer / packet / meta define in rk_type.h
2. Move KmppObj, KmppObjDef and KmppShmPtr to rk_type.h
3. Add kmpp_frame_test
4. Add kmpp_objdef_get_offset function in kmpp_obj.c

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ib4aecfc26f60521288b6e33b8c4e0af5afd3213b
2025-04-03 17:18:34 +08:00

27 lines
973 B
CMake

# vim: syntax=cmake
# ----------------------------------------------------------------------------
# kmpp/base built-in unit test case
# ----------------------------------------------------------------------------
# macro for adding osal sub-module unit test
macro(add_kmpp_base_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 base ${module} unit test" ${BUILD_TEST})
if(${test_tag})
add_executable(${test_name} ${test_name}.c)
target_link_libraries(${test_name} ${MPP_SHARED})
set_target_properties(${test_name} PROPERTIES FOLDER "osal/test")
add_test(NAME ${test_name} COMMAND ${test_name})
endif()
endmacro()
# kmpp object unit test
add_kmpp_base_test(kmpp_obj)
# kmpp frame unit test
add_kmpp_base_test(kmpp_frame)