Ensure optional_arg is reset in qt_internal_add_global_definition

Othewise there is a risk that variable is taken from other scopes.
(Random finding).

Pick-to: 6.5 6.8 6.9
Change-Id: I2517adec5d82639e95ac2758633109413811cf9a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Alexey Edelev 2025-02-27 17:29:50 +01:00
parent d28881fa33
commit 6685da4ec9

View File

@ -136,7 +136,7 @@ endfunction()
# APP - set the definition for all Qt applications
# TODO: Add a tests specific platform target and the definition scope for it.
function(qt_internal_add_global_definition definition)
set(optional_args)
set(optional_args "")
set(single_value_args VALUE)
set(multi_value_args SCOPE)
cmake_parse_arguments(arg