[QBS] propagate compiler options

Marcel Mulder marcel.mulder at xs4all.nl
Sat Jan 10 14:41:41 CET 2015


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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20150110/5dbc782e/attachment.html>


More information about the Qbs mailing list