diff --git a/ci_config.json b/ci_config.json index 0e0064c97..0d05d31d5 100644 --- a/ci_config.json +++ b/ci_config.json @@ -750,6 +750,11 @@ "mpdecimal:tests=true" ] }, + "mpark-patterns": { + "build_options": [ + "mpark-patterns:tests=enabled" + ] + }, "msgpackc-cxx": { "alpine_packages": [ "boost-dev" diff --git a/releases.json b/releases.json index 29d4e6a8c..88fb66cc0 100644 --- a/releases.json +++ b/releases.json @@ -2481,6 +2481,14 @@ "1.0-2" ] }, + "mpark-patterns": { + "dependency_names": [ + "mpark_patterns" + ], + "versions": [ + "0.3.0-1" + ] + }, "mpdecimal": { "dependency_names": [ "mpdec", diff --git a/subprojects/mpark-patterns.wrap b/subprojects/mpark-patterns.wrap new file mode 100644 index 000000000..9dbcdf031 --- /dev/null +++ b/subprojects/mpark-patterns.wrap @@ -0,0 +1,9 @@ +[wrap-file] +source_url = https://github.com/mpark/patterns/archive/refs/tags/v0.3.0.tar.gz +source_filename = patterns-0.3.0.tar.gz +source_hash = 80e6af808a4d74d5d7358666303eb1dbfc5582313ff9fa31d1c0d3280d3bd9e7 +directory = patterns-0.3.0 +patch_directory = mpark-patterns + +[provide] +mpark_patterns = mpark_patterns_dep diff --git a/subprojects/packagefiles/mpark-patterns/meson.build b/subprojects/packagefiles/mpark-patterns/meson.build new file mode 100644 index 000000000..2e6bc2be6 --- /dev/null +++ b/subprojects/packagefiles/mpark-patterns/meson.build @@ -0,0 +1,26 @@ +project( + 'MPark.Patterns', + 'cpp', + default_options: ['cpp_std=c++17'], + license: 'BSL-1.0', + version: '0.3.0', + meson_version: '>=1.6.1', +) + +if meson.get_compiler('cpp').get_id() == 'msvc' + add_global_arguments('/Zc:__cplusplus', language: 'cpp') +endif + +install_subdir( + 'include', + install_dir: get_option('includedir'), + strip_directory: true, +) + +mpark_patterns_dep = declare_dependency( + include_directories: include_directories('include'), +) + +if get_option('tests').enabled() + subdir('test') +endif diff --git a/subprojects/packagefiles/mpark-patterns/meson.options b/subprojects/packagefiles/mpark-patterns/meson.options new file mode 100644 index 000000000..cb51e434d --- /dev/null +++ b/subprojects/packagefiles/mpark-patterns/meson.options @@ -0,0 +1 @@ +option ('tests', type: 'feature', value: 'disabled') diff --git a/subprojects/packagefiles/mpark-patterns/test/meson.build b/subprojects/packagefiles/mpark-patterns/test/meson.build new file mode 100644 index 000000000..da6b98c3a --- /dev/null +++ b/subprojects/packagefiles/mpark-patterns/test/meson.build @@ -0,0 +1,21 @@ +gtest_dep = dependency('gtest_main') + +tests = [ + 'aggregate', + 'array', + 'as', + 'balance', + 'calc', + 'ds', + 'identifier', + 'intro', + 'let', + 'optional', + 'regex', + 'variadic', + 'when', +] + +foreach f : tests + test(f + '.test', executable(f + '.cpp', dependencies: gtest_dep)) +endforeach