summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2021-04-12 11:34:24 +0200
committerAlexey Edelev <alexey.edelev@qt.io>2021-04-12 12:05:59 +0200
commit8194f790533fbd2c499feb1187774caab7eceb47 (patch)
treebf82183057220b5b4ddea1ecd50473962f88921d /cmake
parent17db162949e2392a6d57eea1e09515c78e166365 (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')
-rw-r--r--cmake/QtProcessConfigureArgs.cmake4
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}")