Skip to content

Commit aafe60b

Browse files
committed
meson: efficient configure syntax
1 parent 9e8a0b0 commit aafe60b

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/meson.build

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,14 @@
1-
conf_data = configuration_data()
2-
31
is_windows = os == 'windows' ? '.true.' : '.false.'
42

5-
conf_data.set('is_windows', is_windows)
63
configure_file(
74
input : 'pathlib.in.f90',
85
output : 'pathlib.f90',
9-
configuration : conf_data)
10-
11-
python = find_program('python')
6+
configuration : {'is_windows': is_windows})
127

13-
ret = run_command(python, '-c', 'print(open("' + meson.current_source_dir() / 'reader_template.in.f90' + '").read())')
14-
reader_template = configuration_data()
15-
reader_template.set('reader_template', ret.stdout())
168
configure_file(
179
input : 'reader.in.f90',
1810
output : 'reader.f90',
19-
configuration : reader_template
11+
configuration : {'reader_template': fs.read('reader_template.in.f90')}
2012
)
2113

2214
configure_file(

0 commit comments

Comments
 (0)