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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 6.0 (Next Major Release)
    • Fix Version/s: None
    • Component/s: Build System: CMake

      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

              Assignee:
              semlanik Alexey Edelev
              Reporter:
              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