Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-Authored-By: Niels Lohmann <niels.lohmann@gmail.com>
  • Loading branch information
ArthurSonzogni and nlohmann authored Apr 29, 2020
1 parent c331706 commit 4be4a03
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,13 @@ target_link_libraries(foo PRIVATE nlohmann_json::nlohmann_json)
```

##### Embedded (FetchContent)

Since CMake v3.11,
[FetchContent](https://cmake.org/cmake/help/v3.11/module/FetchContent.html) can
be used to automatically download the repository as a dependency.
be used to automatically download the repository as a dependency at configure type.

Example:
~~~cmake
```cmake
include(FetchContent)
FetchContent_Declare(json
Expand All @@ -153,11 +154,10 @@ if(NOT json_POPULATED)
endif()
target_link_libraries(foo PRIVATE nlohmann_json::nlohmann_json)
~~~
**Note**: The repository https://github.com/nlohmann/json download size is huge.
It contains all the dataset used for the benchmarks. You might want to depend on
a smaller repository. For instance, you might want to replace the URL above by:
a smaller repository. For instance, you might want to replace the URL above by
https://github.com/ArthurSonzogni/nlohmann_json_cmake_fetchcontent
#### Supporting Both
Expand Down

0 comments on commit 4be4a03

Please sign in to comment.