CMake: Fix _qt_internal_forward_function_args to evaluate its args
We were comparing the variable name of single and multi arg options, rather than the value. This accidentally worked when the variables were set, but forwarding empty values if the variables were not set. Explicitly evaluate the variable values to compare them against the empty string. Amends 96abceb64e5dc0570ca7c3419f401cfafe946ba0 Pick-to: 6.8 Change-Id: I1a701c681f5af5e665601972687024ce734aa014 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This commit is contained in:
parent
08c6de0c5d
commit
6f475a05a1
@ -645,13 +645,13 @@ function(_qt_internal_forward_function_args)
|
|||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
foreach(option_name IN LISTS arg_FORWARD_SINGLE)
|
foreach(option_name IN LISTS arg_FORWARD_SINGLE)
|
||||||
if(NOT "${arg_FORWARD_PREFIX}_${option_name}" STREQUAL "")
|
if(NOT "${${arg_FORWARD_PREFIX}_${option_name}}" STREQUAL "")
|
||||||
list(APPEND forward_args "${option_name}" "${${arg_FORWARD_PREFIX}_${option_name}}")
|
list(APPEND forward_args "${option_name}" "${${arg_FORWARD_PREFIX}_${option_name}}")
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
foreach(option_name IN LISTS arg_FORWARD_MULTI)
|
foreach(option_name IN LISTS arg_FORWARD_MULTI)
|
||||||
if(NOT "${arg_FORWARD_PREFIX}_${option_name}" STREQUAL "")
|
if(NOT "${${arg_FORWARD_PREFIX}_${option_name}}" STREQUAL "")
|
||||||
list(APPEND forward_args "${option_name}" ${${arg_FORWARD_PREFIX}_${option_name}})
|
list(APPEND forward_args "${option_name}" ${${arg_FORWARD_PREFIX}_${option_name}})
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user