Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-87755

qt_feature_evaluate(feature) should perhaps take into account -DINPUT_feature automatically

    XMLWordPrintable

Details

    Description

      In mkspecs/features/qt_configure.prf there's

      defineReplace(qtIsFeatureEnabled) {
          enable = $$eval($${currentConfig}.features.$${1}.enable)
          !isEmpty(enable) {
              $$qtConfEvaluate($$enable): \
                  return(true)
          } else {
              equals(config.input.$${1}, "yes"): \
                  return(true)
          }
      
          return(false)
      }
      

      so if input.foo is set to true, feature foo will be considered enabled.

      This happens for qmake's 'xcb-native-painting' command line switch which basically sets input.xcb-native-painting=yes, thus enabling the feature.

      We are currently lacking this in CMake feature system.
      If a user uses the configure script and passes -xcb-native-painting, that will be translated by the script to -DFEATURE_xcb_native_painting=ON

      But if a user uses cmake directly, and passes -DINPUT_xcb_native_painting=ON, that will be ignored. If we want parity with qmake, we should consider implementing the same behavior at CMake feature level.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              semlanik Alexey Edelev
              alexandru.croitor Alexandru Croitor
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes