From 592244455cabfd5891471bb29fd84fcb85cc41e4 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 19 Mar 2022 13:37:34 +0100 Subject: build: make doctest only fetched with the TESTING flag on --- lib/CMakeLists.txt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'lib/CMakeLists.txt') diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 9f07eb4..0873b00 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -24,10 +24,12 @@ FetchContent_Declare( add_subdirectory(GSL) -FetchContent_Declare( - doctest - GIT_REPOSITORY "https://github.com/doctest/doctest" - GIT_TAG v2.4.8 -) - -add_subdirectory(doctest) +if("${TESTING}") + FetchContent_Declare( + doctest + GIT_REPOSITORY "https://github.com/doctest/doctest" + GIT_TAG v2.4.8 + ) + + add_subdirectory(doctest) +endif() -- cgit v1.2.3-18-g5258