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

[REG 5.4.2->5.5.1] qmake -project produces incorrect HEADERS and SOURCES

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • 5.5.1, 5.6.0, 5.7.0 RC
    • Build tools: qmake
    • None
    • Windows 8.1 Pro / Windows 10 Pro with Visual Studio 2013 Pro

    Description

      When running qmake -project with the -norecursive option and manually specified subdirectories, the resulting .pro-file contains incorrect entries for HEADERS and SOURCES.

      To reproduce, extract the attached example project and run

      qmake -project -norecursive shared

      The resulting .pro files are listed here for convenience:
      Example listing (QT 5.4, valid pro-file)

      ######################################################################
      # Automatically generated by qmake (3.0) Mo Jun 6 12:27:31 2016
      ######################################################################
      
      TEMPLATE = app
      TARGET = qmake_project_test
      INCLUDEPATH += .
      
      # Input
      HEADERS += shared/TestClass.h
      SOURCES += main.cpp shared/TestClass.cpp
      

      Example listing (Qt 5.5, exactly the same command run)

      ######################################################################
      # Automatically generated by qmake (3.0) Mo Jun 6 13:10:11 2016
      ######################################################################
      
      TEMPLATE = app
      TARGET = qmake_project_test
      INCLUDEPATH += .
      
      # Input
      HEADERS += /shared/TestClass.h shared/TestClass.h
      SOURCES += main.cpp /shared/TestClass.cpp shared/TestClass.cpp
      

      As you can see, the source and header files in the subfolder 'shared' are included twice, once with a leading slash which breaks the creating of Makefiles later on.

      Attachments

        Issue Links

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

          Activity

            People

              buddenha Oswald Buddenhagen
              steinachim Achim Stein
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes