diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2026-01-06 14:19:58 +0100 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2026-01-06 14:19:58 +0100 |
| commit | 66e986572d65e622e78190aa971313ed7e3c8b9b (patch) | |
| tree | d3bcdaf2eeb66da2d3898e037224c99c3ad426c1 /CMakeLists.txt | |
| parent | d9ab9b52be6950f5429d9b9b4d3596599f53449d (diff) | |
| download | newtype-develop.tar.xz newtype-develop.zip | |
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ea55749..b46834c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,9 +8,29 @@ project("newtype" # Project Options -option(NEWTYPE_BUILD_DOCS "Build the library documentation" ON) -option(NEWTYPE_BUILD_EXAMPLES "Build the library examples" ON) -option(NEWTYPE_BUILD_TESTS "Build the library tests" ON) +option(NEWTYPE_BUILD_DOCS "Build the library documentation" OFF) +option(NEWTYPE_BUILD_EXAMPLES "Build the library examples" OFF) +option(NEWTYPE_BUILD_TESTS "Build the library tests" OFF) + +# Project Dependencies + +include("FetchContent") + +if(NEWTYPE_BUILD_TESTS) + FetchContent_Declare( + "Catch2" + URL "https://github.com/catchorg/Catch2/archive/refs/tags/v3.7.0.zip" + URL_HASH "SHA256=75b04c94471a70680f10f5d0d985bd1a96b8941d040d6a7bfd43f6c6b1de9daf" + EXCLUDE_FROM_ALL + FIND_PACKAGE_ARGS + "3.7.0" EXACT + COMPONENTS "Catch2WithMain" + ) + + FetchContent_MakeAvailable("Catch2") + + include("Catch") +endif() # Project Components @@ -21,6 +41,7 @@ if(NEWTYPE_BUILD_DOCS) endif() if(NEWTYPE_BUILD_EXAMPLES) + include("cmake/Modules/AddExample.cmake") add_subdirectory("examples") endif() |
