Fix extra_keys in write_all_source_file_lists to be optional
Initially it was added as a required argument, but not all usages of
the function where adjusted, so the script failed. Make it optional.
Also change the styling of the argument to be snake cased.
Amends 8fea3ec4e7.
Change-Id: I568800401bb5af153b7bb5229f134c2f74b87468
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
bb10
parent
003e0bb8ff
commit
9231204e2c
|
|
@ -1140,9 +1140,12 @@ def write_source_file_list(cm_fh: typing.IO[str], scope, cmake_parameter: str,
|
|||
|
||||
|
||||
def write_all_source_file_lists(cm_fh: typing.IO[str], scope: Scope, header: str, *,
|
||||
indent: int = 0, footer: str = '', extraKeys: typing.List[str]):
|
||||
indent: int = 0, footer: str = '',
|
||||
extra_keys: typing.Union[typing.List[str], None] = None):
|
||||
if extra_keys is None:
|
||||
extra_keys = []
|
||||
write_source_file_list(cm_fh, scope, header,
|
||||
['SOURCES', 'HEADERS', 'OBJECTIVE_SOURCES', 'NO_PCH_SOURCES', 'FORMS'] + extraKeys,
|
||||
['SOURCES', 'HEADERS', 'OBJECTIVE_SOURCES', 'NO_PCH_SOURCES', 'FORMS'] + extra_keys,
|
||||
indent, footer=footer)
|
||||
|
||||
|
||||
|
|
@ -1700,7 +1703,7 @@ def write_example(cm_fh: typing.IO[str], scope: Scope,
|
|||
if gui:
|
||||
add_executable += ' WIN32 MACOSX_BUNDLE'
|
||||
|
||||
write_all_source_file_lists(cm_fh, scope, add_executable, indent=0, extraKeys = ['RESOURCES'])
|
||||
write_all_source_file_lists(cm_fh, scope, add_executable, indent=0, extra_keys=['RESOURCES'])
|
||||
|
||||
cm_fh.write(')\n')
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue