From 5e7f68d260fe8c4d3f829291d56e9bd5fad54543 Mon Sep 17 00:00:00 2001 From: ClausKlein Date: Wed, 10 Feb 2021 22:41:20 +0100 Subject: [PATCH] use add_test() and add a warning why doctest_discover_tests() is only availabe if doctest is not imported with find_packag() --- test/CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index dfff2c1..dafeaab 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -62,10 +62,11 @@ endif() enable_testing() # Note: doctest and similar testing frameworks can automatically configure CMake tests For other -# testing frameworks add the tests target instead: ADD_TEST(GreeterTests GreeterTests) - -include(${doctest_SOURCE_DIR}/scripts/cmake/doctest.cmake) -doctest_discover_tests(GreeterTests) +# testing frameworks add the tests target instead: +add_test(greeterTests GreeterTests) +# include(${doctest_SOURCE_DIR}/scripts/cmake/doctest.cmake) +# doctest_discover_tests(GreeterTests) +# Waning: if doctest is imported with find_package() this will fail! CK # ---- code coverage ----