summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2024-02-22 01:25:17 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2024-02-22 23:10:32 +0000
commitc11d505a891c4e931830724ac1bc22c105e15d9c (patch)
treee678545850f403dfb3ffed15792b155c9a7a725a /cmake
parent50417e36dddab3fd040168dc00e61b714bad7568 (diff)
Wrap condition in _qt_internal_check_depfile_support with parentheses
The AND/OR combinations are not evaluated correctly. Wrap them with parentheses explicitly to ensure the expected evaluation order. Pick-to: 6.6 6.5 Change-Id: Ib2515ba85417b32cef3f799e0cb2c89d2c4257ab Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 7ac969e1461478974f62a46a913d6cd2b34ed80a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtPublicCMakeHelpers.cmake9
1 files changed, 6 insertions, 3 deletions
diff --git a/cmake/QtPublicCMakeHelpers.cmake b/cmake/QtPublicCMakeHelpers.cmake
index 23a10db7bc..4cf3d13391 100644
--- a/cmake/QtPublicCMakeHelpers.cmake
+++ b/cmake/QtPublicCMakeHelpers.cmake
@@ -25,10 +25,13 @@ endfunction()
# The function checks if add_custom_command has the support of the DEPFILE argument.
function(_qt_internal_check_depfile_support out_var)
if(CMAKE_GENERATOR MATCHES "Ninja" OR
- CMAKE_VERSION VERSION_GREATER_EQUAL 3.20 AND CMAKE_GENERATOR MATCHES "Makefiles"
- OR CMAKE_VERSION VERSION_GREATER_EQUAL 3.21
+ (CMAKE_VERSION VERSION_GREATER_EQUAL 3.20 AND CMAKE_GENERATOR MATCHES "Makefiles")
+ OR (CMAKE_VERSION VERSION_GREATER_EQUAL 3.21
AND (CMAKE_GENERATOR MATCHES "Xcode"
- OR CMAKE_GENERATOR MATCHES "Visual Studio ([0-9]+)" AND CMAKE_MATCH_1 GREATER_EQUAL 12))
+ OR (CMAKE_GENERATOR MATCHES "Visual Studio ([0-9]+)" AND CMAKE_MATCH_1 GREATER_EQUAL 12)
+ )
+ )
+ )
set(${out_var} TRUE)
else()
set(${out_var} FALSE)