Skip to content

Commit

Permalink
Fix writing single strings in env2mfile.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpakkane committed Nov 22, 2022
1 parent 3ae89a7 commit fd43842
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mesonbuild/scripts/env2mfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def write_args_line(ofile: T.TextIO, name: str, args: T.Union[str, T.List[str]])
if len(args) == 0:
return
if isinstance(args, str):
ostr = "'" + args + "'"
ostr = name + "= '" + args + "'\n"
else:
ostr = name + ' = ['
ostr += ', '.join("'" + i + "'" for i in args)
Expand Down Expand Up @@ -244,6 +244,7 @@ def write_machine_file(infos: MachineInfo, ofilename: str, write_system_info: bo
ofile.write('[cmake]\n\n')
for k, v in infos.cmake.items():
write_args_line(ofile, k, v)
ofile.write('\n')

if write_system_info:
ofile.write('[host_machine]\n')
Expand Down

0 comments on commit fd43842

Please sign in to comment.