aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/testdata/property-evaluation-context/property-evaluation-context.qbs
blob: 28216c1507c9e4a6d7718edeba5fe4eac9460968 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Project {
    qbsSearchPaths: [ path ]
    Product {
        name: "mylib"
        Export {
            Depends { name: "top" }
            top.productInExport: product.name
        }
    }

    Product {
        type: "rule-output"
        name: "myapp"
        Depends { name: "mylib" }

        Rule {
            alwaysRun: true
            multiplex: true
            requiresInputs: false
            outputFileTags: "rule-output"
            prepare: {
                var cmd = new JavaScriptCommand();
                cmd.silent = true;
                cmd.sourceCode = function() {
                    console.info("base.productInBase evaluated in: " + product.base.productInBase);
                    console.info("base.productInTop evaluated in: " + product.base.productInTop);
                    console.info("top.productInExport evaluated in: " + product.top.productInExport);
                    console.info("top.productInTop evaluated in: " + product.top.productInTop);
                }
                return [cmd];
            }
        }
    }
}