♻️ reorganized code
This commit is contained in:
parent
b67e00b9b5
commit
0a2920e0fd
27 changed files with 19205 additions and 19134 deletions
|
@ -68,18 +68,26 @@ if(BUILD_TESTING AND JSON_BuildTests)
|
||||||
add_subdirectory(test)
|
add_subdirectory(test)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
ExternalProject_Add(amalgamate
|
##
|
||||||
GIT_REPOSITORY "https://github.com/theodelrieu/Amalgamate"
|
## AMALGAMATION
|
||||||
CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}"
|
## 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...
|
if(JSON_Amalgamate)
|
||||||
add_custom_target(single_header ALL rm -f "${CMAKE_SOURCE_DIR}/single_header/json.hpp"
|
ExternalProject_Add(amalgamate
|
||||||
COMMENT "Amalgamating json.hpp..."
|
GIT_REPOSITORY "https://github.com/theodelrieu/Amalgamate"
|
||||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/${NLOHMANN_JSON_SOURCE_DIR}
|
CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}"
|
||||||
DEPENDS amalgamate
|
)
|
||||||
COMMAND "${CMAKE_BINARY_DIR}/bin/amalgamate" -w '*.hpp' -i . json.hpp "${CMAKE_SOURCE_DIR}/single_header/json.hpp"
|
|
||||||
)
|
# 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
|
## INSTALL
|
||||||
|
|
45
Makefile
45
Makefile
|
@ -1,29 +1,30 @@
|
||||||
.PHONY: pretty clean ChangeLog.md
|
.PHONY: pretty clean ChangeLog.md
|
||||||
|
|
||||||
SRCDIR = ./src
|
SRCDIR = ./src
|
||||||
|
DEVDIR = ./develop
|
||||||
SRCS = $(SRCDIR)/json.hpp \
|
SRCS = $(SRCDIR)/json.hpp \
|
||||||
$(SRCDIR)/json_fwd.hpp \
|
$(DEVDIR)/json_fwd.hpp \
|
||||||
$(SRCDIR)/detail/macro_scope.hpp \
|
$(DEVDIR)/detail/macro_scope.hpp \
|
||||||
$(SRCDIR)/detail/macro_unscope.hpp \
|
$(DEVDIR)/detail/macro_unscope.hpp \
|
||||||
$(SRCDIR)/detail/meta.hpp \
|
$(DEVDIR)/detail/meta.hpp \
|
||||||
$(SRCDIR)/detail/exceptions.hpp \
|
$(DEVDIR)/detail/exceptions.hpp \
|
||||||
$(SRCDIR)/detail/value_t.hpp \
|
$(DEVDIR)/detail/value_t.hpp \
|
||||||
$(SRCDIR)/detail/conversions/from_json.hpp \
|
$(DEVDIR)/detail/conversions/from_json.hpp \
|
||||||
$(SRCDIR)/detail/conversions/to_json.hpp \
|
$(DEVDIR)/detail/conversions/to_json.hpp \
|
||||||
$(SRCDIR)/detail/parsing/input_adapters.hpp \
|
$(DEVDIR)/detail/parsing/input_adapters.hpp \
|
||||||
$(SRCDIR)/detail/parsing/lexer.hpp \
|
$(DEVDIR)/detail/parsing/lexer.hpp \
|
||||||
$(SRCDIR)/detail/parsing/parser.hpp \
|
$(DEVDIR)/detail/parsing/parser.hpp \
|
||||||
$(SRCDIR)/detail/iterators/primitive_iterator.hpp \
|
$(DEVDIR)/detail/iterators/primitive_iterator.hpp \
|
||||||
$(SRCDIR)/detail/iterators/internal_iterator.hpp \
|
$(DEVDIR)/detail/iterators/internal_iterator.hpp \
|
||||||
$(SRCDIR)/detail/iterators/iter_impl.hpp \
|
$(DEVDIR)/detail/iterators/iter_impl.hpp \
|
||||||
$(SRCDIR)/detail/iterators/iteration_proxy.hpp \
|
$(DEVDIR)/detail/iterators/iteration_proxy.hpp \
|
||||||
$(SRCDIR)/detail/iterators/json_reverse_iterator.hpp \
|
$(DEVDIR)/detail/iterators/json_reverse_iterator.hpp \
|
||||||
$(SRCDIR)/detail/parsing/output_adapters.hpp \
|
$(DEVDIR)/detail/parsing/output_adapters.hpp \
|
||||||
$(SRCDIR)/detail/parsing/binary_reader.hpp \
|
$(DEVDIR)/detail/parsing/binary_reader.hpp \
|
||||||
$(SRCDIR)/detail/parsing/binary_writer.hpp \
|
$(DEVDIR)/detail/parsing/binary_writer.hpp \
|
||||||
$(SRCDIR)/detail/serializer.hpp \
|
$(DEVDIR)/detail/serializer.hpp \
|
||||||
$(SRCDIR)/detail/json_ref.hpp \
|
$(DEVDIR)/detail/json_ref.hpp \
|
||||||
$(SRCDIR)/adl_serializer.hpp
|
$(DEVDIR)/adl_serializer.hpp
|
||||||
|
|
||||||
UNAME = $(shell uname)
|
UNAME = $(shell uname)
|
||||||
CXX=clang++
|
CXX=clang++
|
||||||
|
|
8024
develop/json.hpp
Normal file
8024
develop/json.hpp
Normal file
File diff suppressed because it is too large
Load diff
19067
single_header/json.hpp
19067
single_header/json.hpp
File diff suppressed because it is too large
Load diff
11173
src/json.hpp
11173
src/json.hpp
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue