15 lines
582 B
CMake
15 lines
582 B
CMake
# 单元测试:只依赖 core,不需要模型文件、不需要显示环境。
|
|||
|
|
# 需要真模型的集成测试不放在这里(会另外打 label)。
|
||
|
|
find_package(Qt6 REQUIRED COMPONENTS Test)
|
||
|
|
|
||
|
|
function(lc_add_test name)
|
||
|
|
add_executable(${name} ${name}.cpp)
|
||
|
|
target_link_libraries(${name} PRIVATE livecaption_core Qt6::Test)
|
||
|
|
target_include_directories(${name} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||
|
|
add_test(NAME ${name} COMMAND ${name})
|
||
|
|
endfunction()
|
||
|
|
|
||
|
|
lc_add_test(tst_transcript)
|
||
|
|
lc_add_test(tst_vad)
|
||
|
|
lc_add_test(tst_streamingasr)
|
||
|
|
lc_add_test(tst_livepipeline)
|