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

QtModuleHelpers.cmake: Condition is ignored when adding header

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P3: Somewhat important
    • None
    • 6.6
    • Build System: CMake
    • None

    Description

      Building qtbase I see the following warning:
       

      CMake Warning (dev) at cmake/QtModuleHelpers.cmake:1320 (message): 
       Condition is ignored when adding the following header file(s) to the Gui                                                                    
       module:                   
                                                   
       File:                                                                
           src/gui/accessible/qaccessible.h                                                                
       Condition:                                                         
           QT_FEATURE_accessibility                                                         
       File:                                                  
           src/gui/accessible/qplatformaccessibility.h                                                       
       Condition:                                                          
           QT_FEATURE_accessibility                                 
                               
       The usage of the file(s) is not properly isolated in this or other modules according to the condition. This warning is for the Qt maintainers. Please make sure that file include(s) are guarded with the appropriate macros in the Qt code.  If files should be added to the module unconditionally, please move them to the common SOURCES section in the qt_internal_add_module call. 
                                    
      Call Stack (most recent call first):         
       cmake/QtModuleHelpers.cmake:893 (qt_internal_collect_module_headers)  cmake/QtScopeFinalizerHelpers.cmake:24:EVAL:1 (qt_finalize_module)                           
       src/gui/CMakeLists.txt:DEFERRED
                             
      This warning is for project developers.  Use -Wno-dev to suppress it.
      

      From src/gui/CMakeLists.txt:

      qt_internal_extend_target(Gui CONDITION QT_FEATURE_accessibility
          CONDITION_INDEPENDENT_SOURCES
              accessible/qaccessible.h accessible/qplatformaccessibility.h
          SOURCES
      

      And in src/gui/accessible/qaccessible.h:

      #if QT_CONFIG(accessibility)
      

      Attachments

        Issue Links

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

          Activity

            People

              qtbuildsystem Qt Build System Team
              ahmad.samir Ahmad Samir
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes