From 8fb3c4fcbb5fd3a679e2477fed4b853e9f32a3c4 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Wed, 5 Aug 2020 16:17:00 -0400 Subject: [PATCH] fix: names need to match to share fetches --- chapters/projects/fetch.md | 4 +++- examples/extended-project/tests/CMakeLists.txt | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/chapters/projects/fetch.md b/chapters/projects/fetch.md index ea33b04..e23bbc3 100644 --- a/chapters/projects/fetch.md +++ b/chapters/projects/fetch.md @@ -14,7 +14,7 @@ For example, to download Catch2: FetchContent_Declare( catch GIT_REPOSITORY https://github.com/catchorg/Catch2.git - GIT_TAG v2.9.1 + GIT_TAG v2.13.0 ) # CMake 3.14+ @@ -48,4 +48,6 @@ endif() Now you have the CMake 3.14+ syntax in CMake 3.11+. +See the example [here](https://gitlab.com/CLIUtils/modern-cmake/-/tree/master/examples/fetch). + [FetchContent]: https://cmake.org/cmake/help/latest/module/FetchContent.html diff --git a/examples/extended-project/tests/CMakeLists.txt b/examples/extended-project/tests/CMakeLists.txt index 80ce3cf..96c9129 100644 --- a/examples/extended-project/tests/CMakeLists.txt +++ b/examples/extended-project/tests/CMakeLists.txt @@ -1,9 +1,9 @@ # Testing library FetchContent_Declare( - catch2 + catch GIT_REPOSITORY https://github.com/catchorg/Catch2.git GIT_TAG v2.9.1) -FetchContent_MakeAvailable(catch2) +FetchContent_MakeAvailable(catch) # Adds Catch2::Catch2 # Tests need to be added as executables first