mach: add compile-only step for examples and shaderexp
These steps will only compile and install the applications but not run it. To be used as ``zig build example-*`` and ``zig build shaderexp`` respectively, i.e without the run prefix.
This commit is contained in:
parent
8d067b62c2
commit
4fad3b93d2
1 changed files with 6 additions and 0 deletions
|
|
@ -61,6 +61,9 @@ pub fn build(b: *std.build.Builder) void {
|
||||||
example_app.link(options);
|
example_app.link(options);
|
||||||
example_app.install();
|
example_app.install();
|
||||||
|
|
||||||
|
const example_compile_step = b.step("example-" ++ example.name, "Compile the example");
|
||||||
|
example_compile_step.dependOn(&example_app.getInstallStep().?.step);
|
||||||
|
|
||||||
if (target.toTarget().cpu.arch != .wasm32) {
|
if (target.toTarget().cpu.arch != .wasm32) {
|
||||||
const example_run_cmd = example_app.run();
|
const example_run_cmd = example_app.run();
|
||||||
example_run_cmd.step.dependOn(&example_app.getInstallStep().?.step);
|
example_run_cmd.step.dependOn(&example_app.getInstallStep().?.step);
|
||||||
|
|
@ -83,6 +86,9 @@ pub fn build(b: *std.build.Builder) void {
|
||||||
shaderexp_app.link(options);
|
shaderexp_app.link(options);
|
||||||
shaderexp_app.install();
|
shaderexp_app.install();
|
||||||
|
|
||||||
|
const shaderexp_compile_step = b.step("shaderexp", "Compile shaderexp");
|
||||||
|
shaderexp_compile_step.dependOn(&shaderexp_app.getInstallStep().?.step);
|
||||||
|
|
||||||
const shaderexp_run_cmd = shaderexp_app.run();
|
const shaderexp_run_cmd = shaderexp_app.run();
|
||||||
shaderexp_run_cmd.step.dependOn(&shaderexp_app.getInstallStep().?.step);
|
shaderexp_run_cmd.step.dependOn(&shaderexp_app.getInstallStep().?.step);
|
||||||
const shaderexp_run_step = b.step("run-shaderexp", "Run shaderexp");
|
const shaderexp_run_step = b.step("run-shaderexp", "Run shaderexp");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue