Browse Source

Improve command for running test

It enables `make check` command to build tests and run it
altogether.
adaptive-webui-19844
Chocobo1 2 years ago
parent
commit
958929aa77
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 3
      test/CMakeLists.txt

3
test/CMakeLists.txt

@ -16,10 +16,13 @@ set(testFiles @@ -16,10 +16,13 @@ set(testFiles
testutilsgzip.cpp
testutilsstring.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()

Loading…
Cancel
Save