-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.zig
44 lines (35 loc) · 1.25 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
const std = @import("std");
pub fn build(b: *std.build.Builder) void {
const target = b.standardTargetOptions(.{});
const mode = b.standardReleaseOptions();
b.installDirectory(.{
.source_dir = "lib",
.install_dir = .lib,
.install_subdir = "syncirc",
});
const compiler = b.addExecutable("syncirc", "src/main.zig");
compiler.setTarget(target);
compiler.setBuildMode(mode);
compiler.install();
const convert = b.addExecutable("convert", "src/convert.zig");
convert.setTarget(target);
convert.setBuildMode(mode);
convert.install();
const eval = b.addExecutable("eval", "src/eval.zig");
eval.setTarget(target);
eval.setBuildMode(mode);
eval.install();
const stats = b.addExecutable("stats", "src/stats.zig");
stats.setTarget(target);
stats.setBuildMode(mode);
stats.install();
const tests = b.addTest("src/test.zig");
tests.setTarget(target);
tests.setBuildMode(mode);
tests.addPackagePath("test_cases", "test/cases.zig");
tests.step.dependOn(b.getInstallStep());
const test_options = b.addOptions();
tests.addOptions("build_options", test_options);
const test_step = b.step("test", "Run tests");
test_step.dependOn(&tests.step);
}