qBittorrent/test/CMakeLists.txt
Vladimir Golovnev dbe79484d2
Drop support of Qt 5
Also remove usage of some deprecated stuff.

PR #19338.
2023-07-20 11:17:27 +03:00

30 lines
791 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
testglobal.cpp
testorderedset.cpp
testpath.cpp
testutilscompare.cpp
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()