aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2026-09-22 16:50:16 +0200
committerFelix Morgner <felix.morgner@gmail.com>2026-09-22 16:50:16 +0200
commitf71d9ea85244326e0ecd60e4e78b1212776c9e7e (patch)
treee70933c0cda0a89eacbaaadd5189c29cc8087d43
parent042b4d380fc7553132c60c0769ff7bd5622b9e2f (diff)
downloadttwhy-f71d9ea85244326e0ecd60e4e78b1212776c9e7e.tar.xz
ttwhy-f71d9ea85244326e0ecd60e4e78b1212776c9e7e.zip
build: clean up dependency integration
-rw-r--r--CMakeLists.txt33
1 files changed, 21 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4228310..3a83af3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,18 +5,19 @@ project("ttwhy"
LANGUAGES CXX
)
-### Fetch Dependencies
+include("CTest")
+
+### System Dependencies
+
+find_package("Threads")
+
+### External Dependencies
include("FetchContent")
FetchContent_Declare("asio"
GIT_REPOSITORY "https://github.com/chriskohlhoff/asio"
- GIT_TAG "asio-1-38-0"
-)
-
-FetchContent_Declare("catch2"
- GIT_REPOSITORY "https://github.com/catchorg/Catch2.git"
- GIT_TAG "v3.15.1"
+ GIT_TAG "asio-1-38-2"
)
FetchContent_Declare("sml"
@@ -24,16 +25,24 @@ FetchContent_Declare("sml"
GIT_TAG "v1.2.0"
)
+if (BUILD_TESTING)
+ FetchContent_Declare("Catch2"
+ GIT_REPOSITORY "https://github.com/catchorg/Catch2.git"
+ GIT_TAG "v3.16.0"
+ EXCLUDE_FROM_ALL
+ FIND_PACKAGE_ARGS
+ )
+endif()
+
+
FetchContent_MakeAvailable(
"asio"
- "catch2"
+ "Catch2"
"sml"
)
### asio
-find_package("Threads")
-
add_library("asio" INTERFACE)
add_library("ext::asio" ALIAS "asio")
@@ -104,9 +113,9 @@ target_link_libraries("ttwhy" PRIVATE
### Tests
-include("CTest")
-
if(BUILD_TESTING)
+ find_package("Catch2")
+
include("Catch")
add_executable("ttwhy-tests")