aboutsummaryrefslogtreecommitdiff
path: root/test/CMakeLists.txt
blob: 29c95fff8df4ba69096dfa1d30c085ebf7d2a1c4 (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 ../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)