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.
Files changed (299) hide show
  1. checksums.yaml +7 -0
  2. data/Rakefile +18 -0
  3. data/ext/rj_schema/extconf.rb +7 -0
  4. data/ext/rj_schema/rapidjson/CHANGELOG.md +158 -0
  5. data/ext/rj_schema/rapidjson/CMakeLists.txt +221 -0
  6. data/ext/rj_schema/rapidjson/CMakeModules/FindGTestSrc.cmake +30 -0
  7. data/ext/rj_schema/rapidjson/RapidJSON.pc.in +7 -0
  8. data/ext/rj_schema/rapidjson/RapidJSONConfig.cmake.in +15 -0
  9. data/ext/rj_schema/rapidjson/RapidJSONConfigVersion.cmake.in +10 -0
  10. data/ext/rj_schema/rapidjson/appveyor.yml +41 -0
  11. data/ext/rj_schema/rapidjson/bin/data/glossary.json +22 -0
  12. data/ext/rj_schema/rapidjson/bin/data/menu.json +27 -0
  13. data/ext/rj_schema/rapidjson/bin/data/readme.txt +1 -0
  14. data/ext/rj_schema/rapidjson/bin/data/sample.json +3315 -0
  15. data/ext/rj_schema/rapidjson/bin/data/webapp.json +88 -0
  16. data/ext/rj_schema/rapidjson/bin/data/widget.json +26 -0
  17. data/ext/rj_schema/rapidjson/bin/draft-04/schema +150 -0
  18. data/ext/rj_schema/rapidjson/bin/encodings/utf16be.json +0 -0
  19. data/ext/rj_schema/rapidjson/bin/encodings/utf16bebom.json +0 -0
  20. data/ext/rj_schema/rapidjson/bin/encodings/utf16le.json +0 -0
  21. data/ext/rj_schema/rapidjson/bin/encodings/utf16lebom.json +0 -0
  22. data/ext/rj_schema/rapidjson/bin/encodings/utf32be.json +0 -0
  23. data/ext/rj_schema/rapidjson/bin/encodings/utf32bebom.json +0 -0
  24. data/ext/rj_schema/rapidjson/bin/encodings/utf32le.json +0 -0
  25. data/ext/rj_schema/rapidjson/bin/encodings/utf32lebom.json +0 -0
  26. data/ext/rj_schema/rapidjson/bin/encodings/utf8.json +7 -0
  27. data/ext/rj_schema/rapidjson/bin/encodings/utf8bom.json +7 -0
  28. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail1.json +1 -0
  29. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail10.json +1 -0
  30. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail11.json +1 -0
  31. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail12.json +1 -0
  32. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail13.json +1 -0
  33. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail14.json +1 -0
  34. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail15.json +1 -0
  35. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail16.json +1 -0
  36. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail17.json +1 -0
  37. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail18.json +1 -0
  38. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail19.json +1 -0
  39. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail2.json +1 -0
  40. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail20.json +1 -0
  41. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail21.json +1 -0
  42. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail22.json +1 -0
  43. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail23.json +1 -0
  44. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail24.json +1 -0
  45. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail25.json +1 -0
  46. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail26.json +1 -0
  47. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail27.json +2 -0
  48. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail28.json +2 -0
  49. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail29.json +1 -0
  50. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail3.json +1 -0
  51. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail30.json +1 -0
  52. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail31.json +1 -0
  53. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail32.json +1 -0
  54. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail33.json +1 -0
  55. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail4.json +1 -0
  56. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail5.json +1 -0
  57. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail6.json +1 -0
  58. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail7.json +1 -0
  59. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail8.json +1 -0
  60. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail9.json +1 -0
  61. data/ext/rj_schema/rapidjson/bin/jsonchecker/pass1.json +58 -0
  62. data/ext/rj_schema/rapidjson/bin/jsonchecker/pass2.json +1 -0
  63. data/ext/rj_schema/rapidjson/bin/jsonchecker/pass3.json +6 -0
  64. data/ext/rj_schema/rapidjson/bin/jsonchecker/readme.txt +3 -0
  65. data/ext/rj_schema/rapidjson/bin/jsonschema/LICENSE +19 -0
  66. data/ext/rj_schema/rapidjson/bin/jsonschema/README.md +148 -0
  67. data/ext/rj_schema/rapidjson/bin/jsonschema/bin/jsonschema_suite +283 -0
  68. data/ext/rj_schema/rapidjson/bin/jsonschema/remotes/folder/folderInteger.json +3 -0
  69. data/ext/rj_schema/rapidjson/bin/jsonschema/remotes/integer.json +3 -0
  70. data/ext/rj_schema/rapidjson/bin/jsonschema/remotes/subSchemas.json +8 -0
  71. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/additionalItems.json +82 -0
  72. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/additionalProperties.json +88 -0
  73. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/default.json +49 -0
  74. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/dependencies.json +108 -0
  75. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/disallow.json +80 -0
  76. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/divisibleBy.json +60 -0
  77. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/enum.json +71 -0
  78. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/extends.json +94 -0
  79. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/items.json +46 -0
  80. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/maxItems.json +28 -0
  81. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/maxLength.json +33 -0
  82. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/maximum.json +42 -0
  83. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/minItems.json +28 -0
  84. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/minLength.json +33 -0
  85. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/minimum.json +42 -0
  86. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/bignum.json +107 -0
  87. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/format.json +222 -0
  88. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/jsregex.json +18 -0
  89. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/zeroTerminatedFloats.json +15 -0
  90. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/pattern.json +34 -0
  91. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/patternProperties.json +110 -0
  92. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/properties.json +92 -0
  93. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/ref.json +159 -0
  94. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/refRemote.json +74 -0
  95. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/required.json +53 -0
  96. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/type.json +474 -0
  97. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/uniqueItems.json +79 -0
  98. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/additionalItems.json +82 -0
  99. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/additionalProperties.json +88 -0
  100. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/allOf.json +112 -0
  101. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/anyOf.json +68 -0
  102. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/default.json +49 -0
  103. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/definitions.json +32 -0
  104. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/dependencies.json +113 -0
  105. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/enum.json +72 -0
  106. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/items.json +46 -0
  107. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maxItems.json +28 -0
  108. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maxLength.json +33 -0
  109. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maxProperties.json +28 -0
  110. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maximum.json +42 -0
  111. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minItems.json +28 -0
  112. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minLength.json +33 -0
  113. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minProperties.json +28 -0
  114. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minimum.json +42 -0
  115. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/multipleOf.json +60 -0
  116. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/not.json +96 -0
  117. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/oneOf.json +68 -0
  118. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/optional/bignum.json +107 -0
  119. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/optional/format.json +148 -0
  120. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/optional/zeroTerminatedFloats.json +15 -0
  121. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/pattern.json +34 -0
  122. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/patternProperties.json +110 -0
  123. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/properties.json +92 -0
  124. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/ref.json +159 -0
  125. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/refRemote.json +74 -0
  126. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/required.json +39 -0
  127. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/type.json +330 -0
  128. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/uniqueItems.json +79 -0
  129. data/ext/rj_schema/rapidjson/bin/jsonschema/tox.ini +8 -0
  130. data/ext/rj_schema/rapidjson/bin/types/booleans.json +102 -0
  131. data/ext/rj_schema/rapidjson/bin/types/floats.json +102 -0
  132. data/ext/rj_schema/rapidjson/bin/types/guids.json +102 -0
  133. data/ext/rj_schema/rapidjson/bin/types/integers.json +102 -0
  134. data/ext/rj_schema/rapidjson/bin/types/mixed.json +592 -0
  135. data/ext/rj_schema/rapidjson/bin/types/nulls.json +102 -0
  136. data/ext/rj_schema/rapidjson/bin/types/paragraphs.json +102 -0
  137. data/ext/rj_schema/rapidjson/bin/types/readme.txt +1 -0
  138. data/ext/rj_schema/rapidjson/contrib/natvis/LICENSE +45 -0
  139. data/ext/rj_schema/rapidjson/contrib/natvis/README.md +7 -0
  140. data/ext/rj_schema/rapidjson/contrib/natvis/rapidjson.natvis +38 -0
  141. data/ext/rj_schema/rapidjson/doc/CMakeLists.txt +27 -0
  142. data/ext/rj_schema/rapidjson/doc/Doxyfile.in +2369 -0
  143. data/ext/rj_schema/rapidjson/doc/Doxyfile.zh-cn.in +2369 -0
  144. data/ext/rj_schema/rapidjson/doc/diagram/architecture.dot +50 -0
  145. data/ext/rj_schema/rapidjson/doc/diagram/architecture.png +0 -0
  146. data/ext/rj_schema/rapidjson/doc/diagram/insituparsing.dot +65 -0
  147. data/ext/rj_schema/rapidjson/doc/diagram/insituparsing.png +0 -0
  148. data/ext/rj_schema/rapidjson/doc/diagram/iterative-parser-states-diagram.dot +62 -0
  149. data/ext/rj_schema/rapidjson/doc/diagram/iterative-parser-states-diagram.png +0 -0
  150. data/ext/rj_schema/rapidjson/doc/diagram/makefile +8 -0
  151. data/ext/rj_schema/rapidjson/doc/diagram/move1.dot +47 -0
  152. data/ext/rj_schema/rapidjson/doc/diagram/move1.png +0 -0
  153. data/ext/rj_schema/rapidjson/doc/diagram/move2.dot +62 -0
  154. data/ext/rj_schema/rapidjson/doc/diagram/move2.png +0 -0
  155. data/ext/rj_schema/rapidjson/doc/diagram/move3.dot +60 -0
  156. data/ext/rj_schema/rapidjson/doc/diagram/move3.png +0 -0
  157. data/ext/rj_schema/rapidjson/doc/diagram/normalparsing.dot +56 -0
  158. data/ext/rj_schema/rapidjson/doc/diagram/normalparsing.png +0 -0
  159. data/ext/rj_schema/rapidjson/doc/diagram/simpledom.dot +54 -0
  160. data/ext/rj_schema/rapidjson/doc/diagram/simpledom.png +0 -0
  161. data/ext/rj_schema/rapidjson/doc/diagram/tutorial.dot +58 -0
  162. data/ext/rj_schema/rapidjson/doc/diagram/tutorial.png +0 -0
  163. data/ext/rj_schema/rapidjson/doc/diagram/utilityclass.dot +73 -0
  164. data/ext/rj_schema/rapidjson/doc/diagram/utilityclass.png +0 -0
  165. data/ext/rj_schema/rapidjson/doc/dom.md +280 -0
  166. data/ext/rj_schema/rapidjson/doc/dom.zh-cn.md +284 -0
  167. data/ext/rj_schema/rapidjson/doc/encoding.md +146 -0
  168. data/ext/rj_schema/rapidjson/doc/encoding.zh-cn.md +152 -0
  169. data/ext/rj_schema/rapidjson/doc/faq.md +289 -0
  170. data/ext/rj_schema/rapidjson/doc/faq.zh-cn.md +290 -0
  171. data/ext/rj_schema/rapidjson/doc/features.md +104 -0
  172. data/ext/rj_schema/rapidjson/doc/features.zh-cn.md +103 -0
  173. data/ext/rj_schema/rapidjson/doc/internals.md +368 -0
  174. data/ext/rj_schema/rapidjson/doc/internals.zh-cn.md +363 -0
  175. data/ext/rj_schema/rapidjson/doc/logo/rapidjson.png +0 -0
  176. data/ext/rj_schema/rapidjson/doc/logo/rapidjson.svg +119 -0
  177. data/ext/rj_schema/rapidjson/doc/misc/DoxygenLayout.xml +194 -0
  178. data/ext/rj_schema/rapidjson/doc/misc/doxygenextra.css +274 -0
  179. data/ext/rj_schema/rapidjson/doc/misc/footer.html +11 -0
  180. data/ext/rj_schema/rapidjson/doc/misc/header.html +24 -0
  181. data/ext/rj_schema/rapidjson/doc/npm.md +31 -0
  182. data/ext/rj_schema/rapidjson/doc/performance.md +26 -0
  183. data/ext/rj_schema/rapidjson/doc/performance.zh-cn.md +26 -0
  184. data/ext/rj_schema/rapidjson/doc/pointer.md +234 -0
  185. data/ext/rj_schema/rapidjson/doc/pointer.zh-cn.md +234 -0
  186. data/ext/rj_schema/rapidjson/doc/sax.md +509 -0
  187. data/ext/rj_schema/rapidjson/doc/sax.zh-cn.md +487 -0
  188. data/ext/rj_schema/rapidjson/doc/schema.md +505 -0
  189. data/ext/rj_schema/rapidjson/doc/schema.zh-cn.md +237 -0
  190. data/ext/rj_schema/rapidjson/doc/stream.md +426 -0
  191. data/ext/rj_schema/rapidjson/doc/stream.zh-cn.md +426 -0
  192. data/ext/rj_schema/rapidjson/doc/tutorial.md +536 -0
  193. data/ext/rj_schema/rapidjson/doc/tutorial.zh-cn.md +534 -0
  194. data/ext/rj_schema/rapidjson/docker/debian/Dockerfile +8 -0
  195. data/ext/rj_schema/rapidjson/example/CMakeLists.txt +45 -0
  196. data/ext/rj_schema/rapidjson/example/archiver/archiver.cpp +292 -0
  197. data/ext/rj_schema/rapidjson/example/archiver/archiver.h +145 -0
  198. data/ext/rj_schema/rapidjson/example/archiver/archivertest.cpp +287 -0
  199. data/ext/rj_schema/rapidjson/example/capitalize/capitalize.cpp +67 -0
  200. data/ext/rj_schema/rapidjson/example/condense/condense.cpp +32 -0
  201. data/ext/rj_schema/rapidjson/example/filterkey/filterkey.cpp +135 -0
  202. data/ext/rj_schema/rapidjson/example/filterkeydom/filterkeydom.cpp +170 -0
  203. data/ext/rj_schema/rapidjson/example/jsonx/jsonx.cpp +207 -0
  204. data/ext/rj_schema/rapidjson/example/lookaheadparser/lookaheadparser.cpp +350 -0
  205. data/ext/rj_schema/rapidjson/example/messagereader/messagereader.cpp +105 -0
  206. data/ext/rj_schema/rapidjson/example/parsebyparts/parsebyparts.cpp +176 -0
  207. data/ext/rj_schema/rapidjson/example/pretty/pretty.cpp +30 -0
  208. data/ext/rj_schema/rapidjson/example/prettyauto/prettyauto.cpp +56 -0
  209. data/ext/rj_schema/rapidjson/example/schemavalidator/schemavalidator.cpp +78 -0
  210. data/ext/rj_schema/rapidjson/example/serialize/serialize.cpp +173 -0
  211. data/ext/rj_schema/rapidjson/example/simpledom/simpledom.cpp +29 -0
  212. data/ext/rj_schema/rapidjson/example/simplepullreader/simplepullreader.cpp +53 -0
  213. data/ext/rj_schema/rapidjson/example/simplereader/simplereader.cpp +42 -0
  214. data/ext/rj_schema/rapidjson/example/simplewriter/simplewriter.cpp +36 -0
  215. data/ext/rj_schema/rapidjson/example/tutorial/tutorial.cpp +151 -0
  216. data/ext/rj_schema/rapidjson/include/rapidjson/allocators.h +271 -0
  217. data/ext/rj_schema/rapidjson/include/rapidjson/cursorstreamwrapper.h +78 -0
  218. data/ext/rj_schema/rapidjson/include/rapidjson/document.h +2630 -0
  219. data/ext/rj_schema/rapidjson/include/rapidjson/encodedstream.h +299 -0
  220. data/ext/rj_schema/rapidjson/include/rapidjson/encodings.h +716 -0
  221. data/ext/rj_schema/rapidjson/include/rapidjson/error/en.h +74 -0
  222. data/ext/rj_schema/rapidjson/include/rapidjson/error/error.h +161 -0
  223. data/ext/rj_schema/rapidjson/include/rapidjson/filereadstream.h +99 -0
  224. data/ext/rj_schema/rapidjson/include/rapidjson/filewritestream.h +104 -0
  225. data/ext/rj_schema/rapidjson/include/rapidjson/fwd.h +151 -0
  226. data/ext/rj_schema/rapidjson/include/rapidjson/internal/biginteger.h +290 -0
  227. data/ext/rj_schema/rapidjson/include/rapidjson/internal/diyfp.h +258 -0
  228. data/ext/rj_schema/rapidjson/include/rapidjson/internal/dtoa.h +245 -0
  229. data/ext/rj_schema/rapidjson/include/rapidjson/internal/ieee754.h +78 -0
  230. data/ext/rj_schema/rapidjson/include/rapidjson/internal/itoa.h +304 -0
  231. data/ext/rj_schema/rapidjson/include/rapidjson/internal/meta.h +181 -0
  232. data/ext/rj_schema/rapidjson/include/rapidjson/internal/pow10.h +55 -0
  233. data/ext/rj_schema/rapidjson/include/rapidjson/internal/regex.h +734 -0
  234. data/ext/rj_schema/rapidjson/include/rapidjson/internal/stack.h +231 -0
  235. data/ext/rj_schema/rapidjson/include/rapidjson/internal/strfunc.h +69 -0
  236. data/ext/rj_schema/rapidjson/include/rapidjson/internal/strtod.h +269 -0
  237. data/ext/rj_schema/rapidjson/include/rapidjson/internal/swap.h +46 -0
  238. data/ext/rj_schema/rapidjson/include/rapidjson/istreamwrapper.h +115 -0
  239. data/ext/rj_schema/rapidjson/include/rapidjson/memorybuffer.h +70 -0
  240. data/ext/rj_schema/rapidjson/include/rapidjson/memorystream.h +71 -0
  241. data/ext/rj_schema/rapidjson/include/rapidjson/msinttypes/inttypes.h +316 -0
  242. data/ext/rj_schema/rapidjson/include/rapidjson/msinttypes/stdint.h +300 -0
  243. data/ext/rj_schema/rapidjson/include/rapidjson/ostreamwrapper.h +81 -0
  244. data/ext/rj_schema/rapidjson/include/rapidjson/pointer.h +1363 -0
  245. data/ext/rj_schema/rapidjson/include/rapidjson/prettywriter.h +277 -0
  246. data/ext/rj_schema/rapidjson/include/rapidjson/rapidjson.h +628 -0
  247. data/ext/rj_schema/rapidjson/include/rapidjson/reader.h +2222 -0
  248. data/ext/rj_schema/rapidjson/include/rapidjson/schema.h +2479 -0
  249. data/ext/rj_schema/rapidjson/include/rapidjson/stream.h +223 -0
  250. data/ext/rj_schema/rapidjson/include/rapidjson/stringbuffer.h +121 -0
  251. data/ext/rj_schema/rapidjson/include/rapidjson/writer.h +716 -0
  252. data/ext/rj_schema/rapidjson/include_dirs.js +2 -0
  253. data/ext/rj_schema/rapidjson/library.json +15 -0
  254. data/ext/rj_schema/rapidjson/license.txt +57 -0
  255. data/ext/rj_schema/rapidjson/package.json +24 -0
  256. data/ext/rj_schema/rapidjson/rapidjson.autopkg +77 -0
  257. data/ext/rj_schema/rapidjson/readme.md +160 -0
  258. data/ext/rj_schema/rapidjson/readme.zh-cn.md +152 -0
  259. data/ext/rj_schema/rapidjson/test/CMakeLists.txt +20 -0
  260. data/ext/rj_schema/rapidjson/test/perftest/CMakeLists.txt +28 -0
  261. data/ext/rj_schema/rapidjson/test/perftest/misctest.cpp +974 -0
  262. data/ext/rj_schema/rapidjson/test/perftest/perftest.cpp +24 -0
  263. data/ext/rj_schema/rapidjson/test/perftest/perftest.h +185 -0
  264. data/ext/rj_schema/rapidjson/test/perftest/platformtest.cpp +166 -0
  265. data/ext/rj_schema/rapidjson/test/perftest/rapidjsontest.cpp +472 -0
  266. data/ext/rj_schema/rapidjson/test/perftest/schematest.cpp +216 -0
  267. data/ext/rj_schema/rapidjson/test/unittest/CMakeLists.txt +92 -0
  268. data/ext/rj_schema/rapidjson/test/unittest/allocatorstest.cpp +102 -0
  269. data/ext/rj_schema/rapidjson/test/unittest/bigintegertest.cpp +133 -0
  270. data/ext/rj_schema/rapidjson/test/unittest/cursorstreamwrappertest.cpp +115 -0
  271. data/ext/rj_schema/rapidjson/test/unittest/documenttest.cpp +672 -0
  272. data/ext/rj_schema/rapidjson/test/unittest/dtoatest.cpp +98 -0
  273. data/ext/rj_schema/rapidjson/test/unittest/encodedstreamtest.cpp +313 -0
  274. data/ext/rj_schema/rapidjson/test/unittest/encodingstest.cpp +451 -0
  275. data/ext/rj_schema/rapidjson/test/unittest/filestreamtest.cpp +112 -0
  276. data/ext/rj_schema/rapidjson/test/unittest/fwdtest.cpp +230 -0
  277. data/ext/rj_schema/rapidjson/test/unittest/istreamwrappertest.cpp +181 -0
  278. data/ext/rj_schema/rapidjson/test/unittest/itoatest.cpp +160 -0
  279. data/ext/rj_schema/rapidjson/test/unittest/jsoncheckertest.cpp +143 -0
  280. data/ext/rj_schema/rapidjson/test/unittest/namespacetest.cpp +70 -0
  281. data/ext/rj_schema/rapidjson/test/unittest/ostreamwrappertest.cpp +92 -0
  282. data/ext/rj_schema/rapidjson/test/unittest/pointertest.cpp +1529 -0
  283. data/ext/rj_schema/rapidjson/test/unittest/prettywritertest.cpp +344 -0
  284. data/ext/rj_schema/rapidjson/test/unittest/readertest.cpp +1895 -0
  285. data/ext/rj_schema/rapidjson/test/unittest/regextest.cpp +638 -0
  286. data/ext/rj_schema/rapidjson/test/unittest/schematest.cpp +2009 -0
  287. data/ext/rj_schema/rapidjson/test/unittest/simdtest.cpp +219 -0
  288. data/ext/rj_schema/rapidjson/test/unittest/strfunctest.cpp +30 -0
  289. data/ext/rj_schema/rapidjson/test/unittest/stringbuffertest.cpp +192 -0
  290. data/ext/rj_schema/rapidjson/test/unittest/strtodtest.cpp +132 -0
  291. data/ext/rj_schema/rapidjson/test/unittest/unittest.cpp +51 -0
  292. data/ext/rj_schema/rapidjson/test/unittest/unittest.h +140 -0
  293. data/ext/rj_schema/rapidjson/test/unittest/valuetest.cpp +1829 -0
  294. data/ext/rj_schema/rapidjson/test/unittest/writertest.cpp +598 -0
  295. data/ext/rj_schema/rapidjson/test/valgrind.supp +17 -0
  296. data/ext/rj_schema/rapidjson/travis-doxygen.sh +121 -0
  297. data/ext/rj_schema/rj_schema.cpp +136 -0
  298. data/lib/rj_schema.rb +7 -0
  299. 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)