From 958929aa775b51f91a6448776897f247901d8332 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sat, 30 Jul 2022 18:22:06 +0800 Subject: [PATCH] Improve command for running test It enables `make check` command to build tests and run it altogether. --- test/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 3b8babbc8..f53a31f89 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -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()