mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-07 01:52:46 +08:00
[cmake]: Add option to control test building
Signed-off-by: Herman Chen <herman.chen@rock-chips.com> Change-Id: Ic6c6988dad82836cfb87113f2293bc9a2b1abd66
This commit is contained in:
@@ -61,7 +61,7 @@ set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "CMakeTargets")
|
|||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
# enable test in this project
|
# enable test in this project
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
enable_testing()
|
option(BUILD_TEST "enable test binary building)" ON)
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
# System architecture detection
|
# System architecture detection
|
||||||
|
@@ -10,7 +10,7 @@ macro(add_mpp_base_test module)
|
|||||||
#message(STATUS "test_name : ${test_name}")
|
#message(STATUS "test_name : ${test_name}")
|
||||||
#message(STATUS "test_tag : ${test_tag}")
|
#message(STATUS "test_tag : ${test_tag}")
|
||||||
|
|
||||||
option(${test_tag} "Build base ${module} unit test" ON)
|
option(${test_tag} "Build base ${module} unit test" ${BUILD_TEST})
|
||||||
if(${test_tag})
|
if(${test_tag})
|
||||||
add_executable(${test_name} ${test_name}.c)
|
add_executable(${test_name} ${test_name}.c)
|
||||||
target_link_libraries(${test_name} ${MPP_SHARED})
|
target_link_libraries(${test_name} ${MPP_SHARED})
|
||||||
|
@@ -10,7 +10,7 @@ macro(add_mpp_rc_test module)
|
|||||||
set(test_name ${module}_test)
|
set(test_name ${module}_test)
|
||||||
string(TOUPPER ${test_name} test_tag)
|
string(TOUPPER ${test_name} test_tag)
|
||||||
|
|
||||||
option(${test_tag} "Build rc ${module} unit test" ON)
|
option(${test_tag} "Build rc ${module} unit test" ${BUILD_TEST})
|
||||||
if(${test_tag})
|
if(${test_tag})
|
||||||
add_executable(${test_name} ${test_name}.c)
|
add_executable(${test_name} ${test_name}.c)
|
||||||
target_link_libraries(${test_name} enc_rc mpp_base ${ASAN_LIB})
|
target_link_libraries(${test_name} enc_rc mpp_base ${ASAN_LIB})
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
# mpp/vproc/iep built-in unit test case
|
# mpp/vproc/iep built-in unit test case
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
# iep unit test
|
# iep unit test
|
||||||
option(IEP_TEST "Build base iep unit test" ON)
|
option(IEP_TEST "Build base iep unit test" ${BUILD_TEST})
|
||||||
add_executable(iep_test iep_test.cpp)
|
add_executable(iep_test iep_test.cpp)
|
||||||
target_link_libraries(iep_test ${MPP_SHARED} utils)
|
target_link_libraries(iep_test ${MPP_SHARED} utils)
|
||||||
set_target_properties(iep_test PROPERTIES FOLDER "mpp/vproc/iep")
|
set_target_properties(iep_test PROPERTIES FOLDER "mpp/vproc/iep")
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
# mpp/vproc/rga built-in unit test case
|
# mpp/vproc/rga built-in unit test case
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
# rga unit test
|
# rga unit test
|
||||||
option(RGA_TEST "Build base rga unit test" ON)
|
option(RGA_TEST "Build base rga unit test" ${BUILD_TEST})
|
||||||
add_executable(rga_test rga_test.cpp)
|
add_executable(rga_test rga_test.cpp)
|
||||||
target_link_libraries(rga_test ${MPP_SHARED} utils)
|
target_link_libraries(rga_test ${MPP_SHARED} utils)
|
||||||
set_target_properties(rga_test PROPERTIES FOLDER "mpp/vproc/rga")
|
set_target_properties(rga_test PROPERTIES FOLDER "mpp/vproc/rga")
|
||||||
|
@@ -10,7 +10,7 @@ macro(add_mpp_osal_test module)
|
|||||||
#message(STATUS "test_name : ${test_name}")
|
#message(STATUS "test_name : ${test_name}")
|
||||||
#message(STATUS "test_tag : ${test_tag}")
|
#message(STATUS "test_tag : ${test_tag}")
|
||||||
|
|
||||||
option(${test_tag} "Build osal ${module} unit test" ON)
|
option(${test_tag} "Build osal ${module} unit test" ${BUILD_TEST})
|
||||||
if(${test_tag})
|
if(${test_tag})
|
||||||
add_executable(${test_name} ${test_name}.c)
|
add_executable(${test_name} ${test_name}.c)
|
||||||
target_link_libraries(${test_name} ${MPP_SHARED})
|
target_link_libraries(${test_name} ${MPP_SHARED})
|
||||||
|
@@ -10,7 +10,7 @@ macro(add_mpp_test module)
|
|||||||
#message(STATUS "test_name : ${test_name}")
|
#message(STATUS "test_name : ${test_name}")
|
||||||
#message(STATUS "test_tag : ${test_tag}")
|
#message(STATUS "test_tag : ${test_tag}")
|
||||||
|
|
||||||
option(${test_tag} "Build mpp ${module} unit test" ON)
|
option(${test_tag} "Build mpp ${module} unit test" ${BUILD_TEST})
|
||||||
if(${test_tag})
|
if(${test_tag})
|
||||||
add_executable(${test_name} ${test_name}.c mpp_event_trigger.c mpp_parse_cfg.c)
|
add_executable(${test_name} ${test_name}.c mpp_event_trigger.c mpp_parse_cfg.c)
|
||||||
target_link_libraries(${test_name} ${MPP_SHARED} utils)
|
target_link_libraries(${test_name} ${MPP_SHARED} utils)
|
||||||
@@ -54,7 +54,7 @@ macro(add_legacy_test module)
|
|||||||
#message(STATUS "test_name : ${test_name}")
|
#message(STATUS "test_name : ${test_name}")
|
||||||
#message(STATUS "test_tag : ${test_tag}")
|
#message(STATUS "test_tag : ${test_tag}")
|
||||||
|
|
||||||
option(${test_tag} "Build legacy ${module} unit test" ON)
|
option(${test_tag} "Build legacy ${module} unit test" ${BUILD_TEST})
|
||||||
if(${test_tag})
|
if(${test_tag})
|
||||||
add_executable(${test_name} ${test_name}.c)
|
add_executable(${test_name} ${test_name}.c)
|
||||||
if(ASAN_CHECK)
|
if(ASAN_CHECK)
|
||||||
|
Reference in New Issue
Block a user