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

use add_test() and add a warning why

doctest_discover_tests() is only availabe if doctest is not imported with
find_packag()
This commit is contained in:
ClausKlein 2021-02-10 22:41:20 +01:00
parent 88781d22ab
commit 5e7f68d260

View file

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