Skip to content

Commit fa0d01c

Browse files
committed
templates: simplify (whitespace, flatten array)
1 parent f947ee0 commit fa0d01c

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
)
@@ -125,12 +125,11 @@ class {utoken}_PUBLIC {class_name} {{
125125
lib_args = ['-DBUILDING_{utoken}']
126126
127127
sources = [{source_files}
128-
129128
]
130129
131130
lib = library(
132131
'{lib_name}',
133-
[sources],
132+
sources,
134133
install : true,
135134
cpp_shared_args : lib_args,
136135
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
@@ -76,7 +76,7 @@
7676
7777
lib = library(
7878
'{lib_name}',
79-
[sources],
79+
sources,
8080
install : true,
8181
c_shared_args : lib_args,
8282
gnu_symbol_visibility : 'hidden',
@@ -141,7 +141,7 @@
141141
142142
exe = executable(
143143
'{exe_name}',
144-
[sources],
144+
sources,
145145
dependencies : dependencies,
146146
install : true,
147147
)

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
@@ -68,7 +68,6 @@
6868
]
6969
7070
sources = [{source_files}
71-
7271
]
7372
7473
# These arguments are only used to build the shared library
@@ -77,7 +76,7 @@
7776
7877
lib = library(
7978
'{lib_name}',
80-
[sources],
79+
sources,
8180
install : true,
8281
objcpp_shared_args : lib_args,
8382
dependencies : dependencies,
@@ -138,12 +137,11 @@
138137
]
139138
140139
sources = [{source_files}
141-
142140
]
143141
144142
exe = executable(
145143
'{exe_name}',
146-
[sources],
144+
sources,
147145
dependencies : dependencies,
148146
install : true,
149147
)

mesonbuild/templates/objctemplates.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@
6868
]
6969
7070
sources = [{source_files}
71-
7271
]
7372
7473
# These arguments are only used to build the shared library
@@ -77,7 +76,7 @@
7776
7877
lib = library(
7978
'{lib_name}',
80-
[sources],
79+
sources,
8180
install : true,
8281
objc_shared_args : lib_args,
8382
dependencies : dependencies,
@@ -137,12 +136,11 @@
137136
]
138137
139138
sources = [{source_files}
140-
141139
]
142140
143141
exe = executable(
144142
'{exe_name}',
145-
[sources],
143+
sources,
146144
dependencies : dependencies,
147145
install : true,
148146
)

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)