diff options
author | Alexey Edelev <alexey.edelev@qt.io> | 2021-04-12 11:34:24 +0200 |
---|---|---|
committer | Alexey Edelev <alexey.edelev@qt.io> | 2021-04-12 12:05:59 +0200 |
commit | 8194f790533fbd2c499feb1187774caab7eceb47 (patch) | |
tree | bf82183057220b5b4ddea1ecd50473962f88921d /cmake/QtProcessConfigureArgs.cmake | |
parent | 17db162949e2392a6d57eea1e09515c78e166365 (diff) |
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 856fadf85ca2a3b70878d01d32e4d4cef807b8a9
Fixes: QTBUG-92459
Change-Id: Ifd4e0ca5f549a1c7fab9ceb587ed355250c4e677
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtProcessConfigureArgs.cmake')
-rw-r--r-- | cmake/QtProcessConfigureArgs.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmake/QtProcessConfigureArgs.cmake b/cmake/QtProcessConfigureArgs.cmake index 330de3e6b3..8d4cef232b 100644 --- a/cmake/QtProcessConfigureArgs.cmake +++ b/cmake/QtProcessConfigureArgs.cmake @@ -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}") |