mirror of
https://github.com/nlohmann/json.git
synced 2026-10-04 05:30:31 +00:00
🔖 set version to 3.12.0 (#4727)
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
@@ -18,7 +18,7 @@ and use the namespaced imported target from the generated package configuration:
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
project(ExampleProject LANGUAGES CXX)
|
||||
|
||||
find_package(nlohmann_json 3.11.3 REQUIRED)
|
||||
find_package(nlohmann_json 3.12.0 REQUIRED)
|
||||
|
||||
add_executable(example example.cpp)
|
||||
target_link_libraries(example PRIVATE nlohmann_json::nlohmann_json)
|
||||
@@ -77,7 +77,7 @@ to the following.
|
||||
|
||||
```cmake title="thirdparty/CMakeLists.txt"
|
||||
if(EXAMPLE_USE_EXTERNAL_JSON)
|
||||
find_package(nlohmann_json 3.11.3 REQUIRED)
|
||||
find_package(nlohmann_json 3.12.0 REQUIRED)
|
||||
else()
|
||||
set(JSON_BuildTests OFF CACHE INTERNAL "")
|
||||
add_subdirectory(nlohmann_json)
|
||||
@@ -100,7 +100,7 @@ automatically download a release as a dependency at configure time.
|
||||
|
||||
include(FetchContent)
|
||||
|
||||
FetchContent_Declare(json URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz)
|
||||
FetchContent_Declare(json URL https://github.com/nlohmann/json/releases/download/v3.12.0/json.tar.xz)
|
||||
FetchContent_MakeAvailable(json)
|
||||
|
||||
add_executable(example example.cpp)
|
||||
@@ -115,7 +115,7 @@ automatically download a release as a dependency at configure time.
|
||||
```cmake
|
||||
FetchContent_Declare(json
|
||||
GIT_REPOSITORY https://github.com/nlohmann/json
|
||||
GIT_TAG v3.11.3
|
||||
GIT_TAG v3.12.0
|
||||
)
|
||||
```
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[requires]
|
||||
nlohmann_json/3.11.3
|
||||
nlohmann_json/3.12.0
|
||||
|
||||
[generators]
|
||||
CMakeToolchain
|
||||
|
||||
@@ -3,7 +3,7 @@ project(json_example)
|
||||
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/CPM.cmake)
|
||||
|
||||
CPMAddPackage("gh:nlohmann/json@3.11.3")
|
||||
CPMAddPackage("gh:nlohmann/json@3.12.0")
|
||||
|
||||
add_executable(json_example example.cpp)
|
||||
target_link_libraries(json_example PRIVATE nlohmann_json::nlohmann_json)
|
||||
|
||||
@@ -398,7 +398,7 @@ If you are using [cget](http://cget.readthedocs.io/en/latest/), you can install
|
||||
cget install nlohmann/json
|
||||
```
|
||||
|
||||
A specific version can be installed with `cget install nlohmann/json@v3.11.3`. Also, the multiple header version can be
|
||||
A specific version can be installed with `cget install nlohmann/json@v3.12.0`. Also, the multiple header version can be
|
||||
installed by adding the `-DJSON_MultipleHeaders=ON` flag (i.e., `cget install nlohmann/json -DJSON_MultipleHeaders=ON`).
|
||||
|
||||
??? example
|
||||
@@ -727,7 +727,7 @@ If you are using [`CPM.cmake`](https://github.com/TheLartians/CPM.cmake), add th
|
||||
[CPM.cmake script](https://github.com/TheLartians/CPM.cmake#adding-cpm) and the following snippet to your CMake project:
|
||||
|
||||
```cmake
|
||||
CPMAddPackage("gh:nlohmann/json@3.11.3")
|
||||
CPMAddPackage("gh:nlohmann/json@3.12.0")
|
||||
```
|
||||
|
||||
??? example
|
||||
|
||||
Reference in New Issue
Block a user