2023-07-20 08:17:27 +00:00
|
|
|
find_package(Qt6 REQUIRED COMPONENTS Test)
|
2022-07-10 05:20:27 +00:00
|
|
|
|
|
|
|
enable_testing(true)
|
|
|
|
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure)
|
|
|
|
|
|
|
|
include_directories("../src")
|
|
|
|
|
2022-07-11 05:55:46 +00:00
|
|
|
set(testFiles
|
2022-07-10 07:21:07 +00:00
|
|
|
testalgorithm.cpp
|
2022-09-12 15:29:09 +00:00
|
|
|
testbittorrenttrackerentry.cpp
|
2023-08-12 12:53:03 +00:00
|
|
|
testconceptsstringable.cpp
|
2023-06-17 18:20:12 +00:00
|
|
|
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
|
2022-07-11 05:55:46 +00:00
|
|
|
testutilsgzip.cpp
|
2023-06-14 05:38:19 +00:00
|
|
|
testutilsio.cpp
|
2022-07-29 03:16:40 +00:00
|
|
|
testutilsstring.cpp
|
2022-07-30 14:56:31 +00:00
|
|
|
testutilsversion.cpp
|
2022-07-11 05:55:46 +00:00
|
|
|
)
|
2022-07-30 10:22:06 +00:00
|
|
|
|
2022-07-10 05:20:27 +00:00
|
|
|
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}")
|
2022-07-30 10:22:06 +00:00
|
|
|
|
|
|
|
add_dependencies(check "${testFilename}")
|
2022-07-10 05:20:27 +00:00
|
|
|
endforeach()
|