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

a more elegant way to build products conditionally

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 1.2.0
    • None

      all Products should be imagined as dependencies of the containing Project(s). by adding a property which declares their "importance" (congruently to QBS-575 for Depends items), a Product's condition for building would become whether its mandatory dependencies are satisfied. this is much nicer than making bindings from the dependencies' present properties to the products' conditions.

      Product {
          // dependencies being unsatisfied breaks the build by default, ...
          importance: Recommended
          // ... but the product can be manually excluded
          //enabled: true // that's actually the default
      
          Depends {
              name: "OpenSSL"
              // absence prevents build
              importance: Mandatory
          }
          Depends {
              name: "Botan"
              // absence does not prevent build 
              importance: Suggested
          }
      }
      
      Product {
          // dependencies being unsatisfied excludes it from the build
          importance: Suggested
      
          Depends {
              name: "OpenSSL"
              // absence breaks build by default, but can be disabled
              importance: Recommended
          }
      }
      

      as an extension, it's thinkable to declare Products as Dispensable, in which case they are not built at all (by default) unless other (actually built) Products depends on them.

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

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

              Created:
              Updated:

                There are no open Gerrit changes