♻️ reorganized code

pull/911/head
Niels Lohmann 2018-01-09 18:30:02 +01:00
parent b67e00b9b5
commit 0a2920e0fd
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
27 changed files with 19205 additions and 19134 deletions

View File

@ -68,18 +68,26 @@ if(BUILD_TESTING AND JSON_BuildTests)
add_subdirectory(test)
endif()
ExternalProject_Add(amalgamate
GIT_REPOSITORY "https://github.com/theodelrieu/Amalgamate"
CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}"
)
##
## AMALGAMATION
## create a single header file
##
option(JSON_Amalgamate "Build and use amalgamation" OFF)
# There is no way to tell amalgamate to force-write the output file even if it already exists...
add_custom_target(single_header ALL rm -f "${CMAKE_SOURCE_DIR}/single_header/json.hpp"
COMMENT "Amalgamating json.hpp..."
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/${NLOHMANN_JSON_SOURCE_DIR}
DEPENDS amalgamate
COMMAND "${CMAKE_BINARY_DIR}/bin/amalgamate" -w '*.hpp' -i . json.hpp "${CMAKE_SOURCE_DIR}/single_header/json.hpp"
)
if(JSON_Amalgamate)
ExternalProject_Add(amalgamate
GIT_REPOSITORY "https://github.com/theodelrieu/Amalgamate"
CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}"
)
# There is no way to tell amalgamate to force-write the output file even if it already exists...
add_custom_target(single_header ALL rm -f "${CMAKE_SOURCE_DIR}/${NLOHMANN_JSON_SOURCE_DIR}/json.hpp"
COMMENT "Amalgamating json.hpp..."
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/develop
DEPENDS amalgamate
COMMAND "${CMAKE_BINARY_DIR}/bin/amalgamate" -w '*.hpp' -i . json.hpp "${CMAKE_SOURCE_DIR}/${NLOHMANN_JSON_SOURCE_DIR}/json.hpp"
)
endif()
##
## INSTALL

View File

@ -1,29 +1,30 @@
.PHONY: pretty clean ChangeLog.md
SRCDIR = ./src
DEVDIR = ./develop
SRCS = $(SRCDIR)/json.hpp \
$(SRCDIR)/json_fwd.hpp \
$(SRCDIR)/detail/macro_scope.hpp \
$(SRCDIR)/detail/macro_unscope.hpp \
$(SRCDIR)/detail/meta.hpp \
$(SRCDIR)/detail/exceptions.hpp \
$(SRCDIR)/detail/value_t.hpp \
$(SRCDIR)/detail/conversions/from_json.hpp \
$(SRCDIR)/detail/conversions/to_json.hpp \
$(SRCDIR)/detail/parsing/input_adapters.hpp \
$(SRCDIR)/detail/parsing/lexer.hpp \
$(SRCDIR)/detail/parsing/parser.hpp \
$(SRCDIR)/detail/iterators/primitive_iterator.hpp \
$(SRCDIR)/detail/iterators/internal_iterator.hpp \
$(SRCDIR)/detail/iterators/iter_impl.hpp \
$(SRCDIR)/detail/iterators/iteration_proxy.hpp \
$(SRCDIR)/detail/iterators/json_reverse_iterator.hpp \
$(SRCDIR)/detail/parsing/output_adapters.hpp \
$(SRCDIR)/detail/parsing/binary_reader.hpp \
$(SRCDIR)/detail/parsing/binary_writer.hpp \
$(SRCDIR)/detail/serializer.hpp \
$(SRCDIR)/detail/json_ref.hpp \
$(SRCDIR)/adl_serializer.hpp
$(DEVDIR)/json_fwd.hpp \
$(DEVDIR)/detail/macro_scope.hpp \
$(DEVDIR)/detail/macro_unscope.hpp \
$(DEVDIR)/detail/meta.hpp \
$(DEVDIR)/detail/exceptions.hpp \
$(DEVDIR)/detail/value_t.hpp \
$(DEVDIR)/detail/conversions/from_json.hpp \
$(DEVDIR)/detail/conversions/to_json.hpp \
$(DEVDIR)/detail/parsing/input_adapters.hpp \
$(DEVDIR)/detail/parsing/lexer.hpp \
$(DEVDIR)/detail/parsing/parser.hpp \
$(DEVDIR)/detail/iterators/primitive_iterator.hpp \
$(DEVDIR)/detail/iterators/internal_iterator.hpp \
$(DEVDIR)/detail/iterators/iter_impl.hpp \
$(DEVDIR)/detail/iterators/iteration_proxy.hpp \
$(DEVDIR)/detail/iterators/json_reverse_iterator.hpp \
$(DEVDIR)/detail/parsing/output_adapters.hpp \
$(DEVDIR)/detail/parsing/binary_reader.hpp \
$(DEVDIR)/detail/parsing/binary_writer.hpp \
$(DEVDIR)/detail/serializer.hpp \
$(DEVDIR)/detail/json_ref.hpp \
$(DEVDIR)/adl_serializer.hpp
UNAME = $(shell uname)
CXX=clang++

8024
develop/json.hpp 100644

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

11173
src/json.hpp

File diff suppressed because it is too large Load Diff