Details
-
Task
-
Resolution: Done
-
P3: Somewhat important
-
6.2.0 Beta2
-
None
-
15117f84bb (qt/qtbase/dev) 048e783b18 (qt/qtbase/6.3) c711bf3158 (qt/qtbase/6.4) 048e783b18 (qt/tqtc-qtbase/6.3) c711bf3158 (qt/tqtc-qtbase/6.4) 5e311011ff (qt/tqtc-qtbase/6.2)
Description
If one builds qtbase with the vulkan feature disabled, configures an example against that Qt, then rebuilds the same Qt with the vulkan feature enabled and reconfigures the example project without removing the CMakeCache.txt file, CMake will show the following error:
lib/cmake/Qt6/QtFeature.cmake:1086: error: Feature vulkan is already defined to be "OFF" and should now be set to "ON" when importing features from Qt6::Gui. lib/cmake/Qt6Gui/Qt6GuiConfig.cmake:118 (qt_make_features_available) lib/cmake/Qt6/Qt6Config.cmake:127 (find_package) CMakeLists.txt:19 (find_package)
The error message is confusing, and does not tell the project builder what they can do to avoid it.
We should either improve the message to tell what the user should do (remove CMakeCache.txt) or reconsider if we need the check in the first place.
The error message was already updated once, but it's still not clear to the builder how to avoid the error. https://codereview.qt-project.org/c/qt/qtbase/+/333539