diff options
author | Christian Kandeler <christian.kandeler@digia.com> | 2014-05-22 12:02:12 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@digia.com> | 2014-07-02 16:46:11 +0200 |
commit | e264281c4810bb0afb07e8f590fc31e504d5e4d0 (patch) | |
tree | 1bf8a9f0aaf1f6734e4acf53003a681048156efd /tests/auto/api/testdata | |
parent | 9297ea217284e2279f2d4471b3f8fc754dc5fe71 (diff) |
Make it possible to set profiles per product.
Use case 1: Build product A for architecture X and product B
for architecture Y (e.g. host tools vs target libraries).
Use case 2: Build product A for architectures X and Y and
product B only for architecture X (e.g. Android
multi-arch packages).
Change-Id: I2eb721c37cdd12c298ee12bad60e21e94b04676b
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'tests/auto/api/testdata')
-rw-r--r-- | tests/auto/api/testdata/multi-arch/host+target.input | 0 | ||||
-rw-r--r-- | tests/auto/api/testdata/multi-arch/host-tool.input | 0 | ||||
-rw-r--r-- | tests/auto/api/testdata/multi-arch/project.qbs | 44 |
3 files changed, 44 insertions, 0 deletions
diff --git a/tests/auto/api/testdata/multi-arch/host+target.input b/tests/auto/api/testdata/multi-arch/host+target.input new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/auto/api/testdata/multi-arch/host+target.input diff --git a/tests/auto/api/testdata/multi-arch/host-tool.input b/tests/auto/api/testdata/multi-arch/host-tool.input new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/auto/api/testdata/multi-arch/host-tool.input diff --git a/tests/auto/api/testdata/multi-arch/project.qbs b/tests/auto/api/testdata/multi-arch/project.qbs new file mode 100644 index 000000000..1d8221b97 --- /dev/null +++ b/tests/auto/api/testdata/multi-arch/project.qbs @@ -0,0 +1,44 @@ +import qbs +import qbs.FileInfo +import qbs.TextFile + +Project { + property string hostProfile + property string targetProfile + Product { + name: "p1" + type: "output" + profiles: [project.targetProfile, project.hostProfile] + Group { + files: "host+target.input" + fileTags: "input" + } + } + Product { + name: "p2" + type: "output" + profiles: project.hostProfile + Group { + files: "host-tool.input" + fileTags: "input" + } + } + + Rule { + inputs: "input" + Artifact { + fileName: FileInfo.baseName(input.fileName) + ".output" + fileTags: "output" + } + prepare: { + var cmd = new JavaScriptCommand(); + cmd.description = "generating " + output.fileName; + cmd.sourceCode = function() { + var file = new TextFile(output.filePath, TextFile.WriteOnly); + file.write(product.moduleProperty("qbs", "architecture")); + file.close(); + } + return cmd; + } + } +} |