Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
json
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
json
Commits
26196f25
Unverified
Commit
26196f25
authored
Jul 16, 2020
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🔥
remove test Makefile targets (all handled by CMake)
parent
3d60befd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
107 deletions
+6
-107
Makefile
Makefile
+0
-16
test/Makefile
test/Makefile
+6
-91
No files found.
Makefile
View file @
26196f25
...
...
@@ -30,7 +30,6 @@ AMALGAMATED_FILE=single_include/nlohmann/json.hpp
all
:
@
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"
@
echo
"clean - remove built files"
@
echo
"coverage - create coverage information with lcov"
...
...
@@ -44,26 +43,12 @@ all:
@
echo
"fuzz_testing_cbor - prepare fuzz testing of the CBOR parser"
@
echo
"fuzz_testing_msgpack - prepare fuzz testing of the MessagePack parser"
@
echo
"fuzz_testing_ubjson - prepare fuzz testing of the UBJSON parser"
@
echo
"json_unit - create single-file test executable"
@
echo
"pedantic_clang - run Clang with maximal warning flags"
@
echo
"pedantic_gcc - run GCC with maximal warning flags"
@
echo
"pretty - beautify code with Artistic Style"
@
echo
"run_benchmarks - build and run benchmarks"
##########################################################################
# unit tests
##########################################################################
# build unit tests
json_unit
:
@
$(MAKE)
json_unit
-C
test
# run unit tests
check
:
$(MAKE)
check
-C
test
##########################################################################
# coverage
##########################################################################
...
...
@@ -642,7 +627,6 @@ clean:
rm
-fr
cmake-3.1.0-Darwin64.tar.gz cmake-3.1.0-Darwin64
rm
-fr
build_coverage build_benchmarks fuzz-testing clang_analyze_build pvs_studio_build infer_build clang_sanitize_build cmake_build
$(MAKE)
clean
-Cdoc
$(MAKE)
clean
-Ctest
##########################################################################
# Thirdparty code
...
...
test/Makefile
View file @
26196f25
##########################################################################
# unit tests
##########################################################################
# 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
../single_include
-I
.
-I
thirdparty/doctest
-I
thirdparty/fifo_map
-DDOCTEST_CONFIG_SUPER_FAST_ASSERTS
SOURCES
=
src/unit.cpp
\
src/unit-algorithms.cpp
\
src/unit-allocator.cpp
\
src/unit-alt-string.cpp
\
src/unit-bson.cpp
\
src/unit-capacity.cpp
\
src/unit-cbor.cpp
\
src/unit-class_const_iterator.cpp
\
src/unit-class_iterator.cpp
\
src/unit-class_lexer.cpp
\
src/unit-class_parser.cpp
\
src/unit-comparison.cpp
\
src/unit-concepts.cpp
\
src/unit-constructor1.cpp
\
src/unit-constructor2.cpp
\
src/unit-convenience.cpp
\
src/unit-conversions.cpp
\
src/unit-deserialization.cpp
\
src/unit-element_access1.cpp
\
src/unit-element_access2.cpp
\
src/unit-inspection.cpp
\
src/unit-items.cpp
\
src/unit-iterators1.cpp
\
src/unit-iterators2.cpp
\
src/unit-merge_patch.cpp
\
src/unit-json_patch.cpp
\
src/unit-json_pointer.cpp
\
src/unit-meta.cpp
\
src/unit-modifiers.cpp
\
src/unit-msgpack.cpp
\
src/unit-pointer_access.cpp
\
src/unit-readme.cpp
\
src/unit-reference_access.cpp
\
src/unit-regression.cpp
\
src/unit-serialization.cpp
\
src/unit-testsuites.cpp
\
src/unit-ubjson.cpp
\
src/unit-unicode.cpp
\
src/unit-user_defined_input.cpp
\
src/unit-wstring.cpp
OBJECTS
=
$(SOURCES:.cpp=.o)
TESTCASES
=
$(
patsubst
src/unit-%.cpp,test-%,
$(
wildcard
src/unit-
*
.cpp
))
##############################################################################
# main rules
##############################################################################
all
:
$(TESTCASES)
clean
:
rm
-fr
json_unit
$(OBJECTS)
$(SOURCES:.cpp=.gcno)
$(SOURCES:.cpp=.gcda)
$(TESTCASES)
$(FUZZERS)
test_data.hpp
test_data.hpp
:
@
echo
"#define TEST_DATA_DIRECTORY"
>
$@
##############################################################################
#
single test file
#
OSS-Fuzz
##############################################################################
json_unit
:
$(OBJECTS) ../single_include/nlohmann/json.hpp thirdparty/doctest/doctest.h
@
echo
"[CXXLD]
$@
"
@
$(CXX)
$(CXXFLAGS)
$(LDFLAGS)
$(OBJECTS)
-o
$@
# The following targets realize the integration to OSS-Fuzz.
# See <https://github.com/google/oss-fuzz/blob/master/projects/json/build.sh> for more information.
%.o
:
%.cpp ../single_include/nlohmann/json.hpp thirdparty/doctest/doctest.h test_data.hpp
@
echo
"[CXX]
$@
"
@
$(CXX)
$(CXXFLAGS)
$(CPPFLAGS)
-c
$<
-o
$@
##############################################################################
# individual test cases
##############################################################################
test-%
:
src/unit-%.o src/unit.o ../single_include/nlohmann/json.hpp thirdparty/doctest/doctest.h test_data.hpp
@
echo
"[CXXLD]
$@
"
@
$(CXX)
$(CXXFLAGS)
$(CPPFLAGS)
$(LDFLAGS)
$<
src/unit.o
-o
$@
TEST_PATTERN
?=
"*"
TEST_PREFIX
=
""
check
:
$(OBJECTS) $(TESTCASES)
@
cd
..
;
for
testcase
in
$(TESTCASES)
;
do
echo
"Executing
$$
testcase..."
;
$(TEST_PREFIX)
test
/
$$
testcase
$(TEST_PATTERN)
||
exit
1
;
done
##############################################################################
# fuzzer
##############################################################################
# additional flags
CXXFLAGS
+=
-std
=
c++11
CPPFLAGS
+=
-I
../single_include
FUZZER_ENGINE
=
src/fuzzer-driver_afl.cpp
FUZZERS
=
parse_afl_fuzzer parse_bson_fuzzer parse_cbor_fuzzer parse_msgpack_fuzzer parse_ubjson_fuzzer
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment