Skip to content
This repository was archived by the owner on Jan 29, 2026. It is now read-only.

Commit ca48cf5

Browse files
committed
build/meson: remove all autogen
1 parent 9190f58 commit ca48cf5

10 files changed

Lines changed: 94 additions & 667 deletions

File tree

benchmarks/meson.build

Lines changed: 12 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,14 @@
1-
benchmarks_exe = executable(
2-
'msft_proxy_benchmarks',
3-
files(
4-
'proxy_creation_benchmark.cpp',
5-
'proxy_operation_benchmark.cpp',
6-
'proxy_operation_benchmark_context.cpp',
7-
),
8-
implicit_include_directories: false,
9-
dependencies: [msft_proxy4_dep, benchmark_dep],
10-
build_by_default: false,
11-
)
12-
13-
autogen_benchmarks = custom_target(
14-
command: [
15-
autogen_benchmarks_exe,
16-
custom_target(
17-
command: [benchmarks_exe, '--benchmark_list_tests'],
18-
capture: true,
19-
output: 'tests.txt',
1+
benchmark(
2+
'ProxyBenchmarks',
3+
executable(
4+
'msft_proxy_benchmarks',
5+
files(
6+
'proxy_creation_benchmark.cpp',
7+
'proxy_operation_benchmark.cpp',
8+
'proxy_operation_benchmark_context.cpp',
209
),
21-
meson.current_source_dir() / 'meson.build',
22-
],
23-
output: 'autogen.stamp',
24-
build_by_default: true,
10+
implicit_include_directories: false,
11+
dependencies: [msft_proxy4_dep, benchmark_dep],
12+
build_by_default: false,
13+
),
2514
)
26-
27-
#pragma autogen push
28-
benchmarks = {
29-
'ObjectCreation': [
30-
'BM_SmallObjectCreationWithProxy_Shared',
31-
'BM_SmallObjectCreationWithProxy_SharedPooled',
32-
'BM_SmallObjectCreationWithUniquePtr',
33-
'BM_SmallObjectCreationWithSharedPtr',
34-
'BM_SmallObjectCreationWithSharedPtr_Pooled',
35-
'BM_SmallObjectCreationWithAny',
36-
'BM_LargeObjectCreationWithProxy',
37-
'BM_LargeObjectCreationWithProxy_Pooled',
38-
'BM_LargeObjectCreationWithProxy_Shared',
39-
'BM_LargeObjectCreationWithProxy_SharedPooled',
40-
'BM_LargeObjectCreationWithUniquePtr',
41-
'BM_LargeObjectCreationWithSharedPtr',
42-
'BM_LargeObjectCreationWithSharedPtr_Pooled',
43-
'BM_LargeObjectCreationWithAny',
44-
],
45-
'ObjectInvocation': [
46-
'BM_SmallObjectInvocationViaProxy_Shared',
47-
'BM_SmallObjectInvocationViaProxyView',
48-
'BM_SmallObjectInvocationViaVirtualFunction',
49-
'BM_SmallObjectInvocationViaVirtualFunction_Shared',
50-
'BM_SmallObjectInvocationViaVirtualFunction_RawPtr',
51-
'BM_LargeObjectInvocationViaProxy',
52-
'BM_LargeObjectInvocationViaProxy_Shared',
53-
'BM_LargeObjectInvocationViaProxyView',
54-
'BM_LargeObjectInvocationViaVirtualFunction',
55-
'BM_LargeObjectInvocationViaVirtualFunction_Shared',
56-
'BM_LargeObjectInvocationViaVirtualFunction_RawPtr',
57-
],
58-
'ObjectRelocation': [
59-
'BM_SmallObjectRelocationViaProxy_NothrowRelocatable',
60-
'BM_SmallObjectRelocationViaUniquePtr',
61-
'BM_SmallObjectRelocationViaAny',
62-
'BM_LargeObjectRelocationViaProxy',
63-
'BM_LargeObjectRelocationViaProxy_NothrowRelocatable',
64-
'BM_LargeObjectRelocationViaUniquePtr',
65-
'BM_LargeObjectRelocationViaAny',
66-
],
67-
}
68-
#pragma autogen pop
69-
70-
foreach suite : benchmarks.keys()
71-
foreach name : benchmarks[suite]
72-
benchmark(
73-
name,
74-
benchmarks_exe,
75-
args: [f'--benchmark_filter=^@name@$'],
76-
suite: suite,
77-
depends: autogen_benchmarks,
78-
)
79-
endforeach
80-
endforeach

docs/meson.build

Lines changed: 8 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,18 @@
1-
maybe_fmt_dep = dependency(
2-
'fmt',
3-
version: fmt_spec,
4-
required: false,
5-
disabler: true,
6-
)
1+
extract_doctest_exe = find_program('../tools/meson_extract_doctest.py')
72

8-
autogen_glob = custom_target(
9-
command: [autogen_doctest_exe, meson.current_source_dir()],
10-
output: 'autogen.stamp',
11-
build_by_default: true,
12-
)
13-
14-
#pragma autogen push
15-
docs = [
16-
'spec/PRO_DEF_FREE_AS_MEM_DISPATCH.md',
17-
'spec/PRO_DEF_FREE_DISPATCH.md',
18-
'spec/PRO_DEF_MEM_DISPATCH.md',
19-
'spec/allocate_proxy.md',
20-
'spec/allocate_proxy_shared.md',
21-
'spec/facade_aware_overload_t.md',
22-
'spec/inplace_proxiable_target.md',
23-
'spec/is_bitwise_trivially_relocatable.md',
24-
'spec/make_proxy.md',
25-
'spec/make_proxy_inplace.md',
26-
'spec/make_proxy_shared.md',
27-
'spec/make_proxy_view.md',
28-
'spec/msft_lib_proxy.md',
29-
'spec/proxiable.md',
30-
'spec/proxiable_target.md',
31-
'spec/proxy_invoke.md',
32-
'spec/proxy_reflect.md',
33-
'spec/proxy_view.md',
34-
'spec/skills_as_view.md',
35-
'spec/skills_as_weak.md',
36-
'spec/skills_fmt_format.md',
37-
'spec/skills_format.md',
38-
'spec/skills_slim.md',
39-
'spec/weak_proxy.md',
40-
'spec/basic_facade_builder/README.md',
41-
'spec/basic_facade_builder/add_convention.md',
42-
'spec/basic_facade_builder/add_facade.md',
43-
'spec/basic_facade_builder/add_reflection.md',
44-
'spec/basic_facade_builder/add_skill.md',
45-
'spec/basic_facade_builder/build.md',
46-
'spec/basic_facade_builder/restrict_layout.md',
47-
'spec/basic_facade_builder/support_copy.md',
48-
'spec/basic_facade_builder/support_destruction.md',
49-
'spec/basic_facade_builder/support_relocation.md',
50-
'spec/explicit_conversion_dispatch/README.md',
51-
'spec/implicit_conversion_dispatch/README.md',
52-
'spec/operator_dispatch/README.md',
53-
'spec/proxy/README.md',
54-
'spec/proxy/constructor.md',
55-
'spec/proxy/destructor.md',
56-
'spec/proxy/emplace.md',
57-
'spec/proxy/friend_operator_equality.md',
58-
'spec/proxy/friend_swap.md',
59-
'spec/proxy/indirection.md',
60-
'spec/proxy/operator_bool.md',
61-
'spec/proxy/reset.md',
62-
'spec/skills_rtti/README.md',
63-
'spec/skills_rtti/proxy_cast.md',
64-
'spec/skills_rtti/proxy_typeid.md',
65-
'spec/substitution_dispatch/README.md',
66-
'spec/weak_dispatch/README.md',
67-
]
68-
#pragma autogen pop
3+
docs = run_command(
4+
extract_doctest_exe,
5+
meson.current_source_dir(),
6+
capture: true,
7+
check: true,
8+
).stdout().strip('\0').split('\0')
699

7010
examples = []
7111

7212
foreach doc : docs
7313
deps = [msft_proxy4_dep]
7414
if doc.contains('fmt')
75-
deps += maybe_fmt_dep
15+
deps += fmt_dep
7616
endif
7717

7818
name = doc.replace('/', '_').substring(0, -3)
@@ -93,7 +33,6 @@ foreach doc : docs
9333
name,
9434
example_exe,
9535
suite: 'ProxyExamples',
96-
depends: autogen_glob,
9736
)
9837
endforeach
9938

meson.build

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,23 +122,21 @@ endif
122122
meson.override_dependency(meson.project_name(), msft_proxy4_dep)
123123
meson.override_dependency(meson.project_name() + '_module', msft_proxy4_mod)
124124

125-
subdir('tools')
126-
127125
tests = get_option('tests').disable_auto_if(meson.is_subproject())
128126
gtest_dep = dependency(
129127
'gtest_main',
130128
main: true,
131129
required: tests,
132130
)
133-
fmt_spec = ['>=6.1.0']
134131
fmt_dep = dependency(
135132
'fmt',
136-
version: fmt_spec,
137-
required: tests,
133+
version: '>=6.1.0',
134+
required: false,
135+
disabler: true,
138136
)
139137
subdir(
140138
'tests',
141-
if_found: [gtest_dep, fmt_dep],
139+
if_found: gtest_dep,
142140
)
143141

144142
benchmarks = get_option('benchmarks').disable_auto_if(meson.is_subproject())

0 commit comments

Comments
 (0)