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