summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2021-03-16 16:59:34 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2021-03-23 11:01:14 +0100
commitdf8e1c8e588cb0529b2bc02faef1022ef3f29145 (patch)
tree3b88f47f610807f81712408e6908dd2bb73f00ef /cmake
parent47abdbea81bbfbdb32cf0f53f6b8c42ada4b8bba (diff)
cmake: Handle arbitrary configure arguments that contain lists
Passing e.g. -- -DQT_BUILD_SUBMODULES="qtbase;qtdeclarative" to configure would fail because the module list was not preserved as a single argument. Change-Id: If685d0d541201597a2c2a5dc3d55b5d1ae51da22 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtProcessConfigureArgs.cmake6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmake/QtProcessConfigureArgs.cmake b/cmake/QtProcessConfigureArgs.cmake
index 08b1351fcf..6410fc3027 100644
--- a/cmake/QtProcessConfigureArgs.cmake
+++ b/cmake/QtProcessConfigureArgs.cmake
@@ -82,8 +82,10 @@ while(NOT "${configure_args}" STREQUAL "")
elseif(arg MATCHES "^-host.*dir")
message(FATAL_ERROR "${arg} is not supported anymore.")
elseif(arg STREQUAL "--")
- # Everything after this argument will be passed to CMake verbatim.
- push(${configure_args})
+ # Everything after this argument will be passed to CMake verbatim,
+ # but we need to escape semi-colons so that lists are preserved.
+ string(REPLACE ";" "\\;" configure_args "${configure_args}")
+ list(APPEND cmake_args "${configure_args}")
break()
else()
set_property(GLOBAL APPEND PROPERTY UNHANDLED_ARGS "${arg}")