fix cmake install directory (for real this time)
* Rename 'develop' folder to 'include/nlohmann' * Rename 'src' folder to 'single_include/nlohmann' * Use <nlohmann/*> headers in sources and tests * Change amalgamate config file
This commit is contained in:
parent
9958dde3da
commit
14cd019861
73 changed files with 226 additions and 224 deletions
|
@ -24,7 +24,6 @@ option(JSON_MultipleHeaders "Use non-amalgamated version of the library." OFF)
|
||||||
set(NLOHMANN_JSON_TARGET_NAME ${PROJECT_NAME})
|
set(NLOHMANN_JSON_TARGET_NAME ${PROJECT_NAME})
|
||||||
set(NLOHMANN_JSON_CONFIG_INSTALL_DIR "lib/cmake/${PROJECT_NAME}")
|
set(NLOHMANN_JSON_CONFIG_INSTALL_DIR "lib/cmake/${PROJECT_NAME}")
|
||||||
set(NLOHMANN_JSON_INCLUDE_INSTALL_DIR "include")
|
set(NLOHMANN_JSON_INCLUDE_INSTALL_DIR "include")
|
||||||
set(NLOHMANN_JSON_HEADER_INSTALL_DIR "${NLOHMANN_JSON_INCLUDE_INSTALL_DIR}/nlohmann")
|
|
||||||
set(NLOHMANN_JSON_TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
|
set(NLOHMANN_JSON_TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
|
||||||
set(NLOHMANN_JSON_CMAKE_CONFIG_TEMPLATE "cmake/config.cmake.in")
|
set(NLOHMANN_JSON_CMAKE_CONFIG_TEMPLATE "cmake/config.cmake.in")
|
||||||
set(NLOHMANN_JSON_CMAKE_CONFIG_DIR "${CMAKE_CURRENT_BINARY_DIR}/cmake_config")
|
set(NLOHMANN_JSON_CMAKE_CONFIG_DIR "${CMAKE_CURRENT_BINARY_DIR}/cmake_config")
|
||||||
|
@ -32,9 +31,9 @@ set(NLOHMANN_JSON_CMAKE_VERSION_CONFIG_FILE "${NLOHMANN_JSON_CMAKE_CONFIG_DIR}/$
|
||||||
set(NLOHMANN_JSON_CMAKE_PROJECT_CONFIG_FILE "${NLOHMANN_JSON_CMAKE_CONFIG_DIR}/${PROJECT_NAME}Config.cmake")
|
set(NLOHMANN_JSON_CMAKE_PROJECT_CONFIG_FILE "${NLOHMANN_JSON_CMAKE_CONFIG_DIR}/${PROJECT_NAME}Config.cmake")
|
||||||
|
|
||||||
if (JSON_MultipleHeaders)
|
if (JSON_MultipleHeaders)
|
||||||
set(NLOHMANN_JSON_SOURCE_DIR "develop/")
|
set(NLOHMANN_JSON_INCLUDE_BUILD_DIR "${PROJECT_SOURCE_DIR}/include/")
|
||||||
else()
|
else()
|
||||||
set(NLOHMANN_JSON_SOURCE_DIR "src/")
|
set(NLOHMANN_JSON_INCLUDE_BUILD_DIR "${PROJECT_SOURCE_DIR}/single_include/")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@ -46,7 +45,7 @@ add_library(${NLOHMANN_JSON_TARGET_NAME} INTERFACE)
|
||||||
target_include_directories(
|
target_include_directories(
|
||||||
${NLOHMANN_JSON_TARGET_NAME}
|
${NLOHMANN_JSON_TARGET_NAME}
|
||||||
INTERFACE
|
INTERFACE
|
||||||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${NLOHMANN_JSON_SOURCE_DIR}>
|
$<BUILD_INTERFACE:${NLOHMANN_JSON_INCLUDE_BUILD_DIR}>
|
||||||
$<INSTALL_INTERFACE:include>
|
$<INSTALL_INTERFACE:include>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -70,7 +69,6 @@ include(CTest) #adds option BUILD_TESTING (default ON)
|
||||||
|
|
||||||
if(BUILD_TESTING AND JSON_BuildTests)
|
if(BUILD_TESTING AND JSON_BuildTests)
|
||||||
enable_testing()
|
enable_testing()
|
||||||
include_directories(${NLOHMANN_JSON_SOURCE_DIR})
|
|
||||||
add_subdirectory(test)
|
add_subdirectory(test)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -87,9 +85,10 @@ configure_package_config_file(
|
||||||
${NLOHMANN_JSON_CMAKE_PROJECT_CONFIG_FILE}
|
${NLOHMANN_JSON_CMAKE_PROJECT_CONFIG_FILE}
|
||||||
INSTALL_DESTINATION ${NLOHMANN_JSON_CONFIG_INSTALL_DIR}
|
INSTALL_DESTINATION ${NLOHMANN_JSON_CONFIG_INSTALL_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
DIRECTORY ${NLOHMANN_JSON_SOURCE_DIR}
|
DIRECTORY ${NLOHMANN_JSON_INCLUDE_BUILD_DIR}
|
||||||
DESTINATION ${NLOHMANN_JSON_HEADER_INSTALL_DIR}
|
DESTINATION ${NLOHMANN_JSON_INCLUDE_INSTALL_DIR}
|
||||||
)
|
)
|
||||||
install(
|
install(
|
||||||
FILES ${NLOHMANN_JSON_CMAKE_PROJECT_CONFIG_FILE} ${NLOHMANN_JSON_CMAKE_VERSION_CONFIG_FILE}
|
FILES ${NLOHMANN_JSON_CMAKE_PROJECT_CONFIG_FILE} ${NLOHMANN_JSON_CMAKE_VERSION_CONFIG_FILE}
|
||||||
|
|
78
Makefile
78
Makefile
|
@ -1,37 +1,39 @@
|
||||||
.PHONY: pretty clean ChangeLog.md
|
.PHONY: pretty clean ChangeLog.md
|
||||||
|
|
||||||
SRCS = develop/json.hpp \
|
SRCS = include/nlohmann/json.hpp \
|
||||||
develop/json_fwd.hpp \
|
include/nlohmann/json_fwd.hpp \
|
||||||
develop/adl_serializer.hpp \
|
include/nlohmann/adl_serializer.hpp \
|
||||||
develop/detail/conversions/from_json.hpp \
|
include/nlohmann/detail/conversions/from_json.hpp \
|
||||||
develop/detail/conversions/to_chars.hpp \
|
include/nlohmann/detail/conversions/to_chars.hpp \
|
||||||
develop/detail/conversions/to_json.hpp \
|
include/nlohmann/detail/conversions/to_json.hpp \
|
||||||
develop/detail/exceptions.hpp \
|
include/nlohmann/detail/exceptions.hpp \
|
||||||
develop/detail/input/binary_reader.hpp \
|
include/nlohmann/detail/input/binary_reader.hpp \
|
||||||
develop/detail/input/input_adapters.hpp \
|
include/nlohmann/detail/input/input_adapters.hpp \
|
||||||
develop/detail/input/lexer.hpp \
|
include/nlohmann/detail/input/lexer.hpp \
|
||||||
develop/detail/input/parser.hpp \
|
include/nlohmann/detail/input/parser.hpp \
|
||||||
develop/detail/iterators/internal_iterator.hpp \
|
include/nlohmann/detail/iterators/internal_iterator.hpp \
|
||||||
develop/detail/iterators/iter_impl.hpp \
|
include/nlohmann/detail/iterators/iter_impl.hpp \
|
||||||
develop/detail/iterators/iteration_proxy.hpp \
|
include/nlohmann/detail/iterators/iteration_proxy.hpp \
|
||||||
develop/detail/iterators/json_reverse_iterator.hpp \
|
include/nlohmann/detail/iterators/json_reverse_iterator.hpp \
|
||||||
develop/detail/iterators/primitive_iterator.hpp \
|
include/nlohmann/detail/iterators/primitive_iterator.hpp \
|
||||||
develop/detail/json_pointer.hpp \
|
include/nlohmann/detail/json_pointer.hpp \
|
||||||
develop/detail/json_ref.hpp \
|
include/nlohmann/detail/json_ref.hpp \
|
||||||
develop/detail/macro_scope.hpp \
|
include/nlohmann/detail/macro_scope.hpp \
|
||||||
develop/detail/macro_unscope.hpp \
|
include/nlohmann/detail/macro_unscope.hpp \
|
||||||
develop/detail/meta.hpp \
|
include/nlohmann/detail/meta.hpp \
|
||||||
develop/detail/output/binary_writer.hpp \
|
include/nlohmann/detail/output/binary_writer.hpp \
|
||||||
develop/detail/output/output_adapters.hpp \
|
include/nlohmann/detail/output/output_adapters.hpp \
|
||||||
develop/detail/output/serializer.hpp \
|
include/nlohmann/detail/output/serializer.hpp \
|
||||||
develop/detail/value_t.hpp
|
include/nlohmann/detail/value_t.hpp
|
||||||
|
|
||||||
UNAME = $(shell uname)
|
UNAME = $(shell uname)
|
||||||
CXX=clang++
|
CXX=clang++
|
||||||
|
|
||||||
|
AMALGAMATED_FILE=single_include/nlohmann/json.hpp
|
||||||
|
|
||||||
# main target
|
# main target
|
||||||
all:
|
all:
|
||||||
@echo "amalgamate - amalgamate file src/json.hpp from the develop sources"
|
@echo "amalgamate - amalgamate file single_include/nlohmann/json.hpp from the include/nlohmann sources"
|
||||||
@echo "ChangeLog.md - generate ChangeLog file"
|
@echo "ChangeLog.md - generate ChangeLog file"
|
||||||
@echo "check - compile and execute test suite"
|
@echo "check - compile and execute test suite"
|
||||||
@echo "check-amalgamation - check whether sources have been amalgamated"
|
@echo "check-amalgamation - check whether sources have been amalgamated"
|
||||||
|
@ -243,7 +245,7 @@ fuzzing-stop:
|
||||||
|
|
||||||
# call cppcheck on the main header file
|
# call cppcheck on the main header file
|
||||||
cppcheck:
|
cppcheck:
|
||||||
cppcheck --enable=warning --inconclusive --force --std=c++11 src/json.hpp --error-exitcode=1
|
cppcheck --enable=warning --inconclusive --force --std=c++11 $(AMALGAMATED_FILE) --error-exitcode=1
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
@ -257,29 +259,29 @@ pretty:
|
||||||
--indent-col1-comments --pad-oper --pad-header --align-pointer=type \
|
--indent-col1-comments --pad-oper --pad-header --align-pointer=type \
|
||||||
--align-reference=type --add-brackets --convert-tabs --close-templates \
|
--align-reference=type --add-brackets --convert-tabs --close-templates \
|
||||||
--lineend=linux --preserve-date --suffix=none --formatted \
|
--lineend=linux --preserve-date --suffix=none --formatted \
|
||||||
$(SRCS) src/json.hpp test/src/*.cpp \
|
$(SRCS) $(AMALGAMATED_FILE) test/src/*.cpp \
|
||||||
benchmarks/src/benchmarks.cpp doc/examples/*.cpp
|
benchmarks/src/benchmarks.cpp doc/examples/*.cpp
|
||||||
|
|
||||||
# create single header file
|
# create single header file
|
||||||
amalgamate: src/json.hpp
|
amalgamate: $(AMALGAMATED_FILE)
|
||||||
|
|
||||||
src/json.hpp: $(SRCS)
|
$(AMALGAMATED_FILE): $(SRCS)
|
||||||
third_party/amalgamate/amalgamate.py -c third_party/amalgamate/config.json -s develop --verbose=yes
|
third_party/amalgamate/amalgamate.py -c third_party/amalgamate/config.json -s . --verbose=yes
|
||||||
$(MAKE) pretty
|
$(MAKE) pretty
|
||||||
|
|
||||||
# check if src/json.hpp has been amalgamated from the develop sources
|
# check if single_include/nlohmann/json.hpp has been amalgamated from the nlohmann sources
|
||||||
check-amalgamation:
|
check-amalgamation:
|
||||||
@mv src/json.hpp src/json.hpp~
|
@mv $(AMALGAMATED_FILE) $(AMALGAMATED_FILE)~
|
||||||
@$(MAKE) amalgamate
|
@$(MAKE) amalgamate
|
||||||
@diff src/json.hpp src/json.hpp~ || (echo "===================================================================\n Amalgamation required! Please read the contribution guidelines\n in file .github/CONTRIBUTING.md.\n===================================================================" ; mv src/json.hpp~ src/json.hpp ; false)
|
@diff $(AMALGAMATED_FILE) $(AMALGAMATED_FILE)~ || (echo "===================================================================\n Amalgamation required! Please read the contribution guidelines\n in file .github/CONTRIBUTING.md.\n===================================================================" ; mv $(AMALGAMATED_FILE)~ $(AMALGAMATED_FILE) ; false)
|
||||||
@mv src/json.hpp~ src/json.hpp
|
@mv $(AMALGAMATED_FILE)~ $(AMALGAMATED_FILE)
|
||||||
|
|
||||||
# check if every header in develop includes sufficient headers to be compiled
|
# check if every header in nlohmann includes sufficient headers to be compiled
|
||||||
# individually
|
# individually
|
||||||
check-single-includes:
|
check-single-includes:
|
||||||
for x in $(SRCS); do \
|
for x in $(SRCS); do \
|
||||||
echo "#include \"$$x\"\nint main() {}\n" | sed 's|develop/||' > single_include_test.cpp; \
|
echo "#include <$$x>\nint main() {}\n" | sed 's|include/||' > single_include_test.cpp; \
|
||||||
$(CXX) $(CXXFLAGS) -Idevelop -std=c++11 single_include_test.cpp -o single_include_test; \
|
$(CXX) $(CXXFLAGS) -Iinclude -std=c++11 single_include_test.cpp -o single_include_test; \
|
||||||
rm single_include_test.cpp single_include_test; \
|
rm single_include_test.cpp single_include_test; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#include "detail/conversions/from_json.hpp"
|
#include <nlohmann/detail/conversions/from_json.hpp>
|
||||||
#include "detail/conversions/to_json.hpp"
|
#include <nlohmann/detail/conversions/to_json.hpp>
|
||||||
|
|
||||||
namespace nlohmann
|
namespace nlohmann
|
||||||
{
|
{
|
|
@ -11,10 +11,10 @@
|
||||||
#include <utility> // pair, declval
|
#include <utility> // pair, declval
|
||||||
#include <valarray> // valarray
|
#include <valarray> // valarray
|
||||||
|
|
||||||
#include "detail/exceptions.hpp"
|
#include <nlohmann/detail/exceptions.hpp>
|
||||||
#include "detail/macro_scope.hpp"
|
#include <nlohmann/detail/macro_scope.hpp>
|
||||||
#include "detail/meta.hpp"
|
#include <nlohmann/detail/meta.hpp>
|
||||||
#include "detail/value_t.hpp"
|
#include <nlohmann/detail/value_t.hpp>
|
||||||
|
|
||||||
namespace nlohmann
|
namespace nlohmann
|
||||||
{
|
{
|
|
@ -8,8 +8,8 @@
|
||||||
#include <valarray> // valarray
|
#include <valarray> // valarray
|
||||||
#include <vector> // vector
|
#include <vector> // vector
|
||||||
|
|
||||||
#include "detail/meta.hpp"
|
#include <nlohmann/detail/meta.hpp>
|
||||||
#include "detail/value_t.hpp"
|
#include <nlohmann/detail/value_t.hpp>
|
||||||
|
|
||||||
namespace nlohmann
|
namespace nlohmann
|
||||||
{
|
{
|
|
@ -15,10 +15,10 @@
|
||||||
#include <string> // char_traits, string
|
#include <string> // char_traits, string
|
||||||
#include <utility> // make_pair, move
|
#include <utility> // make_pair, move
|
||||||
|
|
||||||
#include "detail/input/input_adapters.hpp"
|
#include <nlohmann/detail/input/input_adapters.hpp>
|
||||||
#include "detail/exceptions.hpp"
|
#include <nlohmann/detail/exceptions.hpp>
|
||||||
#include "detail/macro_scope.hpp"
|
#include <nlohmann/detail/macro_scope.hpp>
|
||||||
#include "detail/value_t.hpp"
|
#include <nlohmann/detail/value_t.hpp>
|
||||||
|
|
||||||
namespace nlohmann
|
namespace nlohmann
|
||||||
{
|
{
|
|
@ -14,7 +14,7 @@
|
||||||
#include <type_traits> // enable_if, is_base_of, is_pointer, is_integral, remove_pointer
|
#include <type_traits> // enable_if, is_base_of, is_pointer, is_integral, remove_pointer
|
||||||
#include <utility> // pair, declval
|
#include <utility> // pair, declval
|
||||||
|
|
||||||
#include "detail/macro_scope.hpp"
|
#include <nlohmann/detail/macro_scope.hpp>
|
||||||
|
|
||||||
namespace nlohmann
|
namespace nlohmann
|
||||||
{
|
{
|
|
@ -10,8 +10,8 @@
|
||||||
#include <string> // char_traits, string
|
#include <string> // char_traits, string
|
||||||
#include <vector> // vector
|
#include <vector> // vector
|
||||||
|
|
||||||
#include "detail/macro_scope.hpp"
|
#include <nlohmann/detail/macro_scope.hpp>
|
||||||
#include "detail/input/input_adapters.hpp"
|
#include <nlohmann/detail/input/input_adapters.hpp>
|
||||||
|
|
||||||
namespace nlohmann
|
namespace nlohmann
|
||||||
{
|
{
|
|
@ -7,11 +7,11 @@
|
||||||
#include <string> // string
|
#include <string> // string
|
||||||
#include <utility> // move
|
#include <utility> // move
|
||||||
|
|
||||||
#include "detail/exceptions.hpp"
|
#include <nlohmann/detail/exceptions.hpp>
|
||||||
#include "detail/macro_scope.hpp"
|
#include <nlohmann/detail/macro_scope.hpp>
|
||||||
#include "detail/input/input_adapters.hpp"
|
#include <nlohmann/detail/input/input_adapters.hpp>
|
||||||
#include "detail/input/lexer.hpp"
|
#include <nlohmann/detail/input/lexer.hpp>
|
||||||
#include "detail/value_t.hpp"
|
#include <nlohmann/detail/value_t.hpp>
|
||||||
|
|
||||||
namespace nlohmann
|
namespace nlohmann
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "detail/iterators/primitive_iterator.hpp"
|
#include <nlohmann/detail/iterators/primitive_iterator.hpp>
|
||||||
|
|
||||||
namespace nlohmann
|
namespace nlohmann
|
||||||
{
|
{
|
|
@ -4,12 +4,12 @@
|
||||||
#include <iterator> // iterator, random_access_iterator_tag, bidirectional_iterator_tag, advance, next
|
#include <iterator> // iterator, random_access_iterator_tag, bidirectional_iterator_tag, advance, next
|
||||||
#include <type_traits> // conditional, is_const, remove_const
|
#include <type_traits> // conditional, is_const, remove_const
|
||||||
|
|
||||||
#include "detail/exceptions.hpp"
|
#include <nlohmann/detail/exceptions.hpp>
|
||||||
#include "detail/iterators/internal_iterator.hpp"
|
#include <nlohmann/detail/iterators/internal_iterator.hpp>
|
||||||
#include "detail/iterators/primitive_iterator.hpp"
|
#include <nlohmann/detail/iterators/primitive_iterator.hpp>
|
||||||
#include "detail/macro_scope.hpp"
|
#include <nlohmann/detail/macro_scope.hpp>
|
||||||
#include "detail/meta.hpp"
|
#include <nlohmann/detail/meta.hpp>
|
||||||
#include "detail/value_t.hpp"
|
#include <nlohmann/detail/value_t.hpp>
|
||||||
|
|
||||||
namespace nlohmann
|
namespace nlohmann
|
||||||
{
|
{
|
|
@ -3,7 +3,7 @@
|
||||||
#include <cstddef> // size_t
|
#include <cstddef> // size_t
|
||||||
#include <string> // string, to_string
|
#include <string> // string, to_string
|
||||||
|
|
||||||
#include "detail/value_t.hpp"
|
#include <nlohmann/detail/value_t.hpp>
|
||||||
|
|
||||||
namespace nlohmann
|
namespace nlohmann
|
||||||
{
|
{
|
|
@ -5,9 +5,9 @@
|
||||||
#include <string> // string
|
#include <string> // string
|
||||||
#include <vector> // vector
|
#include <vector> // vector
|
||||||
|
|
||||||
#include "detail/macro_scope.hpp"
|
#include <nlohmann/detail/macro_scope.hpp>
|
||||||
#include "detail/exceptions.hpp"
|
#include <nlohmann/detail/exceptions.hpp>
|
||||||
#include "detail/value_t.hpp"
|
#include <nlohmann/detail/value_t.hpp>
|
||||||
|
|
||||||
namespace nlohmann
|
namespace nlohmann
|
||||||
{
|
{
|
|
@ -6,8 +6,8 @@
|
||||||
#include <type_traits> // conditional, enable_if, false_type, integral_constant, is_constructible, is_integral, is_same, remove_cv, remove_reference, true_type
|
#include <type_traits> // conditional, enable_if, false_type, integral_constant, is_constructible, is_integral, is_same, remove_cv, remove_reference, true_type
|
||||||
#include <utility> // declval
|
#include <utility> // declval
|
||||||
|
|
||||||
#include "json_fwd.hpp"
|
#include <nlohmann/json_fwd.hpp>
|
||||||
#include "detail/macro_scope.hpp"
|
#include <nlohmann/detail/macro_scope.hpp>
|
||||||
|
|
||||||
namespace nlohmann
|
namespace nlohmann
|
||||||
{
|
{
|
|
@ -6,8 +6,8 @@
|
||||||
#include <cstring> // memcpy
|
#include <cstring> // memcpy
|
||||||
#include <limits> // numeric_limits
|
#include <limits> // numeric_limits
|
||||||
|
|
||||||
#include "detail/input/binary_reader.hpp"
|
#include <nlohmann/detail/input/binary_reader.hpp>
|
||||||
#include "detail/output/output_adapters.hpp"
|
#include <nlohmann/detail/output/output_adapters.hpp>
|
||||||
|
|
||||||
namespace nlohmann
|
namespace nlohmann
|
||||||
{
|
{
|
|
@ -16,12 +16,12 @@
|
||||||
#include <sstream> // stringstream
|
#include <sstream> // stringstream
|
||||||
#include <type_traits> // is_same
|
#include <type_traits> // is_same
|
||||||
|
|
||||||
#include "detail/exceptions.hpp"
|
#include <nlohmann/detail/exceptions.hpp>
|
||||||
#include "detail/conversions/to_chars.hpp"
|
#include <nlohmann/detail/conversions/to_chars.hpp>
|
||||||
#include "detail/macro_scope.hpp"
|
#include <nlohmann/detail/macro_scope.hpp>
|
||||||
#include "detail/meta.hpp"
|
#include <nlohmann/detail/meta.hpp>
|
||||||
#include "detail/output/output_adapters.hpp"
|
#include <nlohmann/detail/output/output_adapters.hpp>
|
||||||
#include "detail/value_t.hpp"
|
#include <nlohmann/detail/value_t.hpp>
|
||||||
|
|
||||||
namespace nlohmann
|
namespace nlohmann
|
||||||
{
|
{
|
|
@ -45,28 +45,28 @@ SOFTWARE.
|
||||||
#include <string> // string, stoi, to_string
|
#include <string> // string, stoi, to_string
|
||||||
#include <utility> // declval, forward, move, pair, swap
|
#include <utility> // declval, forward, move, pair, swap
|
||||||
|
|
||||||
#include "json_fwd.hpp"
|
#include <nlohmann/json_fwd.hpp>
|
||||||
#include "detail/macro_scope.hpp"
|
#include <nlohmann/detail/macro_scope.hpp>
|
||||||
#include "detail/meta.hpp"
|
#include <nlohmann/detail/meta.hpp>
|
||||||
#include "detail/exceptions.hpp"
|
#include <nlohmann/detail/exceptions.hpp>
|
||||||
#include "detail/value_t.hpp"
|
#include <nlohmann/detail/value_t.hpp>
|
||||||
#include "detail/conversions/from_json.hpp"
|
#include <nlohmann/detail/conversions/from_json.hpp>
|
||||||
#include "detail/conversions/to_json.hpp"
|
#include <nlohmann/detail/conversions/to_json.hpp>
|
||||||
#include "detail/input/input_adapters.hpp"
|
#include <nlohmann/detail/input/input_adapters.hpp>
|
||||||
#include "detail/input/lexer.hpp"
|
#include <nlohmann/detail/input/lexer.hpp>
|
||||||
#include "detail/input/parser.hpp"
|
#include <nlohmann/detail/input/parser.hpp>
|
||||||
#include "detail/iterators/primitive_iterator.hpp"
|
#include <nlohmann/detail/iterators/primitive_iterator.hpp>
|
||||||
#include "detail/iterators/internal_iterator.hpp"
|
#include <nlohmann/detail/iterators/internal_iterator.hpp>
|
||||||
#include "detail/iterators/iter_impl.hpp"
|
#include <nlohmann/detail/iterators/iter_impl.hpp>
|
||||||
#include "detail/iterators/iteration_proxy.hpp"
|
#include <nlohmann/detail/iterators/iteration_proxy.hpp>
|
||||||
#include "detail/iterators/json_reverse_iterator.hpp"
|
#include <nlohmann/detail/iterators/json_reverse_iterator.hpp>
|
||||||
#include "detail/output/output_adapters.hpp"
|
#include <nlohmann/detail/output/output_adapters.hpp>
|
||||||
#include "detail/input/binary_reader.hpp"
|
#include <nlohmann/detail/input/binary_reader.hpp>
|
||||||
#include "detail/output/binary_writer.hpp"
|
#include <nlohmann/detail/output/binary_writer.hpp>
|
||||||
#include "detail/output/serializer.hpp"
|
#include <nlohmann/detail/output/serializer.hpp>
|
||||||
#include "detail/json_ref.hpp"
|
#include <nlohmann/detail/json_ref.hpp>
|
||||||
#include "detail/json_pointer.hpp"
|
#include <nlohmann/detail/json_pointer.hpp>
|
||||||
#include "adl_serializer.hpp"
|
#include <nlohmann/adl_serializer.hpp>
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@brief namespace for Niels Lohmann
|
@brief namespace for Niels Lohmann
|
||||||
|
@ -7564,6 +7564,6 @@ inline nlohmann::json::json_pointer operator "" _json_pointer(const char* s, std
|
||||||
return nlohmann::json::json_pointer(std::string(s, n));
|
return nlohmann::json::json_pointer(std::string(s, n));
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "detail/macro_unscope.hpp"
|
#include <nlohmann/detail/macro_unscope.hpp>
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -45,7 +45,7 @@ SOFTWARE.
|
||||||
#include <string> // string, stoi, to_string
|
#include <string> // string, stoi, to_string
|
||||||
#include <utility> // declval, forward, move, pair, swap
|
#include <utility> // declval, forward, move, pair, swap
|
||||||
|
|
||||||
// #include "json_fwd.hpp"
|
// #include <nlohmann/json_fwd.hpp>
|
||||||
#ifndef NLOHMANN_JSON_FWD_HPP
|
#ifndef NLOHMANN_JSON_FWD_HPP
|
||||||
#define NLOHMANN_JSON_FWD_HPP
|
#define NLOHMANN_JSON_FWD_HPP
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ using json = basic_json<>;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// #include "detail/macro_scope.hpp"
|
// #include <nlohmann/detail/macro_scope.hpp>
|
||||||
|
|
||||||
|
|
||||||
// This file contains all internal macro definitions
|
// This file contains all internal macro definitions
|
||||||
|
@ -228,7 +228,7 @@ contains a `mapped_type`, whereas `std::vector` fails the test.
|
||||||
std::is_integral<decltype(detect(std::declval<T>()))>::value; \
|
std::is_integral<decltype(detect(std::declval<T>()))>::value; \
|
||||||
}
|
}
|
||||||
|
|
||||||
// #include "detail/meta.hpp"
|
// #include <nlohmann/detail/meta.hpp>
|
||||||
|
|
||||||
|
|
||||||
#include <ciso646> // not
|
#include <ciso646> // not
|
||||||
|
@ -237,9 +237,9 @@ contains a `mapped_type`, whereas `std::vector` fails the test.
|
||||||
#include <type_traits> // conditional, enable_if, false_type, integral_constant, is_constructible, is_integral, is_same, remove_cv, remove_reference, true_type
|
#include <type_traits> // conditional, enable_if, false_type, integral_constant, is_constructible, is_integral, is_same, remove_cv, remove_reference, true_type
|
||||||
#include <utility> // declval
|
#include <utility> // declval
|
||||||
|
|
||||||
// #include "json_fwd.hpp"
|
// #include <nlohmann/json_fwd.hpp>
|
||||||
|
|
||||||
// #include "detail/macro_scope.hpp"
|
// #include <nlohmann/detail/macro_scope.hpp>
|
||||||
|
|
||||||
|
|
||||||
namespace nlohmann
|
namespace nlohmann
|
||||||
|
@ -490,7 +490,7 @@ constexpr T static_const<T>::value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// #include "detail/exceptions.hpp"
|
// #include <nlohmann/detail/exceptions.hpp>
|
||||||
|
|
||||||
|
|
||||||
#include <exception> // exception
|
#include <exception> // exception
|
||||||
|
@ -821,7 +821,7 @@ class other_error : public exception
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// #include "detail/value_t.hpp"
|
// #include <nlohmann/detail/value_t.hpp>
|
||||||
|
|
||||||
|
|
||||||
#include <array> // array
|
#include <array> // array
|
||||||
|
@ -899,7 +899,7 @@ inline bool operator<(const value_t lhs, const value_t rhs) noexcept
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// #include "detail/conversions/from_json.hpp"
|
// #include <nlohmann/detail/conversions/from_json.hpp>
|
||||||
|
|
||||||
|
|
||||||
#include <algorithm> // transform
|
#include <algorithm> // transform
|
||||||
|
@ -913,13 +913,13 @@ inline bool operator<(const value_t lhs, const value_t rhs) noexcept
|
||||||
#include <utility> // pair, declval
|
#include <utility> // pair, declval
|
||||||
#include <valarray> // valarray
|
#include <valarray> // valarray
|
||||||
|
|
||||||
// #include "detail/exceptions.hpp"
|
// #include <nlohmann/detail/exceptions.hpp>
|
||||||
|
|
||||||
// #include "detail/macro_scope.hpp"
|
// #include <nlohmann/detail/macro_scope.hpp>
|
||||||
|
|
||||||
// #include "detail/meta.hpp"
|
// #include <nlohmann/detail/meta.hpp>
|
||||||
|
|
||||||
// #include "detail/value_t.hpp"
|
// #include <nlohmann/detail/value_t.hpp>
|
||||||
|
|
||||||
|
|
||||||
namespace nlohmann
|
namespace nlohmann
|
||||||
|
@ -1220,7 +1220,7 @@ constexpr const auto& from_json = detail::static_const<detail::from_json_fn>::va
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// #include "detail/conversions/to_json.hpp"
|
// #include <nlohmann/detail/conversions/to_json.hpp>
|
||||||
|
|
||||||
|
|
||||||
#include <ciso646> // or, and, not
|
#include <ciso646> // or, and, not
|
||||||
|
@ -1231,9 +1231,9 @@ constexpr const auto& from_json = detail::static_const<detail::from_json_fn>::va
|
||||||
#include <valarray> // valarray
|
#include <valarray> // valarray
|
||||||
#include <vector> // vector
|
#include <vector> // vector
|
||||||
|
|
||||||
// #include "detail/meta.hpp"
|
// #include <nlohmann/detail/meta.hpp>
|
||||||
|
|
||||||
// #include "detail/value_t.hpp"
|
// #include <nlohmann/detail/value_t.hpp>
|
||||||
|
|
||||||
|
|
||||||
namespace nlohmann
|
namespace nlohmann
|
||||||
|
@ -1562,7 +1562,7 @@ constexpr const auto& to_json = detail::static_const<detail::to_json_fn>::value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// #include "detail/input/input_adapters.hpp"
|
// #include <nlohmann/detail/input/input_adapters.hpp>
|
||||||
|
|
||||||
|
|
||||||
#include <algorithm> // min
|
#include <algorithm> // min
|
||||||
|
@ -1579,7 +1579,7 @@ constexpr const auto& to_json = detail::static_const<detail::to_json_fn>::value;
|
||||||
#include <type_traits> // enable_if, is_base_of, is_pointer, is_integral, remove_pointer
|
#include <type_traits> // enable_if, is_base_of, is_pointer, is_integral, remove_pointer
|
||||||
#include <utility> // pair, declval
|
#include <utility> // pair, declval
|
||||||
|
|
||||||
// #include "detail/macro_scope.hpp"
|
// #include <nlohmann/detail/macro_scope.hpp>
|
||||||
|
|
||||||
|
|
||||||
namespace nlohmann
|
namespace nlohmann
|
||||||
|
@ -1827,7 +1827,7 @@ class input_adapter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// #include "detail/input/lexer.hpp"
|
// #include <nlohmann/detail/input/lexer.hpp>
|
||||||
|
|
||||||
|
|
||||||
#include <clocale> // localeconv
|
#include <clocale> // localeconv
|
||||||
|
@ -1840,9 +1840,9 @@ class input_adapter
|
||||||
#include <string> // char_traits, string
|
#include <string> // char_traits, string
|
||||||
#include <vector> // vector
|
#include <vector> // vector
|
||||||
|
|
||||||
// #include "detail/macro_scope.hpp"
|
// #include <nlohmann/detail/macro_scope.hpp>
|
||||||
|
|
||||||
// #include "detail/input/input_adapters.hpp"
|
// #include <nlohmann/detail/input/input_adapters.hpp>
|
||||||
|
|
||||||
|
|
||||||
namespace nlohmann
|
namespace nlohmann
|
||||||
|
@ -3108,7 +3108,7 @@ scan_number_done:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// #include "detail/input/parser.hpp"
|
// #include <nlohmann/detail/input/parser.hpp>
|
||||||
|
|
||||||
|
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
|
@ -3118,15 +3118,15 @@ scan_number_done:
|
||||||
#include <string> // string
|
#include <string> // string
|
||||||
#include <utility> // move
|
#include <utility> // move
|
||||||
|
|
||||||
// #include "detail/exceptions.hpp"
|
// #include <nlohmann/detail/exceptions.hpp>
|
||||||
|
|
||||||
// #include "detail/macro_scope.hpp"
|
// #include <nlohmann/detail/macro_scope.hpp>
|
||||||
|
|
||||||
// #include "detail/input/input_adapters.hpp"
|
// #include <nlohmann/detail/input/input_adapters.hpp>
|
||||||
|
|
||||||
// #include "detail/input/lexer.hpp"
|
// #include <nlohmann/detail/input/lexer.hpp>
|
||||||
|
|
||||||
// #include "detail/value_t.hpp"
|
// #include <nlohmann/detail/value_t.hpp>
|
||||||
|
|
||||||
|
|
||||||
namespace nlohmann
|
namespace nlohmann
|
||||||
|
@ -3704,7 +3704,7 @@ class parser
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// #include "detail/iterators/primitive_iterator.hpp"
|
// #include <nlohmann/detail/iterators/primitive_iterator.hpp>
|
||||||
|
|
||||||
|
|
||||||
#include <cstddef> // ptrdiff_t
|
#include <cstddef> // ptrdiff_t
|
||||||
|
@ -3826,10 +3826,10 @@ class primitive_iterator_t
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// #include "detail/iterators/internal_iterator.hpp"
|
// #include <nlohmann/detail/iterators/internal_iterator.hpp>
|
||||||
|
|
||||||
|
|
||||||
// #include "detail/iterators/primitive_iterator.hpp"
|
// #include <nlohmann/detail/iterators/primitive_iterator.hpp>
|
||||||
|
|
||||||
|
|
||||||
namespace nlohmann
|
namespace nlohmann
|
||||||
|
@ -3854,24 +3854,24 @@ template<typename BasicJsonType> struct internal_iterator
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// #include "detail/iterators/iter_impl.hpp"
|
// #include <nlohmann/detail/iterators/iter_impl.hpp>
|
||||||
|
|
||||||
|
|
||||||
#include <ciso646> // not
|
#include <ciso646> // not
|
||||||
#include <iterator> // iterator, random_access_iterator_tag, bidirectional_iterator_tag, advance, next
|
#include <iterator> // iterator, random_access_iterator_tag, bidirectional_iterator_tag, advance, next
|
||||||
#include <type_traits> // conditional, is_const, remove_const
|
#include <type_traits> // conditional, is_const, remove_const
|
||||||
|
|
||||||
// #include "detail/exceptions.hpp"
|
// #include <nlohmann/detail/exceptions.hpp>
|
||||||
|
|
||||||
// #include "detail/iterators/internal_iterator.hpp"
|
// #include <nlohmann/detail/iterators/internal_iterator.hpp>
|
||||||
|
|
||||||
// #include "detail/iterators/primitive_iterator.hpp"
|
// #include <nlohmann/detail/iterators/primitive_iterator.hpp>
|
||||||
|
|
||||||
// #include "detail/macro_scope.hpp"
|
// #include <nlohmann/detail/macro_scope.hpp>
|
||||||
|
|
||||||
// #include "detail/meta.hpp"
|
// #include <nlohmann/detail/meta.hpp>
|
||||||
|
|
||||||
// #include "detail/value_t.hpp"
|
// #include <nlohmann/detail/value_t.hpp>
|
||||||
|
|
||||||
|
|
||||||
namespace nlohmann
|
namespace nlohmann
|
||||||
|
@ -4476,13 +4476,13 @@ class iter_impl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// #include "detail/iterators/iteration_proxy.hpp"
|
// #include <nlohmann/detail/iterators/iteration_proxy.hpp>
|
||||||
|
|
||||||
|
|
||||||
#include <cstddef> // size_t
|
#include <cstddef> // size_t
|
||||||
#include <string> // string, to_string
|
#include <string> // string, to_string
|
||||||
|
|
||||||
// #include "detail/value_t.hpp"
|
// #include <nlohmann/detail/value_t.hpp>
|
||||||
|
|
||||||
|
|
||||||
namespace nlohmann
|
namespace nlohmann
|
||||||
|
@ -4577,7 +4577,7 @@ template<typename IteratorType> class iteration_proxy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// #include "detail/iterators/json_reverse_iterator.hpp"
|
// #include <nlohmann/detail/iterators/json_reverse_iterator.hpp>
|
||||||
|
|
||||||
|
|
||||||
#include <cstddef> // ptrdiff_t
|
#include <cstddef> // ptrdiff_t
|
||||||
|
@ -4698,7 +4698,7 @@ class json_reverse_iterator : public std::reverse_iterator<Base>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// #include "detail/output/output_adapters.hpp"
|
// #include <nlohmann/detail/output/output_adapters.hpp>
|
||||||
|
|
||||||
|
|
||||||
#include <algorithm> // copy
|
#include <algorithm> // copy
|
||||||
|
@ -4813,7 +4813,7 @@ class output_adapter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// #include "detail/input/binary_reader.hpp"
|
// #include <nlohmann/detail/input/binary_reader.hpp>
|
||||||
|
|
||||||
|
|
||||||
#include <algorithm> // generate_n
|
#include <algorithm> // generate_n
|
||||||
|
@ -4831,13 +4831,13 @@ class output_adapter
|
||||||
#include <string> // char_traits, string
|
#include <string> // char_traits, string
|
||||||
#include <utility> // make_pair, move
|
#include <utility> // make_pair, move
|
||||||
|
|
||||||
// #include "detail/input/input_adapters.hpp"
|
// #include <nlohmann/detail/input/input_adapters.hpp>
|
||||||
|
|
||||||
// #include "detail/exceptions.hpp"
|
// #include <nlohmann/detail/exceptions.hpp>
|
||||||
|
|
||||||
// #include "detail/macro_scope.hpp"
|
// #include <nlohmann/detail/macro_scope.hpp>
|
||||||
|
|
||||||
// #include "detail/value_t.hpp"
|
// #include <nlohmann/detail/value_t.hpp>
|
||||||
|
|
||||||
|
|
||||||
namespace nlohmann
|
namespace nlohmann
|
||||||
|
@ -6180,7 +6180,7 @@ class binary_reader
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// #include "detail/output/binary_writer.hpp"
|
// #include <nlohmann/detail/output/binary_writer.hpp>
|
||||||
|
|
||||||
|
|
||||||
#include <algorithm> // reverse
|
#include <algorithm> // reverse
|
||||||
|
@ -6189,9 +6189,9 @@ class binary_reader
|
||||||
#include <cstring> // memcpy
|
#include <cstring> // memcpy
|
||||||
#include <limits> // numeric_limits
|
#include <limits> // numeric_limits
|
||||||
|
|
||||||
// #include "detail/input/binary_reader.hpp"
|
// #include <nlohmann/detail/input/binary_reader.hpp>
|
||||||
|
|
||||||
// #include "detail/output/output_adapters.hpp"
|
// #include <nlohmann/detail/output/output_adapters.hpp>
|
||||||
|
|
||||||
|
|
||||||
namespace nlohmann
|
namespace nlohmann
|
||||||
|
@ -7093,7 +7093,7 @@ class binary_writer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// #include "detail/output/serializer.hpp"
|
// #include <nlohmann/detail/output/serializer.hpp>
|
||||||
|
|
||||||
|
|
||||||
#include <algorithm> // reverse, remove, fill, find, none_of
|
#include <algorithm> // reverse, remove, fill, find, none_of
|
||||||
|
@ -7112,9 +7112,9 @@ class binary_writer
|
||||||
#include <sstream> // stringstream
|
#include <sstream> // stringstream
|
||||||
#include <type_traits> // is_same
|
#include <type_traits> // is_same
|
||||||
|
|
||||||
// #include "detail/exceptions.hpp"
|
// #include <nlohmann/detail/exceptions.hpp>
|
||||||
|
|
||||||
// #include "detail/conversions/to_chars.hpp"
|
// #include <nlohmann/detail/conversions/to_chars.hpp>
|
||||||
|
|
||||||
|
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
|
@ -8211,13 +8211,13 @@ char* to_chars(char* first, char* last, FloatType value)
|
||||||
} // namespace detail
|
} // namespace detail
|
||||||
} // namespace nlohmann
|
} // namespace nlohmann
|
||||||
|
|
||||||
// #include "detail/macro_scope.hpp"
|
// #include <nlohmann/detail/macro_scope.hpp>
|
||||||
|
|
||||||
// #include "detail/meta.hpp"
|
// #include <nlohmann/detail/meta.hpp>
|
||||||
|
|
||||||
// #include "detail/output/output_adapters.hpp"
|
// #include <nlohmann/detail/output/output_adapters.hpp>
|
||||||
|
|
||||||
// #include "detail/value_t.hpp"
|
// #include <nlohmann/detail/value_t.hpp>
|
||||||
|
|
||||||
|
|
||||||
namespace nlohmann
|
namespace nlohmann
|
||||||
|
@ -8830,7 +8830,7 @@ class serializer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// #include "detail/json_ref.hpp"
|
// #include <nlohmann/detail/json_ref.hpp>
|
||||||
|
|
||||||
|
|
||||||
#include <initializer_list>
|
#include <initializer_list>
|
||||||
|
@ -8895,7 +8895,7 @@ class json_ref
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// #include "detail/json_pointer.hpp"
|
// #include <nlohmann/detail/json_pointer.hpp>
|
||||||
|
|
||||||
|
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
|
@ -8903,11 +8903,11 @@ class json_ref
|
||||||
#include <string> // string
|
#include <string> // string
|
||||||
#include <vector> // vector
|
#include <vector> // vector
|
||||||
|
|
||||||
// #include "detail/macro_scope.hpp"
|
// #include <nlohmann/detail/macro_scope.hpp>
|
||||||
|
|
||||||
// #include "detail/exceptions.hpp"
|
// #include <nlohmann/detail/exceptions.hpp>
|
||||||
|
|
||||||
// #include "detail/value_t.hpp"
|
// #include <nlohmann/detail/value_t.hpp>
|
||||||
|
|
||||||
|
|
||||||
namespace nlohmann
|
namespace nlohmann
|
||||||
|
@ -9596,14 +9596,14 @@ class json_pointer
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// #include "adl_serializer.hpp"
|
// #include <nlohmann/adl_serializer.hpp>
|
||||||
|
|
||||||
|
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
// #include "detail/conversions/from_json.hpp"
|
// #include <nlohmann/detail/conversions/from_json.hpp>
|
||||||
|
|
||||||
// #include "detail/conversions/to_json.hpp"
|
// #include <nlohmann/detail/conversions/to_json.hpp>
|
||||||
|
|
||||||
|
|
||||||
namespace nlohmann
|
namespace nlohmann
|
||||||
|
@ -17142,7 +17142,7 @@ inline nlohmann::json::json_pointer operator "" _json_pointer(const char* s, std
|
||||||
return nlohmann::json::json_pointer(std::string(s, n));
|
return nlohmann::json::json_pointer(std::string(s, n));
|
||||||
}
|
}
|
||||||
|
|
||||||
// #include "detail/macro_unscope.hpp"
|
// #include <nlohmann/detail/macro_unscope.hpp>
|
||||||
|
|
||||||
|
|
||||||
// restore GCC/clang diagnostic settings
|
// restore GCC/clang diagnostic settings
|
|
@ -101,6 +101,7 @@ foreach(file ${files})
|
||||||
|
|
||||||
target_compile_definitions(${testcase} PRIVATE CATCH_CONFIG_FAST_COMPILE)
|
target_compile_definitions(${testcase} PRIVATE CATCH_CONFIG_FAST_COMPILE)
|
||||||
target_include_directories(${testcase} PRIVATE "thirdparty/catch")
|
target_include_directories(${testcase} PRIVATE "thirdparty/catch")
|
||||||
|
target_include_directories(${testcase} PRIVATE ${NLOHMANN_JSON_INCLUDE_BUILD_DIR})
|
||||||
target_link_libraries(${testcase} ${NLOHMANN_JSON_TARGET_NAME})
|
target_link_libraries(${testcase} ${NLOHMANN_JSON_TARGET_NAME})
|
||||||
|
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
# additional flags
|
# additional flags
|
||||||
CXXFLAGS += -std=c++11 -Wall -Wextra -pedantic -Wcast-align -Wcast-qual -Wno-ctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wmissing-declarations -Wmissing-include-dirs -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-overflow=5 -Wswitch -Wundef -Wno-unused -Wnon-virtual-dtor -Wreorder -Wdeprecated -Wno-float-equal
|
CXXFLAGS += -std=c++11 -Wall -Wextra -pedantic -Wcast-align -Wcast-qual -Wno-ctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wmissing-declarations -Wmissing-include-dirs -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-overflow=5 -Wswitch -Wundef -Wno-unused -Wnon-virtual-dtor -Wreorder -Wdeprecated -Wno-float-equal
|
||||||
CPPFLAGS += -I ../src -I . -I thirdparty/catch -DCATCH_CONFIG_FAST_COMPILE
|
CPPFLAGS += -I ../single_include -I . -I thirdparty/catch -DCATCH_CONFIG_FAST_COMPILE
|
||||||
|
|
||||||
SOURCES = src/unit.cpp \
|
SOURCES = src/unit.cpp \
|
||||||
src/unit-algorithms.cpp \
|
src/unit-algorithms.cpp \
|
||||||
|
@ -60,11 +60,11 @@ clean:
|
||||||
# single test file
|
# single test file
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
json_unit: $(OBJECTS) ../src/json.hpp thirdparty/catch/catch.hpp
|
json_unit: $(OBJECTS) ../single_include/nlohmann/json.hpp thirdparty/catch/catch.hpp
|
||||||
@echo "[CXXLD] $@"
|
@echo "[CXXLD] $@"
|
||||||
@$(CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJECTS) -o $@
|
@$(CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJECTS) -o $@
|
||||||
|
|
||||||
%.o: %.cpp ../src/json.hpp thirdparty/catch/catch.hpp
|
%.o: %.cpp ../single_include/nlohmann/json.hpp thirdparty/catch/catch.hpp
|
||||||
@echo "[CXX] $@"
|
@echo "[CXX] $@"
|
||||||
@$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@
|
@$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ json_unit: $(OBJECTS) ../src/json.hpp thirdparty/catch/catch.hpp
|
||||||
# individual test cases
|
# individual test cases
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
test-%: src/unit-%.o src/unit.o ../src/json.hpp thirdparty/catch/catch.hpp
|
test-%: src/unit-%.o src/unit.o ../single_include/nlohmann/json.hpp thirdparty/catch/catch.hpp
|
||||||
@echo "[CXXLD] $@"
|
@echo "[CXXLD] $@"
|
||||||
@$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $< src/unit.o -o $@
|
@$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $< src/unit.o -o $@
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ Licensed under the MIT License <http://opensource.org/licenses/MIT>.
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <json.hpp>
|
#include <nlohmann/json.hpp>
|
||||||
|
|
||||||
using json = nlohmann::json;
|
using json = nlohmann::json;
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ Licensed under the MIT License <http://opensource.org/licenses/MIT>.
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <json.hpp>
|
#include <nlohmann/json.hpp>
|
||||||
|
|
||||||
using json = nlohmann::json;
|
using json = nlohmann::json;
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ Licensed under the MIT License <http://opensource.org/licenses/MIT>.
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <json.hpp>
|
#include <nlohmann/json.hpp>
|
||||||
|
|
||||||
using json = nlohmann::json;
|
using json = nlohmann::json;
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ Licensed under the MIT License <http://opensource.org/licenses/MIT>.
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <json.hpp>
|
#include <nlohmann/json.hpp>
|
||||||
|
|
||||||
using json = nlohmann::json;
|
using json = nlohmann::json;
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
TEST_CASE("algorithms")
|
TEST_CASE("algorithms")
|
||||||
|
|
|
@ -29,7 +29,7 @@ SOFTWARE.
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#define private public
|
#define private public
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
// special test case to check if memory is leaked if constructor throws
|
// special test case to check if memory is leaked if constructor throws
|
||||||
|
|
|
@ -28,7 +28,7 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
TEST_CASE("capacity")
|
TEST_CASE("capacity")
|
||||||
|
|
|
@ -28,7 +28,7 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
|
@ -29,7 +29,7 @@ SOFTWARE.
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#define private public
|
#define private public
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
TEST_CASE("const_iterator class")
|
TEST_CASE("const_iterator class")
|
||||||
|
|
|
@ -29,7 +29,7 @@ SOFTWARE.
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#define private public
|
#define private public
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
TEST_CASE("iterator class")
|
TEST_CASE("iterator class")
|
||||||
|
|
|
@ -29,7 +29,7 @@ SOFTWARE.
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#define private public
|
#define private public
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
// shortcut to scan a string literal
|
// shortcut to scan a string literal
|
||||||
|
|
|
@ -29,7 +29,7 @@ SOFTWARE.
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#define private public
|
#define private public
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
#include <valarray>
|
#include <valarray>
|
||||||
|
|
|
@ -28,7 +28,7 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
// helper function to check std::less<json::value_t>
|
// helper function to check std::less<json::value_t>
|
||||||
|
|
|
@ -28,7 +28,7 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
TEST_CASE("concepts")
|
TEST_CASE("concepts")
|
||||||
|
|
|
@ -29,7 +29,7 @@ SOFTWARE.
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#define private public
|
#define private public
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
#include <deque>
|
#include <deque>
|
||||||
|
|
|
@ -28,7 +28,7 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
TEST_CASE("other constructors and destructor")
|
TEST_CASE("other constructors and destructor")
|
||||||
|
|
|
@ -29,7 +29,7 @@ SOFTWARE.
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#define private public
|
#define private public
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
void check_escaped(const char* original, const char* escaped = "", const bool ensure_ascii = false);
|
void check_escaped(const char* original, const char* escaped = "", const bool ensure_ascii = false);
|
||||||
|
|
|
@ -29,7 +29,7 @@ SOFTWARE.
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#define private public
|
#define private public
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
#include <deque>
|
#include <deque>
|
||||||
|
|
|
@ -28,7 +28,7 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
|
@ -28,7 +28,7 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
TEST_CASE("element access 1")
|
TEST_CASE("element access 1")
|
||||||
|
|
|
@ -28,7 +28,7 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
TEST_CASE("element access 2")
|
TEST_CASE("element access 2")
|
||||||
|
|
|
@ -29,7 +29,7 @@ SOFTWARE.
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
TEST_CASE("object inspection")
|
TEST_CASE("object inspection")
|
||||||
|
|
|
@ -28,7 +28,7 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
TEST_CASE("iterator_wrapper")
|
TEST_CASE("iterator_wrapper")
|
||||||
|
|
|
@ -29,7 +29,7 @@ SOFTWARE.
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#define private public
|
#define private public
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
TEST_CASE("iterators 1")
|
TEST_CASE("iterators 1")
|
||||||
|
|
|
@ -28,7 +28,7 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
TEST_CASE("iterators 2")
|
TEST_CASE("iterators 2")
|
||||||
|
|
|
@ -28,7 +28,7 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
|
@ -29,7 +29,7 @@ SOFTWARE.
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#define private public
|
#define private public
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
TEST_CASE("JSON pointers")
|
TEST_CASE("JSON pointers")
|
||||||
|
|
|
@ -28,7 +28,7 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
TEST_CASE("JSON Merge Patch")
|
TEST_CASE("JSON Merge Patch")
|
||||||
|
|
|
@ -28,7 +28,7 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
TEST_CASE("version information")
|
TEST_CASE("version information")
|
||||||
|
|
|
@ -28,7 +28,7 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
TEST_CASE("modifiers")
|
TEST_CASE("modifiers")
|
||||||
|
|
|
@ -28,7 +28,7 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
|
@ -27,7 +27,7 @@ SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
|
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
TEST_CASE("pointer access")
|
TEST_CASE("pointer access")
|
||||||
|
|
|
@ -28,7 +28,7 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
#include <deque>
|
#include <deque>
|
||||||
|
|
|
@ -28,7 +28,7 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
TEST_CASE("reference access")
|
TEST_CASE("reference access")
|
||||||
|
|
|
@ -29,7 +29,7 @@ SOFTWARE.
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#define private public
|
#define private public
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
|
@ -28,7 +28,7 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
TEST_CASE("serialization")
|
TEST_CASE("serialization")
|
||||||
|
|
|
@ -28,7 +28,7 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
|
@ -32,7 +32,7 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::detail::dtoa_impl::reinterpret_bits;
|
using nlohmann::detail::dtoa_impl::reinterpret_bits;
|
||||||
|
|
||||||
static float make_float(uint32_t sign_bit, uint32_t biased_exponent, uint32_t significand)
|
static float make_float(uint32_t sign_bit, uint32_t biased_exponent, uint32_t significand)
|
||||||
|
|
|
@ -28,7 +28,7 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
|
@ -28,7 +28,7 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
|
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ SOFTWARE.
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#define private public
|
#define private public
|
||||||
#include "json.hpp"
|
#include <nlohmann/json.hpp>
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
6
third_party/amalgamate/config.json
vendored
6
third_party/amalgamate/config.json
vendored
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
"project": "JSON for Modern C++",
|
"project": "JSON for Modern C++",
|
||||||
"target": "src/json.hpp",
|
"target": "single_include/nlohmann/json.hpp",
|
||||||
"sources": [
|
"sources": [
|
||||||
"json.hpp"
|
"include/nlohmann/json.hpp"
|
||||||
],
|
],
|
||||||
"include_paths": ["."]
|
"include_paths": ["include"]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue