Skip to content

Commit

Permalink
Avoid littering CMake logs with QTP0002 warnings
Browse files Browse the repository at this point in the history
It doesn't make any sense to setup and get policy when we build either
Qt or standalone tests, since the value will be ignored anyway. So
skip the policy setup for Qt builds to avoid littering the CMake logs
with QTP0002 warnings.

Amends c4debab

Change-Id: Iacae8f9ecbb6c9da2f3af77b2016454c8d4194e6
Reviewed-by: Assam Boudjelthia <[email protected]>
Reviewed-by: Tor Arne Vestbø <[email protected]>
Reviewed-by: Edward Welbourne <[email protected]>
Reviewed-by: Qt CI Bot <[email protected]>
  • Loading branch information
semlanik committed May 12, 2023
1 parent 798456c commit f71eb4a
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/corelib/Qt6AndroidMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -887,14 +887,17 @@ endfunction()
# It doesn't overwrite public properties, but instead writes formatted values to internal
# properties.
function(_qt_internal_android_format_deployment_paths target)
__qt_internal_setup_policy(QTP0002 "6.6.0"
"Target properties that specify android-specific paths may contain generator\
expressions but they must evaluate to valid JSON strings.\
Check https://doc.qt.io/qt-6/qt-cmake-policy-qtp0002.html for policy details."
)
qt6_policy(GET QTP0002 android_deployment_paths_policy)
if(QT_BUILD_STANDALONE_TESTS OR QT_BUILDING_QT OR
android_deployment_paths_policy STREQUAL "NEW")
if(QT_BUILD_STANDALONE_TESTS OR QT_BUILDING_QT)
set(android_deployment_paths_policy NEW)
else()
__qt_internal_setup_policy(QTP0002 "6.6.0"
"Target properties that specify android-specific paths may contain generator\
expressions but they must evaluate to valid JSON strings.\
Check https://doc.qt.io/qt-6/qt-cmake-policy-qtp0002.html for policy details."
)
qt6_policy(GET QTP0002 android_deployment_paths_policy)
endif()
if(android_deployment_paths_policy STREQUAL "NEW")
# When building standalone tests or Qt itself we obligate developers to not use
# windows paths when setting QT_* properties below, so their values are used as is when
# generating deployment settings.
Expand Down

0 comments on commit f71eb4a

Please sign in to comment.