Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

taocpp-json: add taoJSON version 1.0.0-beta.14 #1705

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -3439,6 +3439,14 @@
"1.12-1"
]
},
"taocpp-json": {
"dependency_names": [
"taocpp-json"
],
"versions": [
"1.0.0-beta.14-1"
]
},
"tclap": {
"dependency_names": [
"tclap"
Expand Down
28 changes: 28 additions & 0 deletions subprojects/packagefiles/taocpp-json/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
project(
'taocpp-json',
'cpp',
version: '1.0.0-beta.14',
license: 'MIT',
default_options: [
'cpp_std=c++17',
]
)

pegtl_dep = dependency('pegtl')

taocpp_json_inc = include_directories('include')
taocpp_json_dep = declare_dependency(include_directories: [taocpp_json_inc], dependencies: [pegtl_dep])

is_subproject = meson.is_subproject()

if get_option('tests').disable_auto_if(is_subproject).allowed()
subdir('src/test/json')
endif

if get_option('examples').disable_auto_if(is_subproject).allowed()
subdir('src/example/json')
endif

if get_option('perfs').disable_auto_if(is_subproject).allowed()
subdir('src/perf/json')
endif
18 changes: 18 additions & 0 deletions subprojects/packagefiles/taocpp-json/meson.options
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
option(
'tests',
type: 'feature',
value: 'auto',
description: 'Build test programs',
)
option(
'examples',
type: 'feature',
value: 'auto',
description: 'Build example programs',
)
option(
'perfs',
type: 'feature',
value: 'auto',
description: 'Build perf programs',
)
58 changes: 58 additions & 0 deletions subprojects/packagefiles/taocpp-json/src/example/json/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
example_files = [
'cbor_to_jaxn.cpp',
'cbor_to_json.cpp',
'cbor_to_msgpack.cpp',
'cbor_to_pretty_jaxn.cpp',
'cbor_to_pretty_json.cpp',
'cbor_to_ubjson.cpp',
'jaxn_to_cbor.cpp',
'jaxn_to_cplusplus.cpp',
'jaxn_to_jaxn.cpp',
'jaxn_to_msgpack.cpp',
'jaxn_to_pretty_jaxn.cpp',
'jaxn_to_ubjson.cpp',
'json_to_cbor.cpp',
'json_to_json.cpp',
'json_to_msgpack.cpp',
'json_to_pretty_json.cpp',
'json_to_ubjson.cpp',
'msgpack_to_cbor.cpp',
'msgpack_to_jaxn.cpp',
'msgpack_to_json.cpp',
'msgpack_to_pretty_jaxn.cpp',
'msgpack_to_pretty_json.cpp',
'msgpack_to_ubjson.cpp',
'printf_doubles.cpp',
'ubjson_to_cbor.cpp',
'ubjson_to_jaxn.cpp',
'ubjson_to_json.cpp',
'ubjson_to_msgpack.cpp',
'ubjson_to_pretty_jaxn.cpp',
'ubjson_to_pretty_json.cpp',
'validate_event_order.cpp',
'validate_integer.cpp',
]

args = []
cpp = meson.get_compiler('cpp')

if cpp.get_argument_syntax() == 'msvc'
args += cpp.get_supported_arguments('/W4', '/WX', '/utf-8')
else
args += cpp.get_supported_arguments('-pedantic', '-Wall', '-Wextra', '-Wshadow', '-Werror')
endif

fs = import('fs')

foreach file : example_files

name = fs.replace_suffix(file, '')

example_exe = executable(
name,
files(file),
dependencies: pegtl_dep,
cpp_args: args,
)

endforeach
33 changes: 33 additions & 0 deletions subprojects/packagefiles/taocpp-json/src/perf/json/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
perf_files = [
'benchmark.cpp',
'parse_file.cpp',
'pretty_print_file.cpp',
'print_double.cpp',
'print_file.cpp',
'sizes.cpp',
'syntax_only.cpp',
]

args = []
cpp = meson.get_compiler('cpp')

if cpp.get_argument_syntax() == 'msvc'
args += cpp.get_supported_arguments('/W4', '/WX', '/utf-8')
else
args += cpp.get_supported_arguments('-pedantic', '-Wall', '-Wextra', '-Wshadow', '-Werror')
endif

fs = import('fs')

foreach file : perf_files

name = fs.replace_suffix(file, '')

perf_exe = executable(
name,
files(file),
dependencies: pegtl_dep,
cpp_args: args,
)

endforeach
89 changes: 89 additions & 0 deletions subprojects/packagefiles/taocpp-json/src/test/json/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
test_files = [
'big_list_of_naughty_strings.cpp',
'binding_array.cpp',
'binding_factory.cpp',
'binding_function.cpp',
'binding_object.cpp',
'binding_versions.cpp',
'cbor.cpp',
'cbor_parts_parser.cpp',
'contrib_diff.cpp',
'contrib_get.cpp',
'contrib_patch_add.cpp',
'contrib_patch_copy.cpp',
'contrib_patch_move.cpp',
'contrib_patch_remove.cpp',
'contrib_patch_replace.cpp',
'contrib_patch_test.cpp',
'contrib_position.cpp',
'contrib_reference.cpp',
'contrib_schema.cpp',
'contrib_traits.cpp',
'double.cpp',
'enable_implicit_constructor.cpp',
'escape.cpp',
'events_binary_to.cpp',
'events_compare.cpp',
'events_debug.cpp',
'events_hash.cpp',
'events_to_stream.cpp',
'events_to_string.cpp',
'include_json.cpp',
'integer.cpp',
'jaxn_ostream.cpp',
'jaxn_parse.cpp',
'jaxn_parts_parser.cpp',
'json_ostream.cpp',
'json_parse.cpp',
'json_parts_parser.cpp',
'json_pointer.cpp',
'key_camel_case_to_snake_case.cpp',
'key_snake_case_to_camel_case.cpp',
'literal.cpp',
'msgpack.cpp',
'object_construction.cpp',
'opaque_pointer.cpp',
'operators.cpp',
'optional.cpp',
'public_base.cpp',
'self_contained.cpp',
'sha256.cpp',
'temporary_parsing.cpp',
'type.cpp',
'ubjson.cpp',
'uri_fragment.cpp',
'validate_event_interfaces.cpp',
'validate_utf8.cpp',
'value_access.cpp',
'value_basics.cpp',
'value_create.cpp',
'value_ptr.cpp',
'value_subscript.cpp',
'with_arguments.cpp',
]

args = []
cpp = meson.get_compiler('cpp')

if cpp.get_argument_syntax() == 'msvc'
args += cpp.get_supported_arguments('/W4', '/WX', '/utf-8')
else
args += cpp.get_supported_arguments('-pedantic', '-Wall', '-Wextra', '-Wshadow', '-Werror')
endif

fs = import('fs')

foreach file : test_files

name = fs.replace_suffix(file, '')

test_exe = executable(
name,
files(file),
dependencies: pegtl_dep,
cpp_args: args,
)

test(name, test_exe, workdir: meson.project_source_root())

endforeach
9 changes: 9 additions & 0 deletions subprojects/taocpp-json.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[wrap-file]
directory = json-1.0.0-beta.14
source_url = https://github.com/taocpp/json/archive/refs/tags/1.0.0-beta.14.tar.gz
source_filename = taocpp-json-1.0.0-beta.14.tar.gz
source_hash = f9e44a1d6a70a6d39b9e45df76eac928e69f5318e5a957fd5c0efdf45dacaf5e
patch_directory = taocpp-json

[provide]
taocpp-json = taocpp_json_dep
Loading