[QBS] Merging exported cpp properties

Ilya Lyubimov villytiger at gmail.com
Mon Jul 13 18:10:28 CEST 2015


I found that new version of qbs now merges identical compiler flags in
dependent products. This removes duplicated flags, but unfortunately
it doesn't work properly for flags consisting of two strings, for
example "-arch i386 -arch x86_64" becomes "-arch i386 x86_64". This
behaviour was introduced in 16404c356b0e160243de315c48975a82cc343893.

I can fix it locally by removing "lst.removeDuplicates();" from
insertExportedModuleProperties function in projectresolver.cpp. But I
don't know the proper way for solving this issue.

Here is the minimal example:

import qbs 1.0

Project {
    CppApplication {
        name: "prod1"
        files: ["*.cpp"]
        Depends { name: "cpp" }
        Depends { name: "prod2" }
        cpp.commonCompilerFlags: ["-arch", "i386", "-arch", "x86_64"]

    Product {
        name: "prod2"
        Export {
            Depends { name: "cpp" }

С уважением, / Best regards
Любимов Илья / Ilya Lyubimov

More information about the Qbs mailing list