summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2021-08-09 12:44:34 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-08-10 12:58:17 +0000
commit09838d9cbd3f5c4c6f38bbd7a889d63e0226beeb (patch)
tree1d9d920920a43c0c1a9e24181d7828f9962fbdba /cmake
parent2c5de457813124d312858628fe7b9d46c827cf16 (diff)
CMake: Fix build with CMake master / 3.22
CMake master / 3.22 introduced a behavior change in how conditions are evaluated in the while command. It is now consistent with how if() evaluates conditions. This caused an issue in Qt code where a "(" opening parenthesis was evaluated as part of the condition rather than as a string. Fix this by wrapping the evaluation of the variable in quotes. Change-Id: I70c26dc91394f4a14f7a26419df264a069dc7dc5 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Craig Scott <craig.scott@qt.io> (cherry picked from commit eb2282605734152440e840777d1f8a0576e3c7a6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtCMakeHelpers.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/QtCMakeHelpers.cmake b/cmake/QtCMakeHelpers.cmake
index f9b03d628c..356c8ce357 100644
--- a/cmake/QtCMakeHelpers.cmake
+++ b/cmake/QtCMakeHelpers.cmake
@@ -137,7 +137,7 @@ function(qt_remove_args out_var)
endif()
list(GET result ${find_result} arg_current)
# remove values until we hit another arg or the end of the list
- while(NOT ${arg_current} IN_LIST arg_ALL_ARGS AND find_result LESS result_len)
+ while(NOT "${arg_current}" IN_LIST arg_ALL_ARGS AND find_result LESS result_len)
list(REMOVE_AT result ${find_result})
list(LENGTH result result_len)
if (NOT find_result EQUAL result_len)