From 84aa01f1f5bade5882e9c983cc31a3d3b543cd52 Mon Sep 17 00:00:00 2001 From: Lars Melchior Date: Tue, 14 Apr 2020 17:05:56 +0200 Subject: [PATCH] use doctest_discover_tests to find individual tests --- test/CMakeLists.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 4e24265..9b4ce42 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -16,8 +16,7 @@ include(../cmake/CPM.cmake) CPMAddPackage( NAME doctest GITHUB_REPOSITORY onqtam/doctest - VERSION 2.3.2 - GIT_TAG 2.3.2 + GIT_TAG 2.3.7 ) if (TEST_INSTALLED_VERSION) @@ -50,7 +49,13 @@ endif() # ---- Add GreeterTests ---- ENABLE_TESTING() -ADD_TEST(GreeterTests GreeterTests) + +# use doctest_discover_tests for better CTest support +include(${doctest_SOURCE_DIR}/scripts/cmake/doctest.cmake) +doctest_discover_tests(GreeterTests) + +# Note: for general testing frameworks use: +# ADD_TEST(GreeterTests GreeterTests) # ---- code coverage ----