rj_schema 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Rakefile +18 -0
- data/ext/rj_schema/extconf.rb +7 -0
- data/ext/rj_schema/rapidjson/CHANGELOG.md +158 -0
- data/ext/rj_schema/rapidjson/CMakeLists.txt +221 -0
- data/ext/rj_schema/rapidjson/CMakeModules/FindGTestSrc.cmake +30 -0
- data/ext/rj_schema/rapidjson/RapidJSON.pc.in +7 -0
- data/ext/rj_schema/rapidjson/RapidJSONConfig.cmake.in +15 -0
- data/ext/rj_schema/rapidjson/RapidJSONConfigVersion.cmake.in +10 -0
- data/ext/rj_schema/rapidjson/appveyor.yml +41 -0
- data/ext/rj_schema/rapidjson/bin/data/glossary.json +22 -0
- data/ext/rj_schema/rapidjson/bin/data/menu.json +27 -0
- data/ext/rj_schema/rapidjson/bin/data/readme.txt +1 -0
- data/ext/rj_schema/rapidjson/bin/data/sample.json +3315 -0
- data/ext/rj_schema/rapidjson/bin/data/webapp.json +88 -0
- data/ext/rj_schema/rapidjson/bin/data/widget.json +26 -0
- data/ext/rj_schema/rapidjson/bin/draft-04/schema +150 -0
- data/ext/rj_schema/rapidjson/bin/encodings/utf16be.json +0 -0
- data/ext/rj_schema/rapidjson/bin/encodings/utf16bebom.json +0 -0
- data/ext/rj_schema/rapidjson/bin/encodings/utf16le.json +0 -0
- data/ext/rj_schema/rapidjson/bin/encodings/utf16lebom.json +0 -0
- data/ext/rj_schema/rapidjson/bin/encodings/utf32be.json +0 -0
- data/ext/rj_schema/rapidjson/bin/encodings/utf32bebom.json +0 -0
- data/ext/rj_schema/rapidjson/bin/encodings/utf32le.json +0 -0
- data/ext/rj_schema/rapidjson/bin/encodings/utf32lebom.json +0 -0
- data/ext/rj_schema/rapidjson/bin/encodings/utf8.json +7 -0
- data/ext/rj_schema/rapidjson/bin/encodings/utf8bom.json +7 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail1.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail10.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail11.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail12.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail13.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail14.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail15.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail16.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail17.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail18.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail19.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail2.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail20.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail21.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail22.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail23.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail24.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail25.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail26.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail27.json +2 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail28.json +2 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail29.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail3.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail30.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail31.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail32.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail33.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail4.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail5.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail6.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail7.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail8.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail9.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/pass1.json +58 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/pass2.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/pass3.json +6 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/readme.txt +3 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/LICENSE +19 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/README.md +148 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/bin/jsonschema_suite +283 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/remotes/folder/folderInteger.json +3 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/remotes/integer.json +3 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/remotes/subSchemas.json +8 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/additionalItems.json +82 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/additionalProperties.json +88 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/default.json +49 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/dependencies.json +108 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/disallow.json +80 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/divisibleBy.json +60 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/enum.json +71 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/extends.json +94 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/items.json +46 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/maxItems.json +28 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/maxLength.json +33 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/maximum.json +42 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/minItems.json +28 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/minLength.json +33 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/minimum.json +42 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/bignum.json +107 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/format.json +222 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/jsregex.json +18 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/zeroTerminatedFloats.json +15 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/pattern.json +34 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/patternProperties.json +110 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/properties.json +92 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/ref.json +159 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/refRemote.json +74 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/required.json +53 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/type.json +474 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/uniqueItems.json +79 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/additionalItems.json +82 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/additionalProperties.json +88 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/allOf.json +112 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/anyOf.json +68 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/default.json +49 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/definitions.json +32 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/dependencies.json +113 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/enum.json +72 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/items.json +46 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maxItems.json +28 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maxLength.json +33 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maxProperties.json +28 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maximum.json +42 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minItems.json +28 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minLength.json +33 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minProperties.json +28 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minimum.json +42 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/multipleOf.json +60 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/not.json +96 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/oneOf.json +68 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/optional/bignum.json +107 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/optional/format.json +148 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/optional/zeroTerminatedFloats.json +15 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/pattern.json +34 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/patternProperties.json +110 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/properties.json +92 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/ref.json +159 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/refRemote.json +74 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/required.json +39 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/type.json +330 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/uniqueItems.json +79 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tox.ini +8 -0
- data/ext/rj_schema/rapidjson/bin/types/booleans.json +102 -0
- data/ext/rj_schema/rapidjson/bin/types/floats.json +102 -0
- data/ext/rj_schema/rapidjson/bin/types/guids.json +102 -0
- data/ext/rj_schema/rapidjson/bin/types/integers.json +102 -0
- data/ext/rj_schema/rapidjson/bin/types/mixed.json +592 -0
- data/ext/rj_schema/rapidjson/bin/types/nulls.json +102 -0
- data/ext/rj_schema/rapidjson/bin/types/paragraphs.json +102 -0
- data/ext/rj_schema/rapidjson/bin/types/readme.txt +1 -0
- data/ext/rj_schema/rapidjson/contrib/natvis/LICENSE +45 -0
- data/ext/rj_schema/rapidjson/contrib/natvis/README.md +7 -0
- data/ext/rj_schema/rapidjson/contrib/natvis/rapidjson.natvis +38 -0
- data/ext/rj_schema/rapidjson/doc/CMakeLists.txt +27 -0
- data/ext/rj_schema/rapidjson/doc/Doxyfile.in +2369 -0
- data/ext/rj_schema/rapidjson/doc/Doxyfile.zh-cn.in +2369 -0
- data/ext/rj_schema/rapidjson/doc/diagram/architecture.dot +50 -0
- data/ext/rj_schema/rapidjson/doc/diagram/architecture.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/insituparsing.dot +65 -0
- data/ext/rj_schema/rapidjson/doc/diagram/insituparsing.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/iterative-parser-states-diagram.dot +62 -0
- data/ext/rj_schema/rapidjson/doc/diagram/iterative-parser-states-diagram.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/makefile +8 -0
- data/ext/rj_schema/rapidjson/doc/diagram/move1.dot +47 -0
- data/ext/rj_schema/rapidjson/doc/diagram/move1.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/move2.dot +62 -0
- data/ext/rj_schema/rapidjson/doc/diagram/move2.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/move3.dot +60 -0
- data/ext/rj_schema/rapidjson/doc/diagram/move3.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/normalparsing.dot +56 -0
- data/ext/rj_schema/rapidjson/doc/diagram/normalparsing.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/simpledom.dot +54 -0
- data/ext/rj_schema/rapidjson/doc/diagram/simpledom.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/tutorial.dot +58 -0
- data/ext/rj_schema/rapidjson/doc/diagram/tutorial.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/utilityclass.dot +73 -0
- data/ext/rj_schema/rapidjson/doc/diagram/utilityclass.png +0 -0
- data/ext/rj_schema/rapidjson/doc/dom.md +280 -0
- data/ext/rj_schema/rapidjson/doc/dom.zh-cn.md +284 -0
- data/ext/rj_schema/rapidjson/doc/encoding.md +146 -0
- data/ext/rj_schema/rapidjson/doc/encoding.zh-cn.md +152 -0
- data/ext/rj_schema/rapidjson/doc/faq.md +289 -0
- data/ext/rj_schema/rapidjson/doc/faq.zh-cn.md +290 -0
- data/ext/rj_schema/rapidjson/doc/features.md +104 -0
- data/ext/rj_schema/rapidjson/doc/features.zh-cn.md +103 -0
- data/ext/rj_schema/rapidjson/doc/internals.md +368 -0
- data/ext/rj_schema/rapidjson/doc/internals.zh-cn.md +363 -0
- data/ext/rj_schema/rapidjson/doc/logo/rapidjson.png +0 -0
- data/ext/rj_schema/rapidjson/doc/logo/rapidjson.svg +119 -0
- data/ext/rj_schema/rapidjson/doc/misc/DoxygenLayout.xml +194 -0
- data/ext/rj_schema/rapidjson/doc/misc/doxygenextra.css +274 -0
- data/ext/rj_schema/rapidjson/doc/misc/footer.html +11 -0
- data/ext/rj_schema/rapidjson/doc/misc/header.html +24 -0
- data/ext/rj_schema/rapidjson/doc/npm.md +31 -0
- data/ext/rj_schema/rapidjson/doc/performance.md +26 -0
- data/ext/rj_schema/rapidjson/doc/performance.zh-cn.md +26 -0
- data/ext/rj_schema/rapidjson/doc/pointer.md +234 -0
- data/ext/rj_schema/rapidjson/doc/pointer.zh-cn.md +234 -0
- data/ext/rj_schema/rapidjson/doc/sax.md +509 -0
- data/ext/rj_schema/rapidjson/doc/sax.zh-cn.md +487 -0
- data/ext/rj_schema/rapidjson/doc/schema.md +505 -0
- data/ext/rj_schema/rapidjson/doc/schema.zh-cn.md +237 -0
- data/ext/rj_schema/rapidjson/doc/stream.md +426 -0
- data/ext/rj_schema/rapidjson/doc/stream.zh-cn.md +426 -0
- data/ext/rj_schema/rapidjson/doc/tutorial.md +536 -0
- data/ext/rj_schema/rapidjson/doc/tutorial.zh-cn.md +534 -0
- data/ext/rj_schema/rapidjson/docker/debian/Dockerfile +8 -0
- data/ext/rj_schema/rapidjson/example/CMakeLists.txt +45 -0
- data/ext/rj_schema/rapidjson/example/archiver/archiver.cpp +292 -0
- data/ext/rj_schema/rapidjson/example/archiver/archiver.h +145 -0
- data/ext/rj_schema/rapidjson/example/archiver/archivertest.cpp +287 -0
- data/ext/rj_schema/rapidjson/example/capitalize/capitalize.cpp +67 -0
- data/ext/rj_schema/rapidjson/example/condense/condense.cpp +32 -0
- data/ext/rj_schema/rapidjson/example/filterkey/filterkey.cpp +135 -0
- data/ext/rj_schema/rapidjson/example/filterkeydom/filterkeydom.cpp +170 -0
- data/ext/rj_schema/rapidjson/example/jsonx/jsonx.cpp +207 -0
- data/ext/rj_schema/rapidjson/example/lookaheadparser/lookaheadparser.cpp +350 -0
- data/ext/rj_schema/rapidjson/example/messagereader/messagereader.cpp +105 -0
- data/ext/rj_schema/rapidjson/example/parsebyparts/parsebyparts.cpp +176 -0
- data/ext/rj_schema/rapidjson/example/pretty/pretty.cpp +30 -0
- data/ext/rj_schema/rapidjson/example/prettyauto/prettyauto.cpp +56 -0
- data/ext/rj_schema/rapidjson/example/schemavalidator/schemavalidator.cpp +78 -0
- data/ext/rj_schema/rapidjson/example/serialize/serialize.cpp +173 -0
- data/ext/rj_schema/rapidjson/example/simpledom/simpledom.cpp +29 -0
- data/ext/rj_schema/rapidjson/example/simplepullreader/simplepullreader.cpp +53 -0
- data/ext/rj_schema/rapidjson/example/simplereader/simplereader.cpp +42 -0
- data/ext/rj_schema/rapidjson/example/simplewriter/simplewriter.cpp +36 -0
- data/ext/rj_schema/rapidjson/example/tutorial/tutorial.cpp +151 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/allocators.h +271 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/cursorstreamwrapper.h +78 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/document.h +2630 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/encodedstream.h +299 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/encodings.h +716 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/error/en.h +74 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/error/error.h +161 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/filereadstream.h +99 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/filewritestream.h +104 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/fwd.h +151 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/biginteger.h +290 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/diyfp.h +258 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/dtoa.h +245 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/ieee754.h +78 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/itoa.h +304 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/meta.h +181 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/pow10.h +55 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/regex.h +734 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/stack.h +231 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/strfunc.h +69 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/strtod.h +269 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/swap.h +46 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/istreamwrapper.h +115 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/memorybuffer.h +70 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/memorystream.h +71 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/msinttypes/inttypes.h +316 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/msinttypes/stdint.h +300 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/ostreamwrapper.h +81 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/pointer.h +1363 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/prettywriter.h +277 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/rapidjson.h +628 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/reader.h +2222 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/schema.h +2479 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/stream.h +223 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/stringbuffer.h +121 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/writer.h +716 -0
- data/ext/rj_schema/rapidjson/include_dirs.js +2 -0
- data/ext/rj_schema/rapidjson/library.json +15 -0
- data/ext/rj_schema/rapidjson/license.txt +57 -0
- data/ext/rj_schema/rapidjson/package.json +24 -0
- data/ext/rj_schema/rapidjson/rapidjson.autopkg +77 -0
- data/ext/rj_schema/rapidjson/readme.md +160 -0
- data/ext/rj_schema/rapidjson/readme.zh-cn.md +152 -0
- data/ext/rj_schema/rapidjson/test/CMakeLists.txt +20 -0
- data/ext/rj_schema/rapidjson/test/perftest/CMakeLists.txt +28 -0
- data/ext/rj_schema/rapidjson/test/perftest/misctest.cpp +974 -0
- data/ext/rj_schema/rapidjson/test/perftest/perftest.cpp +24 -0
- data/ext/rj_schema/rapidjson/test/perftest/perftest.h +185 -0
- data/ext/rj_schema/rapidjson/test/perftest/platformtest.cpp +166 -0
- data/ext/rj_schema/rapidjson/test/perftest/rapidjsontest.cpp +472 -0
- data/ext/rj_schema/rapidjson/test/perftest/schematest.cpp +216 -0
- data/ext/rj_schema/rapidjson/test/unittest/CMakeLists.txt +92 -0
- data/ext/rj_schema/rapidjson/test/unittest/allocatorstest.cpp +102 -0
- data/ext/rj_schema/rapidjson/test/unittest/bigintegertest.cpp +133 -0
- data/ext/rj_schema/rapidjson/test/unittest/cursorstreamwrappertest.cpp +115 -0
- data/ext/rj_schema/rapidjson/test/unittest/documenttest.cpp +672 -0
- data/ext/rj_schema/rapidjson/test/unittest/dtoatest.cpp +98 -0
- data/ext/rj_schema/rapidjson/test/unittest/encodedstreamtest.cpp +313 -0
- data/ext/rj_schema/rapidjson/test/unittest/encodingstest.cpp +451 -0
- data/ext/rj_schema/rapidjson/test/unittest/filestreamtest.cpp +112 -0
- data/ext/rj_schema/rapidjson/test/unittest/fwdtest.cpp +230 -0
- data/ext/rj_schema/rapidjson/test/unittest/istreamwrappertest.cpp +181 -0
- data/ext/rj_schema/rapidjson/test/unittest/itoatest.cpp +160 -0
- data/ext/rj_schema/rapidjson/test/unittest/jsoncheckertest.cpp +143 -0
- data/ext/rj_schema/rapidjson/test/unittest/namespacetest.cpp +70 -0
- data/ext/rj_schema/rapidjson/test/unittest/ostreamwrappertest.cpp +92 -0
- data/ext/rj_schema/rapidjson/test/unittest/pointertest.cpp +1529 -0
- data/ext/rj_schema/rapidjson/test/unittest/prettywritertest.cpp +344 -0
- data/ext/rj_schema/rapidjson/test/unittest/readertest.cpp +1895 -0
- data/ext/rj_schema/rapidjson/test/unittest/regextest.cpp +638 -0
- data/ext/rj_schema/rapidjson/test/unittest/schematest.cpp +2009 -0
- data/ext/rj_schema/rapidjson/test/unittest/simdtest.cpp +219 -0
- data/ext/rj_schema/rapidjson/test/unittest/strfunctest.cpp +30 -0
- data/ext/rj_schema/rapidjson/test/unittest/stringbuffertest.cpp +192 -0
- data/ext/rj_schema/rapidjson/test/unittest/strtodtest.cpp +132 -0
- data/ext/rj_schema/rapidjson/test/unittest/unittest.cpp +51 -0
- data/ext/rj_schema/rapidjson/test/unittest/unittest.h +140 -0
- data/ext/rj_schema/rapidjson/test/unittest/valuetest.cpp +1829 -0
- data/ext/rj_schema/rapidjson/test/unittest/writertest.cpp +598 -0
- data/ext/rj_schema/rapidjson/test/valgrind.supp +17 -0
- data/ext/rj_schema/rapidjson/travis-doxygen.sh +121 -0
- data/ext/rj_schema/rj_schema.cpp +136 -0
- data/lib/rj_schema.rb +7 -0
- metadata +371 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 3d612401181ec69fefcea932c4b0fc7d2206990b
|
|
4
|
+
data.tar.gz: 4755187c3dbfe20dc920f8b68fade3cbb448e9b7
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 412e080043ac2d89c6115ca1f00c33b9d4ba75884ff825d2ae1119f64a61eb8cf762ef27db36abfaa064dc53cdda08cb6c4fd11d3723b214c8fd327387610f8d
|
|
7
|
+
data.tar.gz: 73fa3c54fa6489cce6293fc16f96a786bfcc140d08652fe99a7683c665e02c12d9e4d63f4041b25cf1707d1e3a75e8275f3997046014175904708e697b5c7f37
|
data/Rakefile
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
require 'rake/extensiontask'
|
|
2
|
+
require 'rake/testtask'
|
|
3
|
+
require 'rubygems/package_task'
|
|
4
|
+
|
|
5
|
+
Rake::ExtensionTask.new 'rj_schema' do |t|
|
|
6
|
+
t.lib_dir = 'lib/rj_schema'
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
Rake::TestTask.new do |t|
|
|
10
|
+
t.libs << 'lib'
|
|
11
|
+
t.test_files = FileList.new('test/*_test.rb')
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
s = Gem::Specification.load("rj_schema.gemspec")
|
|
15
|
+
|
|
16
|
+
Gem::PackageTask.new s do end
|
|
17
|
+
|
|
18
|
+
task default: %w[compile test]
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
require 'mkmf'
|
|
2
|
+
$INCFLAGS << " -I$(srcdir)/rapidjson/include"
|
|
3
|
+
$CXXFLAGS << " -std=c++11 "
|
|
4
|
+
CONFIG['CXX'] = ENV['CXX'] unless ENV['CXX'].nil?
|
|
5
|
+
CONFIG['CC'] = ENV['CC'] unless ENV['CC'].nil?
|
|
6
|
+
puts "compiler ENV: CC #{ENV['CC']}, CXX #{ENV['CXX']}"
|
|
7
|
+
create_makefile 'rj_schema/rj_schema'
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
All notable changes to this project will be documented in this file.
|
|
3
|
+
This project adheres to [Semantic Versioning](http://semver.org/).
|
|
4
|
+
|
|
5
|
+
## [Unreleased]
|
|
6
|
+
|
|
7
|
+
## 1.1.0 - 2016-08-25
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
* Add GenericDocument ctor overload to specify JSON type (#369)
|
|
11
|
+
* Add FAQ (#372, #373, #374, #376)
|
|
12
|
+
* Add forward declaration header `fwd.h`
|
|
13
|
+
* Add @PlatformIO Library Registry manifest file (#400)
|
|
14
|
+
* Implement assignment operator for BigInteger (#404)
|
|
15
|
+
* Add comments support (#443)
|
|
16
|
+
* Adding coapp definition (#460)
|
|
17
|
+
* documenttest.cpp: EXPECT_THROW when checking empty allocator (470)
|
|
18
|
+
* GenericDocument: add implicit conversion to ParseResult (#480)
|
|
19
|
+
* Use <wchar.h> with C++ linkage on Windows ARM (#485)
|
|
20
|
+
* Detect little endian for Microsoft ARM targets
|
|
21
|
+
* Check Nan/Inf when writing a double (#510)
|
|
22
|
+
* Add JSON Schema Implementation (#522)
|
|
23
|
+
* Add iostream wrapper (#530)
|
|
24
|
+
* Add Jsonx example for converting JSON into JSONx (a XML format) (#531)
|
|
25
|
+
* Add optional unresolvedTokenIndex parameter to Pointer::Get() (#532)
|
|
26
|
+
* Add encoding validation option for Writer/PrettyWriter (#534)
|
|
27
|
+
* Add Writer::SetMaxDecimalPlaces() (#536)
|
|
28
|
+
* Support {0, } and {0, m} in Regex (#539)
|
|
29
|
+
* Add Value::Get/SetFloat(), Value::IsLossLessFloat/Double() (#540)
|
|
30
|
+
* Add stream position check to reader unit tests (#541)
|
|
31
|
+
* Add Templated accessors and range-based for (#542)
|
|
32
|
+
* Add (Pretty)Writer::RawValue() (#543)
|
|
33
|
+
* Add Document::Parse(std::string), Document::Parse(const char*, size_t length) and related APIs. (#553)
|
|
34
|
+
* Add move constructor for GenericSchemaDocument (#554)
|
|
35
|
+
* Add VS2010 and VS2015 to AppVeyor CI (#555)
|
|
36
|
+
* Add parse-by-parts example (#556, #562)
|
|
37
|
+
* Support parse number as string (#564, #589)
|
|
38
|
+
* Add kFormatSingleLineArray for PrettyWriter (#577)
|
|
39
|
+
* Added optional support for trailing commas (#584)
|
|
40
|
+
* Added filterkey and filterkeydom examples (#615)
|
|
41
|
+
* Added npm docs (#639)
|
|
42
|
+
* Allow options for writing and parsing NaN/Infinity (#641)
|
|
43
|
+
* Add std::string overload to PrettyWriter::Key() when RAPIDJSON_HAS_STDSTRING is defined (#698)
|
|
44
|
+
|
|
45
|
+
### Fixed
|
|
46
|
+
* Fix gcc/clang/vc warnings (#350, #394, #397, #444, #447, #473, #515, #582, #589, #595, #667)
|
|
47
|
+
* Fix documentation (#482, #511, #550, #557, #614, #635, #660)
|
|
48
|
+
* Fix emscripten alignment issue (#535)
|
|
49
|
+
* Fix missing allocator to uses of AddMember in document (#365)
|
|
50
|
+
* CMake will no longer complain that the minimum CMake version is not specified (#501)
|
|
51
|
+
* Make it usable with old VC8 (VS2005) (#383)
|
|
52
|
+
* Prohibit C++11 move from Document to Value (#391)
|
|
53
|
+
* Try to fix incorrect 64-bit alignment (#419)
|
|
54
|
+
* Check return of fwrite to avoid warn_unused_result build failures (#421)
|
|
55
|
+
* Fix UB in GenericDocument::ParseStream (#426)
|
|
56
|
+
* Keep Document value unchanged on parse error (#439)
|
|
57
|
+
* Add missing return statement (#450)
|
|
58
|
+
* Fix Document::Parse(const Ch*) for transcoding (#478)
|
|
59
|
+
* encodings.h: fix typo in preprocessor condition (#495)
|
|
60
|
+
* Custom Microsoft headers are necessary only for Visual Studio 2012 and lower (#559)
|
|
61
|
+
* Fix memory leak for invalid regex (26e69ffde95ba4773ab06db6457b78f308716f4b)
|
|
62
|
+
* Fix a bug in schema minimum/maximum keywords for 64-bit integer (e7149d665941068ccf8c565e77495521331cf390)
|
|
63
|
+
* Fix a crash bug in regex (#605)
|
|
64
|
+
* Fix schema "required" keyword cannot handle duplicated keys (#609)
|
|
65
|
+
* Fix cmake CMP0054 warning (#612)
|
|
66
|
+
* Added missing include guards in istreamwrapper.h and ostreamwrapper.h (#634)
|
|
67
|
+
* Fix undefined behaviour (#646)
|
|
68
|
+
* Fix buffer overrun using PutN (#673)
|
|
69
|
+
* Fix rapidjson::value::Get<std::string>() may returns wrong data (#681)
|
|
70
|
+
* Add Flush() for all value types (#689)
|
|
71
|
+
* Handle malloc() fail in PoolAllocator (#691)
|
|
72
|
+
* Fix builds on x32 platform. #703
|
|
73
|
+
|
|
74
|
+
### Changed
|
|
75
|
+
* Clarify problematic JSON license (#392)
|
|
76
|
+
* Move Travis to container based infrastructure (#504, #558)
|
|
77
|
+
* Make whitespace array more compact (#513)
|
|
78
|
+
* Optimize Writer::WriteString() with SIMD (#544)
|
|
79
|
+
* x86-64 48-bit pointer optimization for GenericValue (#546)
|
|
80
|
+
* Define RAPIDJSON_HAS_CXX11_RVALUE_REFS directly in clang (#617)
|
|
81
|
+
* Make GenericSchemaDocument constructor explicit (#674)
|
|
82
|
+
* Optimize FindMember when use std::string (#690)
|
|
83
|
+
|
|
84
|
+
## [1.0.2] - 2015-05-14
|
|
85
|
+
|
|
86
|
+
### Added
|
|
87
|
+
* Add Value::XXXMember(...) overloads for std::string (#335)
|
|
88
|
+
|
|
89
|
+
### Fixed
|
|
90
|
+
* Include rapidjson.h for all internal/error headers.
|
|
91
|
+
* Parsing some numbers incorrectly in full-precision mode (`kFullPrecisionParseFlag`) (#342)
|
|
92
|
+
* Fix some numbers parsed incorrectly (#336)
|
|
93
|
+
* Fix alignment of 64bit platforms (#328)
|
|
94
|
+
* Fix MemoryPoolAllocator::Clear() to clear user-buffer (0691502573f1afd3341073dd24b12c3db20fbde4)
|
|
95
|
+
|
|
96
|
+
### Changed
|
|
97
|
+
* CMakeLists for include as a thirdparty in projects (#334, #337)
|
|
98
|
+
* Change Document::ParseStream() to use stack allocator for Reader (ffbe38614732af8e0b3abdc8b50071f386a4a685)
|
|
99
|
+
|
|
100
|
+
## [1.0.1] - 2015-04-25
|
|
101
|
+
|
|
102
|
+
### Added
|
|
103
|
+
* Changelog following [Keep a CHANGELOG](https://github.com/olivierlacan/keep-a-changelog) suggestions.
|
|
104
|
+
|
|
105
|
+
### Fixed
|
|
106
|
+
* Parsing of some numbers (e.g. "1e-00011111111111") causing assertion (#314).
|
|
107
|
+
* Visual C++ 32-bit compilation error in `diyfp.h` (#317).
|
|
108
|
+
|
|
109
|
+
## [1.0.0] - 2015-04-22
|
|
110
|
+
|
|
111
|
+
### Added
|
|
112
|
+
* 100% [Coverall](https://coveralls.io/r/Tencent/rapidjson?branch=master) coverage.
|
|
113
|
+
* Version macros (#311)
|
|
114
|
+
|
|
115
|
+
### Fixed
|
|
116
|
+
* A bug in trimming long number sequence (4824f12efbf01af72b8cb6fc96fae7b097b73015).
|
|
117
|
+
* Double quote in unicode escape (#288).
|
|
118
|
+
* Negative zero roundtrip (double only) (#289).
|
|
119
|
+
* Standardize behavior of `memcpy()` and `malloc()` (0c5c1538dcfc7f160e5a4aa208ddf092c787be5a, #305, 0e8bbe5e3ef375e7f052f556878be0bd79e9062d).
|
|
120
|
+
|
|
121
|
+
### Removed
|
|
122
|
+
* Remove an invalid `Document::ParseInsitu()` API (e7f1c6dd08b522cfcf9aed58a333bd9a0c0ccbeb).
|
|
123
|
+
|
|
124
|
+
## 1.0-beta - 2015-04-8
|
|
125
|
+
|
|
126
|
+
### Added
|
|
127
|
+
* RFC 7159 (#101)
|
|
128
|
+
* Optional Iterative Parser (#76)
|
|
129
|
+
* Deep-copy values (#20)
|
|
130
|
+
* Error code and message (#27)
|
|
131
|
+
* ASCII Encoding (#70)
|
|
132
|
+
* `kParseStopWhenDoneFlag` (#83)
|
|
133
|
+
* `kParseFullPrecisionFlag` (881c91d696f06b7f302af6d04ec14dd08db66ceb)
|
|
134
|
+
* Add `Key()` to handler concept (#134)
|
|
135
|
+
* C++11 compatibility and support (#128)
|
|
136
|
+
* Optimized number-to-string and vice versa conversions (#137, #80)
|
|
137
|
+
* Short-String Optimization (#131)
|
|
138
|
+
* Local stream optimization by traits (#32)
|
|
139
|
+
* Travis & Appveyor Continuous Integration, with Valgrind verification (#24, #242)
|
|
140
|
+
* Redo all documentation (English, Simplified Chinese)
|
|
141
|
+
|
|
142
|
+
### Changed
|
|
143
|
+
* Copyright ownership transferred to THL A29 Limited (a Tencent company).
|
|
144
|
+
* Migrating from Premake to CMAKE (#192)
|
|
145
|
+
* Resolve all warning reports
|
|
146
|
+
|
|
147
|
+
### Removed
|
|
148
|
+
* Remove other JSON libraries for performance comparison (#180)
|
|
149
|
+
|
|
150
|
+
## 0.11 - 2012-11-16
|
|
151
|
+
|
|
152
|
+
## 0.1 - 2011-11-18
|
|
153
|
+
|
|
154
|
+
[Unreleased]: https://github.com/Tencent/rapidjson/compare/v1.1.0...HEAD
|
|
155
|
+
[1.1.0]: https://github.com/Tencent/rapidjson/compare/v1.0.2...v1.1.0
|
|
156
|
+
[1.0.2]: https://github.com/Tencent/rapidjson/compare/v1.0.1...v1.0.2
|
|
157
|
+
[1.0.1]: https://github.com/Tencent/rapidjson/compare/v1.0.0...v1.0.1
|
|
158
|
+
[1.0.0]: https://github.com/Tencent/rapidjson/compare/v1.0-beta...v1.0.0
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
|
|
2
|
+
if(POLICY CMP0025)
|
|
3
|
+
# detect Apple's Clang
|
|
4
|
+
cmake_policy(SET CMP0025 NEW)
|
|
5
|
+
endif()
|
|
6
|
+
if(POLICY CMP0054)
|
|
7
|
+
cmake_policy(SET CMP0054 NEW)
|
|
8
|
+
endif()
|
|
9
|
+
|
|
10
|
+
SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules)
|
|
11
|
+
|
|
12
|
+
PROJECT(RapidJSON CXX)
|
|
13
|
+
|
|
14
|
+
set(LIB_MAJOR_VERSION "1")
|
|
15
|
+
set(LIB_MINOR_VERSION "1")
|
|
16
|
+
set(LIB_PATCH_VERSION "0")
|
|
17
|
+
set(LIB_VERSION_STRING "${LIB_MAJOR_VERSION}.${LIB_MINOR_VERSION}.${LIB_PATCH_VERSION}")
|
|
18
|
+
|
|
19
|
+
# compile in release with debug info mode by default
|
|
20
|
+
if(NOT CMAKE_BUILD_TYPE)
|
|
21
|
+
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
|
|
22
|
+
endif()
|
|
23
|
+
|
|
24
|
+
# Build all binaries in a separate directory
|
|
25
|
+
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
|
26
|
+
|
|
27
|
+
option(RAPIDJSON_BUILD_DOC "Build rapidjson documentation." ON)
|
|
28
|
+
option(RAPIDJSON_BUILD_EXAMPLES "Build rapidjson examples." ON)
|
|
29
|
+
option(RAPIDJSON_BUILD_TESTS "Build rapidjson perftests and unittests." ON)
|
|
30
|
+
option(RAPIDJSON_BUILD_THIRDPARTY_GTEST
|
|
31
|
+
"Use gtest installation in `thirdparty/gtest` by default if available" OFF)
|
|
32
|
+
|
|
33
|
+
option(RAPIDJSON_BUILD_CXX11 "Build rapidjson with C++11 (gcc/clang)" ON)
|
|
34
|
+
if(RAPIDJSON_BUILD_CXX11)
|
|
35
|
+
set(CMAKE_CXX_STANDARD 11)
|
|
36
|
+
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
|
|
37
|
+
endif()
|
|
38
|
+
|
|
39
|
+
option(RAPIDJSON_BUILD_ASAN "Build rapidjson with address sanitizer (gcc/clang)" OFF)
|
|
40
|
+
option(RAPIDJSON_BUILD_UBSAN "Build rapidjson with undefined behavior sanitizer (gcc/clang)" OFF)
|
|
41
|
+
|
|
42
|
+
option(RAPIDJSON_ENABLE_INSTRUMENTATION_OPT "Build rapidjson with -march or -mcpu options" ON)
|
|
43
|
+
|
|
44
|
+
option(RAPIDJSON_HAS_STDSTRING "" OFF)
|
|
45
|
+
if(RAPIDJSON_HAS_STDSTRING)
|
|
46
|
+
add_definitions(-DRAPIDJSON_HAS_STDSTRING)
|
|
47
|
+
endif()
|
|
48
|
+
|
|
49
|
+
find_program(CCACHE_FOUND ccache)
|
|
50
|
+
if(CCACHE_FOUND)
|
|
51
|
+
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
|
|
52
|
+
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
|
|
53
|
+
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|
54
|
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments -fcolor-diagnostics")
|
|
55
|
+
endif()
|
|
56
|
+
endif(CCACHE_FOUND)
|
|
57
|
+
|
|
58
|
+
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|
59
|
+
if(RAPIDJSON_ENABLE_INSTRUMENTATION_OPT AND NOT CMAKE_CROSSCOMPILING)
|
|
60
|
+
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "powerpc" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64le")
|
|
61
|
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcpu=native")
|
|
62
|
+
else()
|
|
63
|
+
#FIXME: x86 is -march=native, but doesn't mean every arch is this option. To keep original project's compatibility, I leave this except POWER.
|
|
64
|
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
|
|
65
|
+
endif()
|
|
66
|
+
endif()
|
|
67
|
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror")
|
|
68
|
+
set(EXTRA_CXX_FLAGS -Weffc++ -Wswitch-default -Wfloat-equal -Wconversion -Wsign-conversion)
|
|
69
|
+
if (RAPIDJSON_BUILD_CXX11 AND CMAKE_VERSION VERSION_LESS 3.1)
|
|
70
|
+
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7.0")
|
|
71
|
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
|
72
|
+
else()
|
|
73
|
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
|
74
|
+
endif()
|
|
75
|
+
endif()
|
|
76
|
+
if (RAPIDJSON_BUILD_ASAN)
|
|
77
|
+
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.8.0")
|
|
78
|
+
message(FATAL_ERROR "GCC < 4.8 doesn't support the address sanitizer")
|
|
79
|
+
else()
|
|
80
|
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
|
|
81
|
+
endif()
|
|
82
|
+
endif()
|
|
83
|
+
if (RAPIDJSON_BUILD_UBSAN)
|
|
84
|
+
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9.0")
|
|
85
|
+
message(FATAL_ERROR "GCC < 4.9 doesn't support the undefined behavior sanitizer")
|
|
86
|
+
else()
|
|
87
|
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined")
|
|
88
|
+
endif()
|
|
89
|
+
endif()
|
|
90
|
+
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|
91
|
+
if(NOT CMAKE_CROSSCOMPILING)
|
|
92
|
+
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "powerpc" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64le")
|
|
93
|
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcpu=native")
|
|
94
|
+
else()
|
|
95
|
+
#FIXME: x86 is -march=native, but doesn't mean every arch is this option. To keep original project's compatibility, I leave this except POWER.
|
|
96
|
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
|
|
97
|
+
endif()
|
|
98
|
+
endif()
|
|
99
|
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror -Wno-missing-field-initializers")
|
|
100
|
+
set(EXTRA_CXX_FLAGS -Weffc++ -Wswitch-default -Wfloat-equal -Wconversion -Wimplicit-fallthrough)
|
|
101
|
+
if (RAPIDJSON_BUILD_CXX11 AND CMAKE_VERSION VERSION_LESS 3.1)
|
|
102
|
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
|
103
|
+
endif()
|
|
104
|
+
if (RAPIDJSON_BUILD_ASAN)
|
|
105
|
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
|
|
106
|
+
endif()
|
|
107
|
+
if (RAPIDJSON_BUILD_UBSAN)
|
|
108
|
+
if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
|
109
|
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined-trap -fsanitize-undefined-trap-on-error")
|
|
110
|
+
else()
|
|
111
|
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined")
|
|
112
|
+
endif()
|
|
113
|
+
endif()
|
|
114
|
+
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
|
115
|
+
add_definitions(-D_CRT_SECURE_NO_WARNINGS=1)
|
|
116
|
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
|
|
117
|
+
elseif (CMAKE_CXX_COMPILER_ID MATCHES "XL")
|
|
118
|
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -qarch=auto")
|
|
119
|
+
endif()
|
|
120
|
+
|
|
121
|
+
#add extra search paths for libraries and includes
|
|
122
|
+
SET(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "The directory the headers are installed in")
|
|
123
|
+
SET(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE STRING "Directory where lib will install")
|
|
124
|
+
SET(DOC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}" CACHE PATH "Path to the documentation")
|
|
125
|
+
|
|
126
|
+
IF(UNIX OR CYGWIN)
|
|
127
|
+
SET(_CMAKE_INSTALL_DIR "${LIB_INSTALL_DIR}/cmake/${PROJECT_NAME}")
|
|
128
|
+
ELSEIF(WIN32)
|
|
129
|
+
SET(_CMAKE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/cmake")
|
|
130
|
+
ENDIF()
|
|
131
|
+
SET(CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" CACHE PATH "The directory cmake fiels are installed in")
|
|
132
|
+
|
|
133
|
+
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
|
|
134
|
+
|
|
135
|
+
if(RAPIDJSON_BUILD_DOC)
|
|
136
|
+
add_subdirectory(doc)
|
|
137
|
+
endif()
|
|
138
|
+
|
|
139
|
+
add_custom_target(travis_doc)
|
|
140
|
+
add_custom_command(TARGET travis_doc
|
|
141
|
+
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/travis-doxygen.sh)
|
|
142
|
+
|
|
143
|
+
if(RAPIDJSON_BUILD_EXAMPLES)
|
|
144
|
+
add_subdirectory(example)
|
|
145
|
+
endif()
|
|
146
|
+
|
|
147
|
+
if(RAPIDJSON_BUILD_TESTS)
|
|
148
|
+
if(MSVC11)
|
|
149
|
+
# required for VS2012 due to missing support for variadic templates
|
|
150
|
+
add_definitions(-D_VARIADIC_MAX=10)
|
|
151
|
+
endif(MSVC11)
|
|
152
|
+
add_subdirectory(test)
|
|
153
|
+
include(CTest)
|
|
154
|
+
endif()
|
|
155
|
+
|
|
156
|
+
# pkg-config
|
|
157
|
+
IF (UNIX OR CYGWIN)
|
|
158
|
+
CONFIGURE_FILE (${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.pc.in
|
|
159
|
+
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc
|
|
160
|
+
@ONLY)
|
|
161
|
+
INSTALL (FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc
|
|
162
|
+
DESTINATION "${LIB_INSTALL_DIR}/pkgconfig"
|
|
163
|
+
COMPONENT pkgconfig)
|
|
164
|
+
ENDIF()
|
|
165
|
+
|
|
166
|
+
install(FILES readme.md
|
|
167
|
+
DESTINATION "${DOC_INSTALL_DIR}"
|
|
168
|
+
COMPONENT doc)
|
|
169
|
+
|
|
170
|
+
install(DIRECTORY include/rapidjson
|
|
171
|
+
DESTINATION "${INCLUDE_INSTALL_DIR}"
|
|
172
|
+
COMPONENT dev)
|
|
173
|
+
|
|
174
|
+
install(DIRECTORY example/
|
|
175
|
+
DESTINATION "${DOC_INSTALL_DIR}/examples"
|
|
176
|
+
COMPONENT examples
|
|
177
|
+
# Following patterns are for excluding the intermediate/object files
|
|
178
|
+
# from an install of in-source CMake build.
|
|
179
|
+
PATTERN "CMakeFiles" EXCLUDE
|
|
180
|
+
PATTERN "Makefile" EXCLUDE
|
|
181
|
+
PATTERN "cmake_install.cmake" EXCLUDE)
|
|
182
|
+
|
|
183
|
+
# Provide config and version files to be used by other applications
|
|
184
|
+
# ===============================
|
|
185
|
+
|
|
186
|
+
################################################################################
|
|
187
|
+
# Export package for use from the build tree
|
|
188
|
+
EXPORT( PACKAGE ${PROJECT_NAME} )
|
|
189
|
+
|
|
190
|
+
# Create the RapidJSONConfig.cmake file for other cmake projects.
|
|
191
|
+
# ... for the build tree
|
|
192
|
+
SET( CONFIG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
|
193
|
+
SET( CONFIG_DIR ${CMAKE_CURRENT_BINARY_DIR})
|
|
194
|
+
SET( ${PROJECT_NAME}_INCLUDE_DIR "\${${PROJECT_NAME}_SOURCE_DIR}/include" )
|
|
195
|
+
|
|
196
|
+
CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}Config.cmake.in
|
|
197
|
+
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake @ONLY )
|
|
198
|
+
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}ConfigVersion.cmake.in
|
|
199
|
+
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake @ONLY)
|
|
200
|
+
|
|
201
|
+
# ... for the install tree
|
|
202
|
+
SET( CMAKECONFIG_INSTALL_DIR lib/cmake/${PROJECT_NAME} )
|
|
203
|
+
FILE( RELATIVE_PATH REL_INCLUDE_DIR
|
|
204
|
+
"${CMAKE_INSTALL_PREFIX}/${CMAKECONFIG_INSTALL_DIR}"
|
|
205
|
+
"${CMAKE_INSTALL_PREFIX}/include" )
|
|
206
|
+
|
|
207
|
+
SET( ${PROJECT_NAME}_INCLUDE_DIR "\${${PROJECT_NAME}_CMAKE_DIR}/${REL_INCLUDE_DIR}" )
|
|
208
|
+
SET( CONFIG_SOURCE_DIR )
|
|
209
|
+
SET( CONFIG_DIR )
|
|
210
|
+
CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}Config.cmake.in
|
|
211
|
+
${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PROJECT_NAME}Config.cmake @ONLY )
|
|
212
|
+
|
|
213
|
+
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PROJECT_NAME}Config.cmake"
|
|
214
|
+
DESTINATION ${CMAKECONFIG_INSTALL_DIR} )
|
|
215
|
+
|
|
216
|
+
# Install files
|
|
217
|
+
INSTALL(FILES
|
|
218
|
+
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
|
|
219
|
+
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
|
|
220
|
+
DESTINATION "${CMAKE_INSTALL_DIR}"
|
|
221
|
+
COMPONENT dev)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
|
|
2
|
+
SET(GTEST_SEARCH_PATH
|
|
3
|
+
"${GTEST_SOURCE_DIR}"
|
|
4
|
+
"${CMAKE_CURRENT_LIST_DIR}/../thirdparty/gtest/googletest")
|
|
5
|
+
|
|
6
|
+
IF(UNIX)
|
|
7
|
+
IF(RAPIDJSON_BUILD_THIRDPARTY_GTEST)
|
|
8
|
+
LIST(APPEND GTEST_SEARCH_PATH "/usr/src/gtest")
|
|
9
|
+
ELSE()
|
|
10
|
+
LIST(INSERT GTEST_SEARCH_PATH 1 "/usr/src/gtest")
|
|
11
|
+
ENDIF()
|
|
12
|
+
ENDIF()
|
|
13
|
+
|
|
14
|
+
FIND_PATH(GTEST_SOURCE_DIR
|
|
15
|
+
NAMES CMakeLists.txt src/gtest_main.cc
|
|
16
|
+
PATHS ${GTEST_SEARCH_PATH})
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
# Debian installs gtest include directory in /usr/include, thus need to look
|
|
20
|
+
# for include directory separately from source directory.
|
|
21
|
+
FIND_PATH(GTEST_INCLUDE_DIR
|
|
22
|
+
NAMES gtest/gtest.h
|
|
23
|
+
PATH_SUFFIXES include
|
|
24
|
+
HINTS ${GTEST_SOURCE_DIR}
|
|
25
|
+
PATHS ${GTEST_SEARCH_PATH})
|
|
26
|
+
|
|
27
|
+
INCLUDE(FindPackageHandleStandardArgs)
|
|
28
|
+
find_package_handle_standard_args(GTestSrc DEFAULT_MSG
|
|
29
|
+
GTEST_SOURCE_DIR
|
|
30
|
+
GTEST_INCLUDE_DIR)
|