1
0
Fork 0
mirror of https://github.com/TheLartians/ModernCppStarter.git synced 2025-08-30 21:51:12 +02:00

use doctest_discover_tests to find individual tests

This commit is contained in:
Lars Melchior 2020-04-14 17:05:56 +02:00
parent adf2801be6
commit 84aa01f1f5

View file

@ -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 ----