Skip to content

Commit 93635a8

Browse files
committed
templates: simplify (whitespace, flatten array)
1 parent 1d8b3e7 commit 93635a8

File tree

11 files changed

+22
-40
lines changed

11 files changed

+22
-40
lines changed

mesonbuild/templates/cpptemplates.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
4141
exe = executable(
4242
'{exe_name}',
43-
[sources],
43+
sources,
4444
install : true,
4545
dependencies : dependencies,
4646
)
@@ -131,12 +131,11 @@ class {utoken}_PUBLIC {class_name} {{
131131
lib_args = ['-DBUILDING_{utoken}']
132132
133133
sources = [{source_files}
134-
135134
]
136135
137136
lib = library(
138137
'{lib_name}',
139-
[sources],
138+
sources,
140139
install : true,
141140
cpp_shared_args : lib_args,
142141
gnu_symbol_visibility : 'hidden',

mesonbuild/templates/cstemplates.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,11 @@
3636
]
3737
3838
sources = [{source_files}
39-
4039
]
4140
4241
exe = executable(
4342
'{exe_name}',
44-
[sources],
43+
sources,
4544
install : true,
4645
dependencies : dependencies,
4746
)
@@ -88,12 +87,11 @@
8887
]
8988
9089
sources = [{source_files}
91-
9290
]
9391
9492
stlib = shared_library(
9593
'{lib_name}',
96-
[sources],
94+
sources,
9795
dependencies : dependencies,
9896
install : true,
9997
)

mesonbuild/templates/ctemplates.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
8383
lib = library(
8484
'{lib_name}',
85-
[sources],
85+
sources,
8686
install : true,
8787
c_shared_args : lib_args,
8888
gnu_symbol_visibility : 'hidden',
@@ -147,7 +147,7 @@
147147
148148
exe = executable(
149149
'{exe_name}',
150-
[sources],
150+
sources,
151151
dependencies : dependencies,
152152
install : true,
153153
)

mesonbuild/templates/cudatemplates.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,11 @@
3737
]
3838
3939
sources = [{source_files}
40-
4140
]
4241
4342
exe = executable(
4443
'{exe_name}',
45-
[sources],
44+
sources,
4645
dependencies : dependencies,
4746
install : true,
4847
)
@@ -127,12 +126,11 @@ class {utoken}_PUBLIC {class_name} {{
127126
]
128127
129128
sources = [{source_files}
130-
131129
]
132130
133131
lib = library(
134132
'{lib_name}',
135-
[sources],
133+
sources,
136134
install : true,
137135
cpp_shared_args : lib_args,
138136
gnu_symbol_visibility : 'hidden',

mesonbuild/templates/dlangtemplates.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,11 @@
3636
]
3737
3838
sources = [{source_files}
39-
4039
]
4140
4241
exe = executable(
4342
'{exe_name}',
44-
[sources],
43+
sources,
4544
dependencies : dependencies,
4645
install : true,
4746
)
@@ -89,12 +88,11 @@
8988
]
9089
9190
sources = [{source_files}
92-
9391
]
9492
9593
stlib = static_library(
9694
'{lib_name}',
97-
[sources],
95+
sources,
9896
install : true,
9997
gnu_symbol_visibility : 'hidden',
10098
dependencies : dependencies,

mesonbuild/templates/fortrantemplates.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,11 @@
5757
]
5858
5959
sources = [{source_files}
60-
6160
]
6261
6362
lib = library(
6463
'{lib_name}',
65-
[sources],
64+
sources,
6665
install : true,
6766
fortran_shared_args : lib_args,
6867
gnu_symbol_visibility : 'hidden',
@@ -115,12 +114,11 @@
115114
]
116115
117116
sources = [{source_files}
118-
119117
]
120118
121119
exe = executable(
122120
'{exe_name}',
123-
[sources],
121+
sources,
124122
dependencies : dependencies,
125123
install : true,
126124
)

mesonbuild/templates/javatemplates.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,11 @@
3636
]
3737
3838
sources = [{source_files}
39-
4039
]
4140
4241
exe = jar(
4342
'{exe_name}',
44-
[sources],
43+
sources,
4544
main_class : '{exe_name}',
4645
dependencies : dependencies,
4746
install : true,
@@ -91,12 +90,11 @@
9190
]
9291
9392
sources = [{source_files}
94-
9593
]
9694
9795
jarlib = jar(
9896
'{class_name}',
99-
[sources],
97+
sources,
10098
dependencies : dependencies,
10199
main_class : '{class_name}',
102100
install : true,

mesonbuild/templates/objcpptemplates.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474
]
7575
7676
sources = [{source_files}
77-
7877
]
7978
8079
# These arguments are only used to build the shared library
@@ -83,7 +82,7 @@
8382
8483
lib = library(
8584
'{lib_name}',
86-
[sources],
85+
sources,
8786
install : true,
8887
objcpp_shared_args : lib_args,
8988
dependencies : dependencies,
@@ -144,12 +143,11 @@
144143
]
145144
146145
sources = [{source_files}
147-
148146
]
149147
150148
exe = executable(
151149
'{exe_name}',
152-
[sources],
150+
sources,
153151
dependencies : dependencies,
154152
install : true,
155153
)

mesonbuild/templates/objctemplates.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474
]
7575
7676
sources = [{source_files}
77-
7877
]
7978
8079
# These arguments are only used to build the shared library
@@ -83,7 +82,7 @@
8382
8483
lib = library(
8584
'{lib_name}',
86-
[sources],
85+
sources,
8786
install : true,
8887
objc_shared_args : lib_args,
8988
dependencies : dependencies,
@@ -143,12 +142,11 @@
143142
]
144143
145144
sources = [{source_files}
146-
147145
]
148146
149147
exe = executable(
150148
'{exe_name}',
151-
[sources],
149+
sources,
152150
dependencies : dependencies,
153151
install : true,
154152
)

mesonbuild/templates/rusttemplates.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,11 @@
5151
]
5252
5353
sources = [{source_files}
54-
5554
]
5655
5756
lib = static_library(
5857
'{lib_name}',
59-
[sources],
58+
sources,
6059
dependencies : dependencies,
6160
install : true,
6261
)
@@ -91,12 +90,11 @@
9190
]
9291
9392
sources = [{source_files}
94-
9593
]
9694
9795
exe = executable(
9896
'{exe_name}',
99-
[sources],
97+
sources,
10098
dependencies : dependencies,
10199
install : true,
102100
)

0 commit comments

Comments
 (0)