Unverified Commit 4be4a038 by Arthur Sonzogni Committed by GitHub

Apply suggestions from code review

parent c3317066
...@@ -134,12 +134,13 @@ target_link_libraries(foo PRIVATE nlohmann_json::nlohmann_json) ...@@ -134,12 +134,13 @@ target_link_libraries(foo PRIVATE nlohmann_json::nlohmann_json)
``` ```
##### Embedded (FetchContent) ##### Embedded (FetchContent)
Since CMake v3.11, Since CMake v3.11,
[FetchContent](https://cmake.org/cmake/help/v3.11/module/FetchContent.html) can [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: Example:
~~~cmake ```cmake
include(FetchContent) include(FetchContent)
FetchContent_Declare(json FetchContent_Declare(json
...@@ -153,11 +154,10 @@ if(NOT json_POPULATED) ...@@ -153,11 +154,10 @@ if(NOT json_POPULATED)
endif() endif()
target_link_libraries(foo PRIVATE nlohmann_json::nlohmann_json) target_link_libraries(foo PRIVATE nlohmann_json::nlohmann_json)
~~~
**Note**: The repository https://github.com/nlohmann/json download size is huge. **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 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 https://github.com/ArthurSonzogni/nlohmann_json_cmake_fetchcontent
#### Supporting Both #### Supporting Both
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment