Skip to content

Commit

Permalink
Add wrap files for mpark-patterns-0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
adembudak committed Jan 14, 2025
1 parent 4192363 commit 2bf8885
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ci_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,11 @@
"mpdecimal:tests=true"
]
},
"mpark-patterns": {
"build_options": [
"mpark-patterns:tests=enabled"
]
},
"msgpackc-cxx": {
"alpine_packages": [
"boost-dev"
Expand Down
8 changes: 8 additions & 0 deletions releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -2481,6 +2481,14 @@
"1.0-2"
]
},
"mpark-patterns": {
"dependency_names": [
"mpark_patterns"
],
"versions": [
"0.3.0-1"
]
},
"mpdecimal": {
"dependency_names": [
"mpdec",
Expand Down
9 changes: 9 additions & 0 deletions subprojects/mpark-patterns.wrap
Original file line number Diff line number Diff line change
@@ -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
26 changes: 26 additions & 0 deletions subprojects/packagefiles/mpark-patterns/meson.build
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions subprojects/packagefiles/mpark-patterns/meson.options
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
option ('tests', type: 'feature', value: 'disabled')
21 changes: 21 additions & 0 deletions subprojects/packagefiles/mpark-patterns/test/meson.build
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 2bf8885

Please sign in to comment.