aboutsummaryrefslogtreecommitdiff
path: root/test/CMakeLists.txt
blob: ad2ca1ff9ce9cce5899c6b878203a73ff1126089 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

macro(create_test testname)
    add_executable(${testname}
            ${testname}.cpp ${testname}.h
            autotests.qrc
            ${ARGN})

    target_include_directories(${testname} PRIVATE ../lib PRIVATE ../src)
    target_link_libraries(${testname} Qt5::Test Qt5::Concurrent Qt5::WebEngineWidgets)

    add_test(NAME smolbote-${testname} COMMAND ${testname})
endmacro()

create_test(HostlistTest ../src/webengine/urlinterceptor.cpp ../src/webengine/urlinterceptor.h)