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

smarter treatment of include paths

    XMLWordPrintable

Details

    Description

      Modules may contribute include paths to a Product's build.
      however, with some bad luck, the addition of a path may lead to a source including a wrong header, or the wrong version of it. this is particularly likely when an external module adds a path which is shared with other modules, or a path that contains a different version of a Module which is also part of the project.

      to avoid this situation, qbs should order the include paths in a way which ensures that the right headers are found first. if such an arrangement is impossible, it should error out.

      obviously, to identify conflicts, qbs needs some "sentinels". these should be specific headers which are deemed likely (or are known) to cause conflicts, e.g. config.h and such.

      a particularly elaborate syntax would look like this:

      headers: "/opt/foolib/include//foo//{config.h,global.h}"
      

      which would be processed into:

      // this is actually added
      includePaths: [ "/opt/foolib/include", "/opt/foolib/include/foo" ]
      // _other_ include paths are checked for these
      includeSentinels: [ "config.h", "global.h", "foo/config.h", "foo/global.h" ]
      

      the second form is less magic, but also more verbose.

      Attachments

        Issue Links

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

          Activity

            People

              Unassigned Unassigned
              buddenha Oswald Buddenhagen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes