Update README.md

This commit is contained in:
Lars Melchior
2019-05-19 19:02:33 +02:00
committed by GitHub
parent a086f637fb
commit 530fc8d42f

View File

@@ -83,6 +83,8 @@ CPMAddPackage(
) )
``` ```
See [here](https://github.com/TheLartians/CPM/blob/master/examples/doctest/CMakeLists.txt) for doctest example.
### [google/benchmark](https://github.com/google/benchmark.git) ### [google/benchmark](https://github.com/google/benchmark.git)
Has a CMakeLists.txt that supports `add_subdirectory`, but needs some configuring to work without external dependencies. Has a CMakeLists.txt that supports `add_subdirectory`, but needs some configuring to work without external dependencies.
@@ -100,20 +102,21 @@ CPMAddPackage(
set_target_properties(benchmark PROPERTIES CXX_STANDARD 17) set_target_properties(benchmark PROPERTIES CXX_STANDARD 17)
``` ```
### [Simple match](https://github.com/jbandela/simple_match.git) ### [nlohmann/json](https://github.com/nlohmann/json)
Header-only library without releases or CMakeLists.txt, target must be created manually. Header-only library with a huge git repositoy.
Instead of downloading the whole repositoy, we fetch the zip included with the release and create our own target.
```cmake ```cmake
CPMAddPackage( CPMAddPackage(
NAME simple_match NAME nlohmann_json
GIT_REPOSITORY https://github.com/jbandela/simple_match.git VERSION 3.6.1
GIT_TAG a3ab17f3d98db302de68ad85ed399a42ae41889e URL https://github.com/nlohmann/json/releases/download/v3.6.1/include.zip
DOWNLOAD_ONLY True URL_HASH SHA256=69cc88207ce91347ea530b227ff0776db82dcb8de6704e1a3d74f4841bc651cf
) )
add_library(simple_match INTERFACE IMPORTED) add_library(nlohmann_json INTERFACE)
target_include_directories(simple_match INTERFACE "${simple_match_SOURCE_DIR}/include") target_include_directories(nlohmann_json INTERFACE ${nlohmann_json_SOURCE_DIR})
``` ```
### [Lua](https://www.lua.org) ### [Lua](https://www.lua.org)