➖ ➕ 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:
parent
0a2920e0fd
commit
ce53537ba2
3 changed files with 123 additions and 3873 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue