[QBS] propagate compiler options
Dmitry Volosnykh
dmitry.volosnykh at gmail.com
Sat Jan 10 19:28:22 CET 2015
This is not direct answer to your question (it is not a propagation), but
at least you'll be able to define options in one place and re-use them in
several places.
As far as I remember from QtCreator's sources, common options are moved
into a separate .js file which is then imported into every product. Define
functions that return desired values and just call them where appropriate.
On Sat, Jan 10, 2015 at 4:41 PM, Marcel Mulder <marcel.mulder at xs4all.nl>
wrote:
> Hi All,
>
> How can I propagate compiler options to referenced projects?
> For example:
>
> Project {
>
> references: [
>
> "kernel/kernel.qbs"
>
> ]
>
>
> Product{
>
> type: "application"
>
> name: “example"
>
>
> Depends { name: "cpp" }
>
> Depends { name: "kernel" }
>
>
> cpp.defines: [“THUMB" ]
>
> cpp.warningLevel: "all"
>
> cpp.treatWarningsAsErrors: true
>
> cpp.positionIndependentCode: false
>
> cpp.commonCompilerFlags: [
>
> "-mcpu=cortex-m4","-mthumb","-mabi=aapcs","-mfloat-abi=hard","-mfpu=fpv4-sp-d16",
>
> "-std=gnu99","-flto","-fno-builtin",
>
> "-fdata-sections","-ffunction-sections",
>
> ]
>
> cpp.includePaths: [ "." ]
>
> files: [ “main.c" ]
>
>
> }
>
> }
>
>
> I want the source files in kernel.qbs to be compiled with the same
> compiler options as in the example product. How can I do that?
>
> Regards, Marcel
>
>
>
> _______________________________________________
> QBS mailing list
> QBS at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qbs
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20150110/9f9c3654/attachment.html>
More information about the Qbs
mailing list