Joerg Bornemann 5280f307a8 CMake: Yield error if a feature is ENABLEd and CONDITION is false
Consider a feature that has ENABLE and CONDITION expressions. For
example, system-libb2 on a Linux machine that does not have the
libb2-dev package installed:

qt_feature("system-libb2" PRIVATE
    LABEL "Using system libb2"
    CONDITION Libb2_FOUND
    ENABLE INPUT_libb2 STREQUAL 'system'
    DISABLE INPUT_libb2 STREQUAL 'no' OR INPUT_libb2 STREQUAL 'qt'
)

If the feature is enabled by the user by setting
FEATURE_system_libb2=ON, then there's an error:
    Feature "system_libb2": Forcing to "ON" breaks its condition...

This is expected.

If the feature is enabled by the user by triggering the ENABLE condition
via the -system-libb2 configure flag (that sets INPUT_libb2 to
"system"), we did not get an error message.

This was unexpected and inconsistent.

Now, we consider features that are enabled via their ENABLE condition as
set by the user and yield an error if the CONDITION doesn't match.

Fixes: QTBUG-126144
Change-Id: I249baf9ab4f434f5a96894f4ec055f70859ffca9
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit ad227368c3ab3a9dc68208bce2d075edefe7e6e0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-12 15:53:35 +00:00
2024-02-29 15:35:57 +01:00
2024-02-02 15:23:02 +00:00
2024-04-24 19:02:09 +02:00
Description
Qt Base (Core, Gui, Widgets, Network, ...)
822 MiB
Languages
C++ 84.3%
HTML 4.9%
C 3.9%
CMake 3.6%
Objective-C++ 2%
Other 0.8%