-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild.zig
54 lines (40 loc) · 1.61 KB
/
build.zig
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
const Builder = @import("std").build.Builder;
pub fn build(b: *Builder) void {
const mode = b.standardReleaseOptions();
const exe = b.addExecutable("pbui", "src/main.zig");
exe.setBuildMode(mode);
exe.install();
const run_cmd = exe.run();
run_cmd.step.dependOn(b.getInstallStep());
const run_step = b.step("run", "Execute PBUI");
var main_tests = b.addTest("src/main.zig");
main_tests.setBuildMode(mode);
var shuf_tests = b.addTest("src/shuf.zig");
shuf_tests.setBuildMode(mode);
var basename_tests = b.addTest("src/basename.zig");
basename_tests.setBuildMode(mode);
var du_tests = b.addTest("src/du.zig");
du_tests.setBuildMode(mode);
var false_tests = b.addTest("src/false.zig");
false_tests.setBuildMode(mode);
var mkdir_tests = b.addTest("src/mkdir.zig");
mkdir_tests.setBuildMode(mode);
var rm_tests = b.addTest("src/rm.zig");
rm_tests.setBuildMode(mode);
var sha1_tests = b.addTest("src/sha1.zig");
sha1_tests.setBuildMode(mode);
var sort_tests = b.addTest("src/sort.zig");
sort_tests.setBuildMode(mode);
var pwd_tests = b.addTest("src/pwd.zig");
pwd_tests.setBuildMode(mode);
const test_step = b.step("test", "Run library tests");
test_step.dependOn(&main_tests.step);
test_step.dependOn(&shuf_tests.step);
test_step.dependOn(&basename_tests.step);
test_step.dependOn(&false_tests.step);
test_step.dependOn(&mkdir_tests.step);
test_step.dependOn(&rm_tests.step);
test_step.dependOn(&sha1_tests.step);
test_step.dependOn(&sort_tests.step);
test_step.dependOn(&pwd_tests.step);
}