aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-03-19 13:37:34 +0100
committerHampusM <hampus@hampusmat.com>2022-06-13 17:56:56 +0200
commit592244455cabfd5891471bb29fd84fcb85cc41e4 (patch)
tree4e066e0a1e9c4f2762300ebb70ff07100f1c4a01
parent3d5de7c7a3e2e563fc4f5b2948a0fb666676b79e (diff)
build: make doctest only fetched with the TESTING flag on
-rw-r--r--lib/CMakeLists.txt16
1 files changed, 9 insertions, 7 deletions
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()