In a previous change, we ensured that all INPUT_foo cache variables are unset at the end of configuration, so they don't influence feature re-evaluation in case if a command line flag like -no-gui is not specified upon second reconfiguration and a FEATURE_foo is manually toggled in the CMakeCache.txt, effectively getting rid of stale INPUT_foo values. Unfortunately that causes an issue when configuring with -no-opengl and then trying to reconfigure with 'cmake .' Specifically various feature options like ENABLE / DISABLE use INPUT_foo variables in their expressions. qt_configure_add_report_entry CONDITIONs also use them. These expect the INPUT_foo variables to be persisted, and if they are removed, the expressions might be re-evaluated to a different value, and cause re-configuration to fail or unexpectedly toggle features. To support both cases described above, instead of removing all INPUT variables when configuration ends, only unset those INPUT variables whose corresponding FEATURE_foo variable has been manually toggled in CMakeCache.txt or via an IDE. Toggling a FEATURE_foo manually is intentional, which means the INPUT_foo value should be discarded. Whereas pre-existing INPUT_bar variables will persist, thus not breaking cases like the -no-opengl report CONDITION. Amends 2799391703e44a34b6557e234462e425a61785f2 Fixes: QTBUG-116973 Task-number: QTBUG-112957 Change-Id: I5851255bfa41a9a1d116630a5d9f7b9a74aa93ed Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit d1a17d96550362b28f77a6bbff9dd15b15d40559) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Description
Languages
C++
84.3%
HTML
4.9%
C
3.9%
CMake
3.6%
Objective-C++
2%
Other
0.8%