mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-09 14:27:56 +00:00
0802b6d506
`QProcess::splitCommand()` will omit empty strings like `""` so provide our own replacement. Closes #13124.
26 lines
675 B
CMake
26 lines
675 B
CMake
if (QT6)
|
|
find_package(Qt6 REQUIRED COMPONENTS Test)
|
|
else()
|
|
find_package(Qt5 REQUIRED COMPONENTS Test)
|
|
endif()
|
|
|
|
enable_testing(true)
|
|
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure)
|
|
|
|
include_directories("../src")
|
|
|
|
set(testFiles
|
|
testalgorithm.cpp
|
|
testorderedset.cpp
|
|
testutilscompare.cpp
|
|
testutilsgzip.cpp
|
|
testutilsstring.cpp
|
|
)
|
|
foreach(testFile ${testFiles})
|
|
get_filename_component(testFilename "${testFile}" NAME_WLE)
|
|
|
|
add_executable("${testFilename}" "${testFile}")
|
|
target_link_libraries("${testFilename}" PRIVATE Qt::Test qbt_base)
|
|
add_test(NAME "${testFilename}" COMMAND "${testFilename}")
|
|
endforeach()
|