Use bracket-based escaping for all list arguments in a configure string
The 'list(TRANSFORM cmake_args REPLACE "\\[\\[;\\]\\]" "\\\\;")' call
breaks the list arguments added when evaluating the 'INPUT_' values.
Therefore, it's necessary to apply bracket-based escaping to all list
arguments instead of the standard escaping.
Amends 856fadf85c
Fixes: QTBUG-92459
Change-Id: Ifd4e0ca5f549a1c7fab9ceb587ed355250c4e677
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
17db162949
commit
8194f79053
@ -596,7 +596,7 @@ endmacro()
|
||||
|
||||
macro(translate_list_input name cmake_var)
|
||||
if(DEFINED INPUT_${name})
|
||||
list(JOIN INPUT_${name} "\\;" value)
|
||||
list(JOIN INPUT_${name} "[[;]]" value)
|
||||
list(APPEND cmake_args "-D${cmake_var}=${value}")
|
||||
drop_input(${name})
|
||||
endif()
|
||||
@ -763,7 +763,7 @@ if(nr_of_build_configs EQUAL 1)
|
||||
push("-DCMAKE_BUILD_TYPE=${build_configs}")
|
||||
elseif(nr_of_build_configs GREATER 1)
|
||||
set(multi_config ON)
|
||||
string(REPLACE ";" "\\;" escaped_build_configs "${build_configs}")
|
||||
string(REPLACE ";" "[[;]]" escaped_build_configs "${build_configs}")
|
||||
# We must not use the push macro here to avoid variable expansion.
|
||||
# That would destroy our escaping.
|
||||
list(APPEND cmake_args "-DCMAKE_CONFIGURATION_TYPES=${escaped_build_configs}")
|
||||
|
Loading…
Reference in New Issue
Block a user