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 Change-Id: I1a701c681f5af5e665601972687024ce734aa014 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 6f475a05a1a035b07ed66f93aa92d0e8b2396047) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
eb208a6bb5
commit
9c04794cd8
@ -645,13 +645,13 @@ function(_qt_internal_forward_function_args)
|
||||
endforeach()
|
||||
|
||||
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}}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
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}})
|
||||
endif()
|
||||
endforeach()
|
||||
|
Loading…
x
Reference in New Issue
Block a user