replaces amalgamation tool

The tool used before created a lot of duplicates inside the generated amalgamation. The new tool is a single Python file which seems to do the same job.
This commit is contained in:
Niels Lohmann 2018-01-09 23:15:06 +01:00
parent 0a2920e0fd
commit ce53537ba2
No known key found for this signature in database
GPG key ID: 7F3CEA63AE251B69
3 changed files with 123 additions and 3873 deletions

View file

@ -68,27 +68,6 @@ if(BUILD_TESTING AND JSON_BuildTests)
add_subdirectory(test)
endif()
##
## AMALGAMATION
## create a single header file
##
option(JSON_Amalgamate "Build and use amalgamation" OFF)
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
## install header files, generate and install cmake config files for find_package()