From 74b010cbb94d23a5f01eb01c4100ebbd251a50be Mon Sep 17 00:00:00 2001 From: Martchus Date: Tue, 16 Jun 2020 01:09:39 +0200 Subject: [PATCH] Make manually added test targets as part of the check target --- cmake/modules/TestTarget.cmake | 5 ----- cmake/modules/TestUtilities.cmake | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmake/modules/TestTarget.cmake b/cmake/modules/TestTarget.cmake index 8cced2c..f647bd4 100644 --- a/cmake/modules/TestTarget.cmake +++ b/cmake/modules/TestTarget.cmake @@ -302,10 +302,5 @@ if (CLANG_SOURCE_BASED_COVERAGE_AVAILABLE) endif () endif () -# add the test executable to the dependencies of the check target -if (NOT META_TEST_TARGET_IS_MANUAL) - add_dependencies(check ${META_TARGET_NAME}_tests) -endif () - set(META_HAVE_TESTS YES) set(TEST_CONFIG_DONE YES) diff --git a/cmake/modules/TestUtilities.cmake b/cmake/modules/TestUtilities.cmake index 1862a77..50e465a 100644 --- a/cmake/modules/TestUtilities.cmake +++ b/cmake/modules/TestUtilities.cmake @@ -64,4 +64,9 @@ function (configure_test_target) if (NOT ARGS_MANUAL) add_test(NAME "${ARGS_TARGET_NAME}_run_${ARGS_TEST_NAME}" COMMAND "${TEST_TARGET_NAME}" ${RUN_ARGS}) endif () + + # add the test executable to the dependencies of the check target + if (NOT ARGS_MANUAL AND TARGET check) + add_dependencies(check ${TEST_TARGET_NAME}) + endif () endfunction ()