mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-09 19:10:15 +08:00

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@63 6e48237b-75ef-9749-8fc9-41990f28c85a
33 lines
1002 B
CMake
33 lines
1002 B
CMake
# vim: syntax=cmake
|
|
# ----------------------------------------------------------------------------
|
|
# OSAL built-in unit test case
|
|
# ----------------------------------------------------------------------------
|
|
# macro for adding osal sub-module unit test
|
|
macro(add_mpp_osal_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 osal ${module} unit test" ON)
|
|
if(${test_tag})
|
|
add_executable(${test_name} ${test_name}.c)
|
|
target_link_libraries(${test_name} osal)
|
|
install(TARGETS ${test_name} RUNTIME DESTINATION ${TEST_INSTALL_DIR})
|
|
endif()
|
|
endmacro()
|
|
|
|
# log system unit test
|
|
add_mpp_osal_test(mpp_log)
|
|
|
|
# env system unit test
|
|
add_mpp_osal_test(mpp_env)
|
|
|
|
# malloc system unit test
|
|
add_mpp_osal_test(mpp_mem)
|
|
|
|
# thread implement unit test
|
|
add_mpp_osal_test(mpp_thread)
|
|
|