27 lines
557 B
CMake
27 lines
557 B
CMake
find_package(Qt5Test REQUIRED)
|
|
|
|
add_subdirectory(common)
|
|
|
|
set(TESTS
|
|
TestQFilesystemHandler
|
|
TestQHttpParser
|
|
TestQHttpServer
|
|
TestQHttpSocket
|
|
TestQHttpSubHandler
|
|
TestQIByteArray
|
|
TestQIODeviceCopier
|
|
)
|
|
|
|
foreach(TEST ${TESTS})
|
|
add_executable(${TEST} "${TEST}.cpp")
|
|
qt5_use_modules(${TEST} Test)
|
|
target_link_libraries(${TEST} qhttpengine common)
|
|
set_target_properties(${TEST} PROPERTIES
|
|
RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}"
|
|
)
|
|
|
|
add_test(NAME ${TEST}
|
|
COMMAND ${TEST}
|
|
)
|
|
endforeach()
|