mirror of
https://github.com/nlohmann/json.git
synced 2025-07-29 23:01:16 +03:00
deploy: 981a4c39f4
This commit is contained in:
5
integration/bazel/BUILD
Normal file
5
integration/bazel/BUILD
Normal file
@ -0,0 +1,5 @@
|
||||
cc_binary(
|
||||
name = "main",
|
||||
srcs = ["example.cpp"],
|
||||
deps = ["@nlohmann_json//:json"],
|
||||
)
|
7
integration/bazel/WORKSPACE
Normal file
7
integration/bazel/WORKSPACE
Normal file
@ -0,0 +1,7 @@
|
||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||
|
||||
http_archive(
|
||||
name = "nlohmann_json",
|
||||
urls = ["https://github.com/nlohmann/json/archive/refs/tags/v3.11.3.tar.gz"],
|
||||
strip_prefix = "json-3.11.3",
|
||||
)
|
10
integration/bazel/example.cpp
Normal file
10
integration/bazel/example.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
std::cout << std::setw(4) << json::meta() << std::endl;
|
||||
}
|
7
integration/cget/CMakeLists.txt
Normal file
7
integration/cget/CMakeLists.txt
Normal file
@ -0,0 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
project(json_example)
|
||||
|
||||
find_package(nlohmann_json REQUIRED)
|
||||
|
||||
add_executable(json_example example.cpp)
|
||||
target_link_libraries(json_example PRIVATE nlohmann_json::nlohmann_json)
|
10
integration/cget/example.cpp
Normal file
10
integration/cget/example.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
std::cout << std::setw(4) << json::meta() << std::endl;
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -1,9 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
project(json_example)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
add_definitions("-std=c++11")
|
||||
|
||||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
||||
conan_basic_setup()
|
||||
find_package(nlohmann_json REQUIRED)
|
||||
|
||||
add_executable(json_example example.cpp)
|
||||
target_link_libraries(json_example ${CONAN_LIBS})
|
||||
target_link_libraries(json_example PRIVATE nlohmann_json::nlohmann_json)
|
||||
|
@ -1,5 +1,6 @@
|
||||
[requires]
|
||||
nlohmann_json/3.7.3
|
||||
nlohmann_json/3.11.3
|
||||
|
||||
[generators]
|
||||
cmake
|
||||
CMakeToolchain
|
||||
CMakeDeps
|
||||
|
@ -1,9 +1,10 @@
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
std::cout << json::meta() << std::endl;
|
||||
std::cout << std::setw(4) << json::meta() << std::endl;
|
||||
}
|
||||
|
9
integration/cpm/CMakeLists.txt
Normal file
9
integration/cpm/CMakeLists.txt
Normal file
@ -0,0 +1,9 @@
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
project(json_example)
|
||||
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/CPM.cmake)
|
||||
|
||||
CPMAddPackage("gh:nlohmann/json@3.11.3")
|
||||
|
||||
add_executable(json_example example.cpp)
|
||||
target_link_libraries(json_example PRIVATE nlohmann_json::nlohmann_json)
|
10
integration/cpm/example.cpp
Normal file
10
integration/cpm/example.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
std::cout << std::setw(4) << json::meta() << std::endl;
|
||||
}
|
7
integration/homebrew/CMakeLists.txt
Normal file
7
integration/homebrew/CMakeLists.txt
Normal file
@ -0,0 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
project(json_example)
|
||||
|
||||
find_package(nlohmann_json CONFIG REQUIRED)
|
||||
|
||||
add_executable(json_example example.cpp)
|
||||
target_link_libraries(json_example PRIVATE nlohmann_json::nlohmann_json)
|
10
integration/homebrew/example.cpp
Normal file
10
integration/homebrew/example.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
std::cout << std::setw(4) << json::meta() << std::endl;
|
||||
}
|
15
integration/hunter/CMakeLists.txt
Normal file
15
integration/hunter/CMakeLists.txt
Normal file
@ -0,0 +1,15 @@
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
include("cmake/HunterGate.cmake")
|
||||
HunterGate(
|
||||
URL "https://github.com/cpp-pm/hunter/archive/v0.23.297.tar.gz"
|
||||
SHA1 "3319fe6a3b08090df7df98dee75134d68e2ef5a3"
|
||||
)
|
||||
|
||||
project(json_example)
|
||||
|
||||
hunter_add_package(nlohmann_json)
|
||||
find_package(nlohmann_json CONFIG REQUIRED)
|
||||
|
||||
add_executable(json_example example.cpp)
|
||||
target_link_libraries(json_example PRIVATE nlohmann_json::nlohmann_json)
|
10
integration/hunter/example.cpp
Normal file
10
integration/hunter/example.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
std::cout << std::setw(4) << json::meta() << std::endl;
|
||||
}
|
File diff suppressed because one or more lines are too long
10
integration/meson/example.cpp
Normal file
10
integration/meson/example.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
std::cout << std::setw(4) << json::meta() << std::endl;
|
||||
}
|
12
integration/meson/meson.build
Normal file
12
integration/meson/meson.build
Normal file
@ -0,0 +1,12 @@
|
||||
project('json_example', 'cpp',
|
||||
version: '1.0',
|
||||
default_options: ['cpp_std=c++11']
|
||||
)
|
||||
|
||||
dependency_json = dependency('nlohmann_json', required: true)
|
||||
|
||||
executable('json_example',
|
||||
sources: ['example.cpp'],
|
||||
dependencies: [dependency_json],
|
||||
install: true
|
||||
)
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
7
integration/spack/CMakeLists.txt
Normal file
7
integration/spack/CMakeLists.txt
Normal file
@ -0,0 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
project(json_example)
|
||||
|
||||
find_package(nlohmann_json REQUIRED)
|
||||
|
||||
add_executable(json_example example.cpp)
|
||||
target_link_libraries(json_example PRIVATE nlohmann_json::nlohmann_json)
|
10
integration/spack/example.cpp
Normal file
10
integration/spack/example.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
std::cout << std::setw(4) << json::meta() << std::endl;
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
project(json_example)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
|
||||
find_package(nlohmann_json CONFIG REQUIRED)
|
||||
|
||||
|
@ -1,9 +1,10 @@
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
std::cout << json::meta() << std::endl;
|
||||
std::cout << std::setw(4) << json::meta() << std::endl;
|
||||
}
|
||||
|
Reference in New Issue
Block a user