@@ -10,11 +10,23 @@ benchmarks_exe = executable(
1010 build_by_default : false ,
1111)
1212
13- # manually written, list all benchmarks with:
14- # builddir/benchmarks/msft_proxy_benchmarks --benchmark_list_tests
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' ,
20+ ),
21+ meson .current_source_dir() / ' meson.build' ,
22+ ],
23+ output : ' autogen.stamp' ,
24+ build_by_default : true ,
25+ )
26+
27+ #pragma autogen push
1528benchmarks = {
1629 ' ObjectCreation' : [
17- ' BM_SmallObjectCreationWithProxy' ,
1830 ' BM_SmallObjectCreationWithProxy_Shared' ,
1931 ' BM_SmallObjectCreationWithProxy_SharedPooled' ,
2032 ' BM_SmallObjectCreationWithUniquePtr' ,
@@ -31,7 +43,6 @@ benchmarks = {
3143 ' BM_LargeObjectCreationWithAny' ,
3244 ],
3345 ' ObjectInvocation' : [
34- ' BM_SmallObjectInvocationViaProxy' ,
3546 ' BM_SmallObjectInvocationViaProxy_Shared' ,
3647 ' BM_SmallObjectInvocationViaProxyView' ,
3748 ' BM_SmallObjectInvocationViaVirtualFunction' ,
@@ -44,8 +55,7 @@ benchmarks = {
4455 ' BM_LargeObjectInvocationViaVirtualFunction_Shared' ,
4556 ' BM_LargeObjectInvocationViaVirtualFunction_RawPtr' ,
4657 ],
47- ' ObjectOperation' : [
48- ' BM_SmallObjectRelocationViaProxy' ,
58+ ' ObjectRelocation' : [
4959 ' BM_SmallObjectRelocationViaProxy_NothrowRelocatable' ,
5060 ' BM_SmallObjectRelocationViaUniquePtr' ,
5161 ' BM_SmallObjectRelocationViaAny' ,
@@ -55,6 +65,7 @@ benchmarks = {
5565 ' BM_LargeObjectRelocationViaAny' ,
5666 ],
5767}
68+ #pragma autogen pop
5869
5970foreach suite : benchmarks.keys()
6071 foreach name : benchmarks[suite]
@@ -63,6 +74,7 @@ foreach suite : benchmarks.keys()
6374 benchmarks_exe,
6475 args : [f' --benchmark_filter=^@name@$' ],
6576 suite : suite,
77+ depends : autogen_benchmarks,
6678 )
6779 endforeach
6880endforeach
0 commit comments