1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-09 22:37:59 +00:00
qBittorrent/test/CMakeLists.txt

32 lines
822 B
CMake
Raw Normal View History

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
2022-07-10 07:21:07 +00:00
testalgorithm.cpp
testbittorrenttrackerentry.cpp
testconceptsstringable.cpp
testglobal.cpp
2022-07-10 07:21:07 +00:00
testorderedset.cpp
2022-08-13 04:32:18 +00:00
testpath.cpp
2022-07-10 07:21:07 +00:00
testutilscompare.cpp
2023-06-01 14:16:03 +00:00
testutilsbytearray.cpp
testutilsgzip.cpp
testutilsio.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()