1# vim: syntax=cmake 2# ---------------------------------------------------------------------------- 3# rate control built-in unit test case 4# ---------------------------------------------------------------------------- 5 6include_directories(..) 7 8# macro for adding osal sub-module unit test 9macro(add_mpp_rc_test module) 10 set(test_name ${module}_test) 11 string(TOUPPER ${test_name} test_tag) 12 13 option(${test_tag} "Build rc ${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} ${ASAN_LIB}) 17 set_target_properties(${test_name} PROPERTIES FOLDER "osal/test") 18 add_test(NAME ${test_name} COMMAND ${test_name}) 19 endif() 20endmacro() 21 22# mpp rc unit test 23add_mpp_rc_test(rc_base) 24 25# mpp rc api test 26add_mpp_rc_test(rc_api) 27