mirror of
https://github.com/nlohmann/json.git
synced 2026-11-01 18:35:34 +00:00
♻️ reorganized code
This commit is contained in:
27 files changed
+19205
-19134
No files matched your search
+19
-11
@@ -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
|
||||
|
||||
@@ -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++
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+8024
File diff suppressed because it is too large.
Load diff
File renamed without changes.
-19067
File diff suppressed because it is too large.
Load diff
+11139
-34
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user