2017-12-01 10:03 GMT+01:00 Christian Kandeler <[email protected]>:

>
> In this case, do not set cpp.optimization and use cpp.cxxFlags directly.
> We've decided against allowing more values for cpp.optimization because of
> the difficulties to abstract away the differences between the platforms
> (see https://codereview.qt-project.org/#/c/183884/).
>
>
Makes sense.


> 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?

Thanks!
Ola
_______________________________________________
Qbs mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/qbs

Reply via email to