Unverified Commit ce7d0ebf authored by Niels Lohmann's avatar Niels Lohmann Committed by GitHub

Merge pull request #944 from theodelrieu/fix/cmake_install

fix cmake install directory (for real this time)
......@@ -24,7 +24,6 @@ option(JSON_MultipleHeaders "Use non-amalgamated version of the library." OFF)
set(NLOHMANN_JSON_TARGET_NAME ${PROJECT_NAME})
set(NLOHMANN_JSON_CONFIG_INSTALL_DIR "lib/cmake/${PROJECT_NAME}")
set(NLOHMANN_JSON_INCLUDE_INSTALL_DIR "include")
set(NLOHMANN_JSON_HEADER_INSTALL_DIR "${NLOHMANN_JSON_INCLUDE_INSTALL_DIR}/nlohmann")
set(NLOHMANN_JSON_TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
set(NLOHMANN_JSON_CMAKE_CONFIG_TEMPLATE "cmake/config.cmake.in")
set(NLOHMANN_JSON_CMAKE_CONFIG_DIR "${CMAKE_CURRENT_BINARY_DIR}/cmake_config")
......@@ -32,9 +31,9 @@ set(NLOHMANN_JSON_CMAKE_VERSION_CONFIG_FILE "${NLOHMANN_JSON_CMAKE_CONFIG_DIR}/$
set(NLOHMANN_JSON_CMAKE_PROJECT_CONFIG_FILE "${NLOHMANN_JSON_CMAKE_CONFIG_DIR}/${PROJECT_NAME}Config.cmake")
if (JSON_MultipleHeaders)
set(NLOHMANN_JSON_SOURCE_DIR "develop/")
set(NLOHMANN_JSON_INCLUDE_BUILD_DIR "${PROJECT_SOURCE_DIR}/include/")
else()
set(NLOHMANN_JSON_SOURCE_DIR "src/")
set(NLOHMANN_JSON_INCLUDE_BUILD_DIR "${PROJECT_SOURCE_DIR}/single_include/")
endif()
##
......@@ -46,7 +45,7 @@ add_library(${NLOHMANN_JSON_TARGET_NAME} INTERFACE)
target_include_directories(
${NLOHMANN_JSON_TARGET_NAME}
INTERFACE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${NLOHMANN_JSON_SOURCE_DIR}>
$<BUILD_INTERFACE:${NLOHMANN_JSON_INCLUDE_BUILD_DIR}>
$<INSTALL_INTERFACE:include>
)
......@@ -70,7 +69,6 @@ include(CTest) #adds option BUILD_TESTING (default ON)
if(BUILD_TESTING AND JSON_BuildTests)
enable_testing()
include_directories(${NLOHMANN_JSON_SOURCE_DIR})
add_subdirectory(test)
endif()
......@@ -87,9 +85,10 @@ configure_package_config_file(
${NLOHMANN_JSON_CMAKE_PROJECT_CONFIG_FILE}
INSTALL_DESTINATION ${NLOHMANN_JSON_CONFIG_INSTALL_DIR}
)
install(
DIRECTORY ${NLOHMANN_JSON_SOURCE_DIR}
DESTINATION ${NLOHMANN_JSON_HEADER_INSTALL_DIR}
DIRECTORY ${NLOHMANN_JSON_INCLUDE_BUILD_DIR}
DESTINATION ${NLOHMANN_JSON_INCLUDE_INSTALL_DIR}
)
install(
FILES ${NLOHMANN_JSON_CMAKE_PROJECT_CONFIG_FILE} ${NLOHMANN_JSON_CMAKE_VERSION_CONFIG_FILE}
......
.PHONY: pretty clean ChangeLog.md
SRCS = develop/json.hpp \
develop/json_fwd.hpp \
develop/adl_serializer.hpp \
develop/detail/conversions/from_json.hpp \
develop/detail/conversions/to_chars.hpp \
develop/detail/conversions/to_json.hpp \
develop/detail/exceptions.hpp \
develop/detail/input/binary_reader.hpp \
develop/detail/input/input_adapters.hpp \
develop/detail/input/lexer.hpp \
develop/detail/input/parser.hpp \
develop/detail/iterators/internal_iterator.hpp \
develop/detail/iterators/iter_impl.hpp \
develop/detail/iterators/iteration_proxy.hpp \
develop/detail/iterators/json_reverse_iterator.hpp \
develop/detail/iterators/primitive_iterator.hpp \
develop/detail/json_pointer.hpp \
develop/detail/json_ref.hpp \
develop/detail/macro_scope.hpp \
develop/detail/macro_unscope.hpp \
develop/detail/meta.hpp \
develop/detail/output/binary_writer.hpp \
develop/detail/output/output_adapters.hpp \
develop/detail/output/serializer.hpp \
develop/detail/value_t.hpp
SRCS = include/nlohmann/json.hpp \
include/nlohmann/json_fwd.hpp \
include/nlohmann/adl_serializer.hpp \
include/nlohmann/detail/conversions/from_json.hpp \
include/nlohmann/detail/conversions/to_chars.hpp \
include/nlohmann/detail/conversions/to_json.hpp \
include/nlohmann/detail/exceptions.hpp \
include/nlohmann/detail/input/binary_reader.hpp \
include/nlohmann/detail/input/input_adapters.hpp \
include/nlohmann/detail/input/lexer.hpp \
include/nlohmann/detail/input/parser.hpp \
include/nlohmann/detail/iterators/internal_iterator.hpp \
include/nlohmann/detail/iterators/iter_impl.hpp \
include/nlohmann/detail/iterators/iteration_proxy.hpp \
include/nlohmann/detail/iterators/json_reverse_iterator.hpp \
include/nlohmann/detail/iterators/primitive_iterator.hpp \
include/nlohmann/detail/json_pointer.hpp \
include/nlohmann/detail/json_ref.hpp \
include/nlohmann/detail/macro_scope.hpp \
include/nlohmann/detail/macro_unscope.hpp \
include/nlohmann/detail/meta.hpp \
include/nlohmann/detail/output/binary_writer.hpp \
include/nlohmann/detail/output/output_adapters.hpp \
include/nlohmann/detail/output/serializer.hpp \
include/nlohmann/detail/value_t.hpp
UNAME = $(shell uname)
CXX=clang++
AMALGAMATED_FILE=single_include/nlohmann/json.hpp
# main target
all:
@echo "amalgamate - amalgamate file src/json.hpp from the develop sources"
@echo "amalgamate - amalgamate file single_include/nlohmann/json.hpp from the include/nlohmann sources"
@echo "ChangeLog.md - generate ChangeLog file"
@echo "check - compile and execute test suite"
@echo "check-amalgamation - check whether sources have been amalgamated"
......@@ -243,7 +245,7 @@ fuzzing-stop:
# call cppcheck on the main header file
cppcheck:
cppcheck --enable=warning --inconclusive --force --std=c++11 src/json.hpp --error-exitcode=1
cppcheck --enable=warning --inconclusive --force --std=c++11 $(AMALGAMATED_FILE) --error-exitcode=1
##########################################################################
......@@ -257,29 +259,29 @@ pretty:
--indent-col1-comments --pad-oper --pad-header --align-pointer=type \
--align-reference=type --add-brackets --convert-tabs --close-templates \
--lineend=linux --preserve-date --suffix=none --formatted \
$(SRCS) src/json.hpp test/src/*.cpp \
$(SRCS) $(AMALGAMATED_FILE) test/src/*.cpp \
benchmarks/src/benchmarks.cpp doc/examples/*.cpp
# create single header file
amalgamate: src/json.hpp
amalgamate: $(AMALGAMATED_FILE)
src/json.hpp: $(SRCS)
third_party/amalgamate/amalgamate.py -c third_party/amalgamate/config.json -s develop --verbose=yes
$(AMALGAMATED_FILE): $(SRCS)
third_party/amalgamate/amalgamate.py -c third_party/amalgamate/config.json -s . --verbose=yes
$(MAKE) pretty
# check if src/json.hpp has been amalgamated from the develop sources
# check if single_include/nlohmann/json.hpp has been amalgamated from the nlohmann sources
check-amalgamation:
@mv src/json.hpp src/json.hpp~
@mv $(AMALGAMATED_FILE) $(AMALGAMATED_FILE)~
@$(MAKE) amalgamate
@diff src/json.hpp src/json.hpp~ || (echo "===================================================================\n Amalgamation required! Please read the contribution guidelines\n in file .github/CONTRIBUTING.md.\n===================================================================" ; mv src/json.hpp~ src/json.hpp ; false)
@mv src/json.hpp~ src/json.hpp
@diff $(AMALGAMATED_FILE) $(AMALGAMATED_FILE)~ || (echo "===================================================================\n Amalgamation required! Please read the contribution guidelines\n in file .github/CONTRIBUTING.md.\n===================================================================" ; mv $(AMALGAMATED_FILE)~ $(AMALGAMATED_FILE) ; false)
@mv $(AMALGAMATED_FILE)~ $(AMALGAMATED_FILE)
# check if every header in develop includes sufficient headers to be compiled
# check if every header in nlohmann includes sufficient headers to be compiled
# individually
check-single-includes:
for x in $(SRCS); do \
echo "#include \"$$x\"\nint main() {}\n" | sed 's|develop/||' > single_include_test.cpp; \
$(CXX) $(CXXFLAGS) -Idevelop -std=c++11 single_include_test.cpp -o single_include_test; \
echo "#include <$$x>\nint main() {}\n" | sed 's|include/||' > single_include_test.cpp; \
$(CXX) $(CXXFLAGS) -Iinclude -std=c++11 single_include_test.cpp -o single_include_test; \
rm single_include_test.cpp single_include_test; \
done
......
......@@ -2,8 +2,8 @@
#include <utility>
#include "detail/conversions/from_json.hpp"
#include "detail/conversions/to_json.hpp"
#include <nlohmann/detail/conversions/from_json.hpp>
#include <nlohmann/detail/conversions/to_json.hpp>
namespace nlohmann
{
......
......@@ -11,10 +11,10 @@
#include <utility> // pair, declval
#include <valarray> // valarray
#include "detail/exceptions.hpp"
#include "detail/macro_scope.hpp"
#include "detail/meta.hpp"
#include "detail/value_t.hpp"
#include <nlohmann/detail/exceptions.hpp>
#include <nlohmann/detail/macro_scope.hpp>
#include <nlohmann/detail/meta.hpp>
#include <nlohmann/detail/value_t.hpp>
namespace nlohmann
{
......
......@@ -8,8 +8,8 @@
#include <valarray> // valarray
#include <vector> // vector
#include "detail/meta.hpp"
#include "detail/value_t.hpp"
#include <nlohmann/detail/meta.hpp>
#include <nlohmann/detail/value_t.hpp>
namespace nlohmann
{
......
......@@ -15,10 +15,10 @@
#include <string> // char_traits, string
#include <utility> // make_pair, move
#include "detail/input/input_adapters.hpp"
#include "detail/exceptions.hpp"
#include "detail/macro_scope.hpp"
#include "detail/value_t.hpp"
#include <nlohmann/detail/input/input_adapters.hpp>
#include <nlohmann/detail/exceptions.hpp>
#include <nlohmann/detail/macro_scope.hpp>
#include <nlohmann/detail/value_t.hpp>
namespace nlohmann
{
......
......@@ -14,7 +14,7 @@
#include <type_traits> // enable_if, is_base_of, is_pointer, is_integral, remove_pointer
#include <utility> // pair, declval
#include "detail/macro_scope.hpp"
#include <nlohmann/detail/macro_scope.hpp>
namespace nlohmann
{
......
......@@ -10,8 +10,8 @@
#include <string> // char_traits, string
#include <vector> // vector
#include "detail/macro_scope.hpp"
#include "detail/input/input_adapters.hpp"
#include <nlohmann/detail/macro_scope.hpp>
#include <nlohmann/detail/input/input_adapters.hpp>
namespace nlohmann
{
......
......@@ -7,11 +7,11 @@
#include <string> // string
#include <utility> // move
#include "detail/exceptions.hpp"
#include "detail/macro_scope.hpp"
#include "detail/input/input_adapters.hpp"
#include "detail/input/lexer.hpp"
#include "detail/value_t.hpp"
#include <nlohmann/detail/exceptions.hpp>
#include <nlohmann/detail/macro_scope.hpp>
#include <nlohmann/detail/input/input_adapters.hpp>
#include <nlohmann/detail/input/lexer.hpp>
#include <nlohmann/detail/value_t.hpp>
namespace nlohmann
{
......
#pragma once
#include "detail/iterators/primitive_iterator.hpp"
#include <nlohmann/detail/iterators/primitive_iterator.hpp>
namespace nlohmann
{
......
......@@ -4,12 +4,12 @@
#include <iterator> // iterator, random_access_iterator_tag, bidirectional_iterator_tag, advance, next
#include <type_traits> // conditional, is_const, remove_const
#include "detail/exceptions.hpp"
#include "detail/iterators/internal_iterator.hpp"
#include "detail/iterators/primitive_iterator.hpp"
#include "detail/macro_scope.hpp"
#include "detail/meta.hpp"
#include "detail/value_t.hpp"
#include <nlohmann/detail/exceptions.hpp>
#include <nlohmann/detail/iterators/internal_iterator.hpp>
#include <nlohmann/detail/iterators/primitive_iterator.hpp>
#include <nlohmann/detail/macro_scope.hpp>
#include <nlohmann/detail/meta.hpp>
#include <nlohmann/detail/value_t.hpp>
namespace nlohmann
{
......
......@@ -3,7 +3,7 @@
#include <cstddef> // size_t
#include <string> // string, to_string
#include "detail/value_t.hpp"
#include <nlohmann/detail/value_t.hpp>
namespace nlohmann
{
......
......@@ -5,9 +5,9 @@
#include <string> // string
#include <vector> // vector
#include "detail/macro_scope.hpp"
#include "detail/exceptions.hpp"
#include "detail/value_t.hpp"
#include <nlohmann/detail/macro_scope.hpp>
#include <nlohmann/detail/exceptions.hpp>
#include <nlohmann/detail/value_t.hpp>
namespace nlohmann
{
......
......@@ -6,8 +6,8 @@
#include <type_traits> // conditional, enable_if, false_type, integral_constant, is_constructible, is_integral, is_same, remove_cv, remove_reference, true_type
#include <utility> // declval
#include "json_fwd.hpp"
#include "detail/macro_scope.hpp"
#include <nlohmann/json_fwd.hpp>
#include <nlohmann/detail/macro_scope.hpp>
namespace nlohmann
{
......
......@@ -6,8 +6,8 @@
#include <cstring> // memcpy
#include <limits> // numeric_limits
#include "detail/input/binary_reader.hpp"
#include "detail/output/output_adapters.hpp"
#include <nlohmann/detail/input/binary_reader.hpp>
#include <nlohmann/detail/output/output_adapters.hpp>
namespace nlohmann
{
......
......@@ -16,12 +16,12 @@
#include <sstream> // stringstream
#include <type_traits> // is_same
#include "detail/exceptions.hpp"
#include "detail/conversions/to_chars.hpp"
#include "detail/macro_scope.hpp"
#include "detail/meta.hpp"
#include "detail/output/output_adapters.hpp"
#include "detail/value_t.hpp"
#include <nlohmann/detail/exceptions.hpp>
#include <nlohmann/detail/conversions/to_chars.hpp>
#include <nlohmann/detail/macro_scope.hpp>
#include <nlohmann/detail/meta.hpp>
#include <nlohmann/detail/output/output_adapters.hpp>
#include <nlohmann/detail/value_t.hpp>
namespace nlohmann
{
......
......@@ -45,28 +45,28 @@ SOFTWARE.
#include <string> // string, stoi, to_string
#include <utility> // declval, forward, move, pair, swap
#include "json_fwd.hpp"
#include "detail/macro_scope.hpp"
#include "detail/meta.hpp"
#include "detail/exceptions.hpp"
#include "detail/value_t.hpp"
#include "detail/conversions/from_json.hpp"
#include "detail/conversions/to_json.hpp"
#include "detail/input/input_adapters.hpp"
#include "detail/input/lexer.hpp"
#include "detail/input/parser.hpp"
#include "detail/iterators/primitive_iterator.hpp"
#include "detail/iterators/internal_iterator.hpp"
#include "detail/iterators/iter_impl.hpp"
#include "detail/iterators/iteration_proxy.hpp"
#include "detail/iterators/json_reverse_iterator.hpp"
#include "detail/output/output_adapters.hpp"
#include "detail/input/binary_reader.hpp"
#include "detail/output/binary_writer.hpp"
#include "detail/output/serializer.hpp"
#include "detail/json_ref.hpp"
#include "detail/json_pointer.hpp"
#include "adl_serializer.hpp"
#include <nlohmann/json_fwd.hpp>
#include <nlohmann/detail/macro_scope.hpp>
#include <nlohmann/detail/meta.hpp>
#include <nlohmann/detail/exceptions.hpp>
#include <nlohmann/detail/value_t.hpp>
#include <nlohmann/detail/conversions/from_json.hpp>
#include <nlohmann/detail/conversions/to_json.hpp>
#include <nlohmann/detail/input/input_adapters.hpp>
#include <nlohmann/detail/input/lexer.hpp>
#include <nlohmann/detail/input/parser.hpp>
#include <nlohmann/detail/iterators/primitive_iterator.hpp>
#include <nlohmann/detail/iterators/internal_iterator.hpp>
#include <nlohmann/detail/iterators/iter_impl.hpp>
#include <nlohmann/detail/iterators/iteration_proxy.hpp>
#include <nlohmann/detail/iterators/json_reverse_iterator.hpp>
#include <nlohmann/detail/output/output_adapters.hpp>
#include <nlohmann/detail/input/binary_reader.hpp>
#include <nlohmann/detail/output/binary_writer.hpp>
#include <nlohmann/detail/output/serializer.hpp>
#include <nlohmann/detail/json_ref.hpp>
#include <nlohmann/detail/json_pointer.hpp>
#include <nlohmann/adl_serializer.hpp>
/*!
@brief namespace for Niels Lohmann
......@@ -7564,6 +7564,6 @@ inline nlohmann::json::json_pointer operator "" _json_pointer(const char* s, std
return nlohmann::json::json_pointer(std::string(s, n));
}
#include "detail/macro_unscope.hpp"
#include <nlohmann/detail/macro_unscope.hpp>
#endif
File moved
......@@ -101,6 +101,7 @@ foreach(file ${files})
target_compile_definitions(${testcase} PRIVATE CATCH_CONFIG_FAST_COMPILE)
target_include_directories(${testcase} PRIVATE "thirdparty/catch")
target_include_directories(${testcase} PRIVATE ${NLOHMANN_JSON_INCLUDE_BUILD_DIR})
target_link_libraries(${testcase} ${NLOHMANN_JSON_TARGET_NAME})
if(NOT MSVC)
......
......@@ -4,7 +4,7 @@
# additional flags
CXXFLAGS += -std=c++11 -Wall -Wextra -pedantic -Wcast-align -Wcast-qual -Wno-ctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wmissing-declarations -Wmissing-include-dirs -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-overflow=5 -Wswitch -Wundef -Wno-unused -Wnon-virtual-dtor -Wreorder -Wdeprecated -Wno-float-equal
CPPFLAGS += -I ../src -I . -I thirdparty/catch -DCATCH_CONFIG_FAST_COMPILE
CPPFLAGS += -I ../single_include -I . -I thirdparty/catch -DCATCH_CONFIG_FAST_COMPILE
SOURCES = src/unit.cpp \
src/unit-algorithms.cpp \
......@@ -60,11 +60,11 @@ clean:
# single test file
##############################################################################
json_unit: $(OBJECTS) ../src/json.hpp thirdparty/catch/catch.hpp
json_unit: $(OBJECTS) ../single_include/nlohmann/json.hpp thirdparty/catch/catch.hpp
@echo "[CXXLD] $@"
@$(CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJECTS) -o $@
%.o: %.cpp ../src/json.hpp thirdparty/catch/catch.hpp
%.o: %.cpp ../single_include/nlohmann/json.hpp thirdparty/catch/catch.hpp
@echo "[CXX] $@"
@$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@
......@@ -73,7 +73,7 @@ json_unit: $(OBJECTS) ../src/json.hpp thirdparty/catch/catch.hpp
# individual test cases
##############################################################################
test-%: src/unit-%.o src/unit.o ../src/json.hpp thirdparty/catch/catch.hpp
test-%: src/unit-%.o src/unit.o ../single_include/nlohmann/json.hpp thirdparty/catch/catch.hpp
@echo "[CXXLD] $@"
@$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $< src/unit.o -o $@
......
......@@ -20,7 +20,7 @@ Licensed under the MIT License <http://opensource.org/licenses/MIT>.
#include <iostream>
#include <sstream>
#include <json.hpp>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
......
......@@ -21,7 +21,7 @@ Licensed under the MIT License <http://opensource.org/licenses/MIT>.
#include <iostream>
#include <sstream>
#include <json.hpp>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
......
......@@ -20,7 +20,7 @@ Licensed under the MIT License <http://opensource.org/licenses/MIT>.
#include <iostream>
#include <sstream>
#include <json.hpp>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
......
......@@ -20,7 +20,7 @@ Licensed under the MIT License <http://opensource.org/licenses/MIT>.
#include <iostream>
#include <sstream>
#include <json.hpp>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
......
......@@ -28,7 +28,7 @@ SOFTWARE.
#include "catch.hpp"
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
TEST_CASE("algorithms")
......
......@@ -29,7 +29,7 @@ SOFTWARE.
#include "catch.hpp"
#define private public
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
// special test case to check if memory is leaked if constructor throws
......
......@@ -28,7 +28,7 @@ SOFTWARE.
#include "catch.hpp"
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
TEST_CASE("capacity")
......
......@@ -28,7 +28,7 @@ SOFTWARE.
#include "catch.hpp"
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
#include <fstream>
......
......@@ -29,7 +29,7 @@ SOFTWARE.
#include "catch.hpp"
#define private public
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
TEST_CASE("const_iterator class")
......
......@@ -29,7 +29,7 @@ SOFTWARE.
#include "catch.hpp"
#define private public
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
TEST_CASE("iterator class")
......
......@@ -29,7 +29,7 @@ SOFTWARE.
#include "catch.hpp"
#define private public
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
// shortcut to scan a string literal
......
......@@ -29,7 +29,7 @@ SOFTWARE.
#include "catch.hpp"
#define private public
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
#include <valarray>
......
......@@ -28,7 +28,7 @@ SOFTWARE.
#include "catch.hpp"
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
// helper function to check std::less<json::value_t>
......
......@@ -28,7 +28,7 @@ SOFTWARE.
#include "catch.hpp"
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
TEST_CASE("concepts")
......
......@@ -29,7 +29,7 @@ SOFTWARE.
#include "catch.hpp"
#define private public
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
#include <deque>
......
......@@ -28,7 +28,7 @@ SOFTWARE.
#include "catch.hpp"
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
TEST_CASE("other constructors and destructor")
......
......@@ -29,7 +29,7 @@ SOFTWARE.
#include "catch.hpp"
#define private public
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
void check_escaped(const char* original, const char* escaped = "", const bool ensure_ascii = false);
......
......@@ -29,7 +29,7 @@ SOFTWARE.
#include "catch.hpp"
#define private public
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
#include <deque>
......
......@@ -28,7 +28,7 @@ SOFTWARE.
#include "catch.hpp"
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
#include <iostream>
......
......@@ -28,7 +28,7 @@ SOFTWARE.
#include "catch.hpp"
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
TEST_CASE("element access 1")
......
......@@ -28,7 +28,7 @@ SOFTWARE.
#include "catch.hpp"
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
TEST_CASE("element access 2")
......
......@@ -29,7 +29,7 @@ SOFTWARE.
#include "catch.hpp"
#include <fstream>
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
TEST_CASE("object inspection")
......@@ -316,8 +316,8 @@ TEST_CASE("object inspection")
SECTION("round trips")
{
for (const auto& s :
{"3.141592653589793", "1000000000000000010E5"
})
{"3.141592653589793", "1000000000000000010E5"
})
{
json j1 = json::parse(s);
std::string s1 = j1.dump();
......
......@@ -28,7 +28,7 @@ SOFTWARE.
#include "catch.hpp"
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
TEST_CASE("iterator_wrapper")
......
......@@ -29,7 +29,7 @@ SOFTWARE.
#include "catch.hpp"
#define private public
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
TEST_CASE("iterators 1")
......
......@@ -28,7 +28,7 @@ SOFTWARE.
#include "catch.hpp"
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
TEST_CASE("iterators 2")
......
......@@ -28,7 +28,7 @@ SOFTWARE.
#include "catch.hpp"
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
#include <fstream>
......
......@@ -29,7 +29,7 @@ SOFTWARE.
#include "catch.hpp"
#define private public
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
TEST_CASE("JSON pointers")
......
......@@ -28,7 +28,7 @@ SOFTWARE.
#include "catch.hpp"
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
TEST_CASE("JSON Merge Patch")
......
......@@ -28,7 +28,7 @@ SOFTWARE.
#include "catch.hpp"
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
TEST_CASE("version information")
......
......@@ -28,7 +28,7 @@ SOFTWARE.
#include "catch.hpp"
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
TEST_CASE("modifiers")
......
......@@ -28,7 +28,7 @@ SOFTWARE.
#include "catch.hpp"
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
#include <fstream>
......
......@@ -27,7 +27,7 @@ SOFTWARE.
*/
#include "catch.hpp"
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
......
......@@ -28,7 +28,7 @@ SOFTWARE.
#include "catch.hpp"
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
TEST_CASE("pointer access")
......
......@@ -28,7 +28,7 @@ SOFTWARE.
#include "catch.hpp"
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
#include <deque>
......
......@@ -28,7 +28,7 @@ SOFTWARE.
#include "catch.hpp"
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
TEST_CASE("reference access")
......
......@@ -29,7 +29,7 @@ SOFTWARE.
#include "catch.hpp"
#define private public
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
#include <fstream>
......
......@@ -28,7 +28,7 @@ SOFTWARE.
#include "catch.hpp"
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
TEST_CASE("serialization")
......
......@@ -28,7 +28,7 @@ SOFTWARE.
#include "catch.hpp"
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
#include <fstream>
......
......@@ -32,7 +32,7 @@ SOFTWARE.
#include "catch.hpp"
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::detail::dtoa_impl::reinterpret_bits;
static float make_float(uint32_t sign_bit, uint32_t biased_exponent, uint32_t significand)
......
......@@ -28,7 +28,7 @@ SOFTWARE.
#include "catch.hpp"
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
#include <fstream>
......
......@@ -28,7 +28,7 @@ SOFTWARE.
#include "catch.hpp"
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
......
......@@ -29,7 +29,7 @@ SOFTWARE.
#include "catch.hpp"
#define private public
#include "json.hpp"
#include <nlohmann/json.hpp>
using nlohmann::json;
#include <fstream>
......
{
"project": "JSON for Modern C++",
"target": "src/json.hpp",
"target": "single_include/nlohmann/json.hpp",
"sources": [
"json.hpp"
"include/nlohmann/json.hpp"
],
"include_paths": ["."]
"include_paths": ["include"]
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment