zig-examples/zig-matrix/build.zig

27 lines
672 B
Zig

const std = @import("std");
pub fn build(b: *std.Build) void {
const exe = b.addExecutable(.{
.name = "zig-matrix",
.root_source_file = b.path("src/main.zig"),
.target = b.host,
});
b.installArtifact(exe);
const run_exe = b.addRunArtifact(exe);
const run_step = b.step("run", "Run the application");
run_step.dependOn(&run_exe.step);
const unit_tests = b.addTest(.{
.root_source_file = b.path("src/main.zig"),
.target = b.host,
});
const test_step = b.step("test", "Run unit tests");
const run_unit_tests = b.addRunArtifact(unit_tests);
test_step.dependOn(&run_unit_tests.step);
}