1
0
mirror of synced 2025-01-03 10:21:32 +01:00

fix: names need to match to share fetches

This commit is contained in:
Henry Schreiner 2020-08-05 16:17:00 -04:00
parent 571a244dbd
commit 8fb3c4fcbb
2 changed files with 5 additions and 3 deletions

View File

@ -14,7 +14,7 @@ For example, to download Catch2:
FetchContent_Declare( FetchContent_Declare(
catch catch
GIT_REPOSITORY https://github.com/catchorg/Catch2.git GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v2.9.1 GIT_TAG v2.13.0
) )
# CMake 3.14+ # CMake 3.14+
@ -48,4 +48,6 @@ endif()
Now you have the CMake 3.14+ syntax in CMake 3.11+. 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 [FetchContent]: https://cmake.org/cmake/help/latest/module/FetchContent.html

View File

@ -1,9 +1,9 @@
# Testing library # Testing library
FetchContent_Declare( FetchContent_Declare(
catch2 catch
GIT_REPOSITORY https://github.com/catchorg/Catch2.git GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v2.9.1) GIT_TAG v2.9.1)
FetchContent_MakeAvailable(catch2) FetchContent_MakeAvailable(catch)
# Adds Catch2::Catch2 # Adds Catch2::Catch2
# Tests need to be added as executables first # Tests need to be added as executables first