mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-28 21:38:51 +03:00
321d7e5b17
Closes #20102. PR #20729.
34 lines
916 B
CMake
34 lines
916 B
CMake
find_package(Qt6 REQUIRED COMPONENTS Test)
|
|
|
|
enable_testing(true)
|
|
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure)
|
|
|
|
include_directories("../src")
|
|
|
|
set(testFiles
|
|
testalgorithm.cpp
|
|
testbittorrenttrackerentry.cpp
|
|
testconceptsexplicitlyconvertibleto.cpp
|
|
testconceptsstringable.cpp
|
|
testglobal.cpp
|
|
testorderedset.cpp
|
|
testpath.cpp
|
|
testutilsbytearray.cpp
|
|
testutilscompare.cpp
|
|
testutilsdatetime.cpp
|
|
testutilsgzip.cpp
|
|
testutilsio.cpp
|
|
testutilsnumber.cpp
|
|
testutilsstring.cpp
|
|
testutilsversion.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}")
|
|
|
|
add_dependencies(check "${testFilename}")
|
|
endforeach()
|