aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-03-19 13:16:18 +0100
committerHampusM <hampus@hampusmat.com>2022-06-13 17:56:56 +0200
commit020303df1410d10546f53d0bfee4f48797d4f067 (patch)
tree40fada01c1cad3a49892cb04907f852bc6a5d96f
parentdc6222611ad14a33f642396558ba84ecba9d6605 (diff)
build: add dependencies GSL & doctest
-rw-r--r--lib/CMakeLists.txt16
-rw-r--r--lib/GSL/CMakeLists.txt4
-rw-r--r--lib/doctest/CMakeLists.txt4
-rw-r--r--src/CMakeLists.txt2
4 files changed, 25 insertions, 1 deletions
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 58dfd29..9f07eb4 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -15,3 +15,19 @@ FetchContent_Declare(
)
add_subdirectory(fmt)
+
+FetchContent_Declare(
+ GSL
+ GIT_REPOSITORY "https://github.com/Microsoft/GSL"
+ GIT_TAG v4.0.0
+)
+
+add_subdirectory(GSL)
+
+FetchContent_Declare(
+ doctest
+ GIT_REPOSITORY "https://github.com/doctest/doctest"
+ GIT_TAG v2.4.8
+)
+
+add_subdirectory(doctest)
diff --git a/lib/GSL/CMakeLists.txt b/lib/GSL/CMakeLists.txt
new file mode 100644
index 0000000..ecc7b69
--- /dev/null
+++ b/lib/GSL/CMakeLists.txt
@@ -0,0 +1,4 @@
+message(STATUS "Fetching GSL...")
+
+FetchContent_MakeAvailable(GSL)
+
diff --git a/lib/doctest/CMakeLists.txt b/lib/doctest/CMakeLists.txt
new file mode 100644
index 0000000..0ca5267
--- /dev/null
+++ b/lib/doctest/CMakeLists.txt
@@ -0,0 +1,4 @@
+message(STATUS "Fetching doctest...")
+
+FetchContent_MakeAvailable(doctest)
+
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 152272f..3ad9b06 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -57,6 +57,6 @@ endif()
target_include_directories(${PROJECT_NAME} PRIVATE .)
-target_link_libraries_system(${PROJECT_NAME} ctre fmt)
+target_link_libraries_system(${PROJECT_NAME} ctre fmt GSL)
target_link_options(${PROJECT_NAME} PRIVATE -fsanitize=address)