Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-1796

Qt's MOC fails if there are 2+ files with the same name

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 2.3.1
    • Libraries: Qt
    • None

    Description

      I have the following structure:

      .
      ├── GlobalKeysImpl.cpp
      ├── GlobalKeysImpl.hpp
      ├── fake
      │   ├── Keys.cpp
      │   └── Keys.hpp
      └── macos
          ├── Keys.hpp
          └── Keys.mm
      

      The build fails with the error

      ERROR: ~/project/build/release/genmodules/Qt/ebbf654a33ba1444/modules/Qt/core/core.qbs:326:18 Conflicting instances of rule '[cpp,hpp,moc_cpp,qt.core.metatypes.in,unmocable][hpp]':
      Output artifact '~/project/build/release/lib-globalkeys.2b19d184/qt.headers/moc_Keys.cpp' is to be produced from input artifacts '~/project/libs/globalkeys/src/macos/Keys.hpp' and '~/project/libs/globalkeys/src/fake/Keys.hpp', but the rule is not a multiplex rule.
      

      because the Rule for moc does not respect the fact that the files are in different subfolders.

      Attachments

        Issue Links

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

          Activity

            People

              Unassigned Unassigned
              gooroo Serhii Olendarenko
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes