From f71bf2371f9943708108af9f072fd7b028c49f80 Mon Sep 17 00:00:00 2001 From: Max Luebke Date: Tue, 2 Apr 2024 10:21:00 +0000 Subject: [PATCH] Update doctest library and fix target link --- test/CMakeLists.txt | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 19c4daf..49b3d73 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,18 +1,7 @@ -find_library(DOCTEST_LIB doctest) - -if(NOT DOCTEST_LIB) - include(FetchContent) - - FetchContent_Declare( - DocTest - GIT_REPOSITORY https://github.com/doctest/doctest.git - GIT_TAG v2.4.9) - - FetchContent_MakeAvailable(DocTest) -endif() +find_package(doctest REQUIRED) add_executable(testTug setup.cpp testSimulation.cpp testGrid.cpp testFTCS.cpp testBoundary.cpp) -target_link_libraries(testTug doctest tug) +target_link_libraries(testTug doctest::doctest tug) # get relative path of the CSV file get_filename_component(testSimulationCSV "FTCS_11_11_7000.csv" REALPATH)