Hello,

I have a generic preprocessing tool that I use almost everywhere for different 
purposes.
This preprocessing tool generates the real files that are used in my products.
Now in some products there are files that require different module-properties. 
Let's assume I want to set cpp.optimization for one file.
Now the input for the preprocessor contains the right cpp.optimization while 
the preprocessed artifact doesn't have it anymore.
How can I preserve the module-properties without adding specific code for each 
possible property to the preprocessor module?

Below is an simplified example demonstrating this:

// The MyApp.qbs:
import qbs.base 1.0
Project {
    Application {
        name: "myapp"
        Depends { name: "cpp" }
        Depends { name: "preproc" }

        files: ["main.cpp.in", "example.h.in"]
        Group {
            files: ["example.cpp.in"]
            cpp.optimization: "none"
        }
    }
}

// And the preproc/module.qbs:
import qbs.base 1.0
import "helpers.js" as helpers
Module {
    FileTagger {
        pattern: "*.in"
        fileTags: "preproc_in"
   }
    Rule {
        inputs: "preproc_in"
        Artifact {
            fileName: helpers.resolveName(input)
            fileTags: helpers.resolveTags(input)
        }
        prepare: helpers.preprocCmd(product, inputs, outputs)
    }
}


Is it possible to pass the cpp.optimization to the artifact without mentioning 
it explicitely in the preproc-module?
I want this because there are multiple different modules I use, each with its 
own independent properties.

Thank you
Johannes

_______________________________________________
QBS mailing list
QBS@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs

Reply via email to