CMake: Fix forwarding the '0' argument which is by default falsey
If the forward argument was meant to be 0, it was not forwarded because it evaluated to false in if(condition). To pass it along, instead check for empty strings. Change-Id: Ia366df147de0c2d333017da43dc0643b56a89e9c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 96abceb64e5dc0570ca7c3419f401cfafe946ba0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
b1481a1663
commit
e83de10922
@ -641,13 +641,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(${arg_FORWARD_PREFIX}_${option_name})
|
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(${arg_FORWARD_PREFIX}_${option_name})
|
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