diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-08-09 12:44:34 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-08-10 12:05:31 +0000 |
commit | eb2282605734152440e840777d1f8a0576e3c7a6 (patch) | |
tree | eafa50e39d987f29d79371d7b13f0fe6522c9784 | |
parent | d61820e5ab3176818b8a2326fa25d05a9f135244 (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.
Pick-to: 6.1 6.2
Change-Id: I70c26dc91394f4a14f7a26419df264a069dc7dc5
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Craig Scott <craig.scott@qt.io>
-rw-r--r-- | cmake/QtCMakeHelpers.cmake | 2 |
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) |