On Fri, 1 Dec 2017 12:12:16 +0100 Ola Røer Thorsen <[email protected]> wrote:
> 2017-12-01 10:03 GMT+01:00 Christian Kandeler <[email protected]>: > > Inheritance is one possibility. Another one is a project-specific module. > > For instance: > > > > // <project dir>/modules/myprojectsettings/myprojectsettings.qbs > > Module { > > // ... > > Properties { > > condition: qbs.buildVariant === "release" && > > qbs.toolchain.contains("gcc") > > cpp.cxxFlags: ["-ffast-math", "-O3"] > > } > > } > > > > // someproduct.qbs > > Product { > > // ... > > Depends { name: "myprojectsettings" } > > } > > > > > I quite like the module-solution. I'll have to include the Depends-item in > every product file, right? Yes, but you can combine this with inheritance and add the dependency in the base item. The advantage to a purely inheritance-based approach is that you can have different base items that share these settings without duplication (except for the dependency on the module). Christian _______________________________________________ Qbs mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/qbs
