mirror of
https://github.com/nlohmann/json.git
synced 2026-10-05 22:20:30 +00:00
Merge branch 'json-view/08-view-builder' into json-view/10-view-document
Conflicts in the See also lists of nine basic_json pages, is_discarded.md, and features/index.md, where develop (#5638) and this branch both added entries: kept both. Ran make amalgamate. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
+22
-6
@@ -599,7 +599,12 @@ foreach(SRC_FILE ${SRC_FILES})
|
||||
add_executable(single_${RELATIVE_SRC_FILE} EXCLUDE_FROM_ALL ${PROJECT_BINARY_DIR}/src_single/${RELATIVE_SRC_FILE}.cpp)
|
||||
target_include_directories(single_${RELATIVE_SRC_FILE} PRIVATE ${PROJECT_SOURCE_DIR}/include)
|
||||
target_compile_features(single_${RELATIVE_SRC_FILE} PRIVATE cxx_std_11)
|
||||
set_property(TARGET single_${RELATIVE_SRC_FILE} PROPERTY CXX_INCLUDE_WHAT_YOU_USE "${iwyu_path_and_options}")
|
||||
if(RELATIVE_SRC_FILE STREQUAL "json")
|
||||
# see below: report json.hpp's diagnostics without --error, so they do not fail the build
|
||||
set_property(TARGET single_${RELATIVE_SRC_FILE} PROPERTY CXX_INCLUDE_WHAT_YOU_USE ${IWYU_TOOL} -Xiwyu --max_line_length=300)
|
||||
else()
|
||||
set_property(TARGET single_${RELATIVE_SRC_FILE} PROPERTY CXX_INCLUDE_WHAT_YOU_USE "${iwyu_path_and_options}")
|
||||
endif()
|
||||
# remember binary for ci_single_binaries
|
||||
list(APPEND single_binaries single_${RELATIVE_SRC_FILE})
|
||||
# json.hpp pulls together the whole library behind heavily templated, SFINAE-based code, and
|
||||
@@ -661,14 +666,19 @@ function(ci_get_cmake version var)
|
||||
OUTPUT ${${var}}
|
||||
COMMAND wget -nc https://github.com/Kitware/CMake/releases/download/v${version}/cmake-${version}-linux-x86_64.tar.gz
|
||||
COMMAND wget -nc https://github.com/Kitware/CMake/releases/download/v${version}/cmake-${version}-SHA-256.txt
|
||||
# verify the archive against Kitware's published SHA-256 sums before unpacking it
|
||||
COMMAND sh -c "grep ' cmake-${version}-linux-x86_64[.]tar[.]gz$' cmake-${version}-SHA-256.txt | sha256sum -c -"
|
||||
COMMAND tar xfz cmake-${version}-linux-x86_64.tar.gz
|
||||
COMMAND rm cmake-${version}-linux-x86_64.tar.gz cmake-${version}-SHA-256.txt
|
||||
# verify the archive against Kitware's published SHA-256 sums before unpacking it; old
|
||||
# releases list the archive as "Linux-x86_64", so match case-insensitively and rewrite
|
||||
# the name to the lowercase one the download was saved under
|
||||
COMMAND sh -c "grep -i ' cmake-${version}-linux-x86_64[.]tar[.]gz$' cmake-${version}-SHA-256.txt | tr L l | sha256sum -c -"
|
||||
# unpack into cmake-${version} directly, as the archive's top-level directory is spelled
|
||||
# "Linux" in old releases and "linux" in newer ones
|
||||
COMMAND ${CMAKE_COMMAND} -E rm -rf cmake-${version}
|
||||
COMMAND ${CMAKE_COMMAND} -E rename cmake-${version}-linux-x86_64 cmake-${version}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory cmake-${version}
|
||||
COMMAND tar xfz cmake-${version}-linux-x86_64.tar.gz -C cmake-${version} --strip-components=1
|
||||
COMMAND rm cmake-${version}-linux-x86_64.tar.gz cmake-${version}-SHA-256.txt
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||
COMMENT "Download prebuilt CMake ${version}"
|
||||
VERBATIM
|
||||
)
|
||||
else()
|
||||
# no prebuilt archive for this platform (e.g. macOS or Linux aarch64): build from source
|
||||
@@ -894,6 +904,12 @@ add_custom_target(ci_test_build_documentation
|
||||
COMMENT "Build the documentation"
|
||||
)
|
||||
|
||||
add_custom_target(ci_test_documentation_mermaid
|
||||
COMMAND make check_mermaid
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/docs/mkdocs
|
||||
COMMENT "Check the Mermaid diagrams of the documentation"
|
||||
)
|
||||
|
||||
###############################################################################
|
||||
# Clean up all generated files.
|
||||
###############################################################################
|
||||
|
||||
@@ -164,7 +164,6 @@ set(GCC_CXXFLAGS
|
||||
-Wenum-conversion
|
||||
-Wexceptions
|
||||
-Wexpansion-to-defined
|
||||
-Wexperimental-fmv-target
|
||||
-Wexpose-global-module-tu-local
|
||||
-Wexternal-tu-local
|
||||
-Wextra
|
||||
|
||||
Reference in New Issue
Block a user