diff --git a/CMakeLists.txt b/CMakeLists.txt index e6120e52..ff13c18f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,7 +61,7 @@ set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "CMakeTargets") # ---------------------------------------------------------------------------- # enable test in this project # ---------------------------------------------------------------------------- -enable_testing() +option(BUILD_TEST "enable test binary building)" ON) # ---------------------------------------------------------------------------- # System architecture detection diff --git a/mpp/base/test/CMakeLists.txt b/mpp/base/test/CMakeLists.txt index be270ab4..f1348661 100644 --- a/mpp/base/test/CMakeLists.txt +++ b/mpp/base/test/CMakeLists.txt @@ -10,7 +10,7 @@ macro(add_mpp_base_test module) #message(STATUS "test_name : ${test_name}") #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}) add_executable(${test_name} ${test_name}.c) target_link_libraries(${test_name} ${MPP_SHARED}) diff --git a/mpp/codec/rc/test/CMakeLists.txt b/mpp/codec/rc/test/CMakeLists.txt index 0f266f28..6548d27a 100644 --- a/mpp/codec/rc/test/CMakeLists.txt +++ b/mpp/codec/rc/test/CMakeLists.txt @@ -10,7 +10,7 @@ macro(add_mpp_rc_test module) set(test_name ${module}_test) 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}) add_executable(${test_name} ${test_name}.c) target_link_libraries(${test_name} enc_rc mpp_base ${ASAN_LIB}) diff --git a/mpp/vproc/iep/test/CMakeLists.txt b/mpp/vproc/iep/test/CMakeLists.txt index 9b60ba2a..5f3069f5 100644 --- a/mpp/vproc/iep/test/CMakeLists.txt +++ b/mpp/vproc/iep/test/CMakeLists.txt @@ -3,7 +3,7 @@ # mpp/vproc/iep built-in unit test case # ---------------------------------------------------------------------------- # 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) target_link_libraries(iep_test ${MPP_SHARED} utils) set_target_properties(iep_test PROPERTIES FOLDER "mpp/vproc/iep") diff --git a/mpp/vproc/rga/test/CMakeLists.txt b/mpp/vproc/rga/test/CMakeLists.txt index d70e43fa..af0ee436 100644 --- a/mpp/vproc/rga/test/CMakeLists.txt +++ b/mpp/vproc/rga/test/CMakeLists.txt @@ -3,7 +3,7 @@ # mpp/vproc/rga built-in unit test case # ---------------------------------------------------------------------------- # 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) target_link_libraries(rga_test ${MPP_SHARED} utils) set_target_properties(rga_test PROPERTIES FOLDER "mpp/vproc/rga") diff --git a/osal/test/CMakeLists.txt b/osal/test/CMakeLists.txt index e263ff45..1f136936 100644 --- a/osal/test/CMakeLists.txt +++ b/osal/test/CMakeLists.txt @@ -10,7 +10,7 @@ macro(add_mpp_osal_test module) #message(STATUS "test_name : ${test_name}") #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}) add_executable(${test_name} ${test_name}.c) target_link_libraries(${test_name} ${MPP_SHARED}) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 6a1e1530..f3a005bc 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -10,7 +10,7 @@ macro(add_mpp_test module) #message(STATUS "test_name : ${test_name}") #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}) add_executable(${test_name} ${test_name}.c mpp_event_trigger.c mpp_parse_cfg.c) 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_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}) add_executable(${test_name} ${test_name}.c) if(ASAN_CHECK)