forked from qbittorrent/qBittorrent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
34 lines (28 loc) · 916 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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()