aboutsummaryrefslogtreecommitdiff
path: root/test/CMakeLists.txt
blob: 8799002bd72cae8369bb454423d47fb0f854655a (plain)
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
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

# AdblockTest
add_executable(AdBlockTest
    adblock/adblocktest.cpp
    adblock/adblocktest.h
)

target_include_directories(AdBlockTest PRIVATE ../lib/urlfilter)
target_link_libraries(AdBlockTest Qt5::Test urlfilter)
add_test(NAME urlfilter-adblock COMMAND AdBlockTest WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})

# HostlistTest
add_executable(HostlistTest
    hostlist/hostlisttest.cpp
    hostlist/hostlisttest.h
)
target_include_directories(HostlistTest PRIVATE ../lib/urlfilter/)
target_link_libraries(HostlistTest Qt5::Test urlfilter)
add_test(NAME urlfilter-hostlist COMMAND HostlistTest WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})

# matching algorithm benchmark
add_executable(MatcherBenchmark
    matcherbenchmark/matcherbenchmark.cpp
    matcherbenchmark/matcherbenchmark.h
)
target_link_libraries(MatcherBenchmark Qt5::Test)
# Adding this benchmark to tests is unnecessary as it doesn't test anything.
#add_test(NAME matcher-benchmark COMMAND MatcherBenchmark WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})