This repository has been archived on 2026-07-20. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
files/build.zig
T
2026-07-04 20:44:28 +02:00

27 lines
845 B
Zig

const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const exe = b.addExecutable(.{
.name = "files",
.root_module = b.createModule(.{
.root_source_file = b.path("files.zig"),
.target = target,
.optimize = optimize,
}),
});
b.installArtifact(exe);
const run_cmd = b.addRunArtifact(exe);
run_cmd.step.dependOn(b.getInstallStep());
if (b.args) |args| run_cmd.addArgs(args);
b.step("run", "Run files").dependOn(&run_cmd.step);
const smoke = b.addSystemCommand(&.{ "sh", "tests/files-smoke.sh" });
smoke.setCwd(b.path("."));
smoke.step.dependOn(b.getInstallStep());
b.step("test", "Run POSIX smoke tests").dependOn(&smoke.step);
}