diff options
author | Joerg Bornemann <joerg.bornemann@digia.com> | 2014-07-18 15:46:21 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2014-07-22 12:26:07 +0200 |
commit | 38a47ae98b37ec3b2062763f04a083e1592905f5 (patch) | |
tree | 8c19e8615c04b5822d7bc630e5aac95838f78e67 /tests | |
parent | 2d94c00ba8ffd902ffc25254a19d982ea6b0896e (diff) |
make it possible to set module properties on artifacts in outputArtifacts
Example:
outputArtifacts: {
return [{
fileTags: "blubb",
filePath: "x",
cpp: {
includePaths: "mydir"
defines: ["BLA", "BLUBB"]
}
}]
}
Task-number: QBS-646
Change-Id: I3defa656e1a5b10fe56e4bbba7c354612144552c
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Diffstat (limited to 'tests')
3 files changed, 15 insertions, 1 deletions
diff --git a/tests/auto/blackbox/testdata/dynamicRuleOutputs/after/numbers.l b/tests/auto/blackbox/testdata/dynamicRuleOutputs/after/numbers.l index b29f8798f..5c06e1258 100644 --- a/tests/auto/blackbox/testdata/dynamicRuleOutputs/after/numbers.l +++ b/tests/auto/blackbox/testdata/dynamicRuleOutputs/after/numbers.l @@ -40,6 +40,10 @@ %option noyywrap %{ +#ifndef CRUCIAL_DEFINE +# error CRUCIAL_DEFINE is missing! +#endif + /* need this for the call to atof() below */ #include <math.h> %} diff --git a/tests/auto/blackbox/testdata/dynamicRuleOutputs/before/genlexer.qbs b/tests/auto/blackbox/testdata/dynamicRuleOutputs/before/genlexer.qbs index 2c145682a..9fe553cb3 100644 --- a/tests/auto/blackbox/testdata/dynamicRuleOutputs/before/genlexer.qbs +++ b/tests/auto/blackbox/testdata/dynamicRuleOutputs/before/genlexer.qbs @@ -65,7 +65,10 @@ Project { var headerFileName = options["header-file"]; var result = [{ filePath: "GeneratedFiles/" + sourceFileName, - fileTags: ["c"] + fileTags: ["c"], + cpp: { + defines: ["CRUCIAL_DEFINE"] + } }]; if (headerFileName) { result.push({ @@ -95,6 +98,9 @@ Project { fhdr.write("// a rather empty header file\n"); fhdr.close(); } + fsrc.write("\n#ifndef CRUCIAL_DEFINE\n"); + fsrc.write("# error CRUCIAL_DEFINE is missing!\n"); + fsrc.write("#endif\n\n"); fsrc.write("int main() { return 0; }\n"); fsrc.close(); }; diff --git a/tests/auto/blackbox/testdata/dynamicRuleOutputs/before/numbers.l b/tests/auto/blackbox/testdata/dynamicRuleOutputs/before/numbers.l index 19f503562..fbc134ee7 100644 --- a/tests/auto/blackbox/testdata/dynamicRuleOutputs/before/numbers.l +++ b/tests/auto/blackbox/testdata/dynamicRuleOutputs/before/numbers.l @@ -41,6 +41,10 @@ %option outfile="numberscanner.c" header-file="numberscanner.h" %{ +#ifndef CRUCIAL_DEFINE +# error CRUCIAL_DEFINE is missing! +#endif + /* need this for the call to atof() below */ #include <math.h> %} |