-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.zig
29 lines (24 loc) · 896 Bytes
/
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
const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const zig_bait_tools = b.createModule(.{
.root_source_file = b.path("zig-bait-tools/zig-bait-tools.zig"),
});
const bait = b.addModule("zig-bait", .{
.root_source_file = b.path("bait.zig"),
.imports = &.{.{
.name = "zig-bait-tools",
.module = zig_bait_tools,
}},
});
const bait_test = b.addTest(.{
.root_source_file = bait.root_source_file.?,
.target = target,
.optimize = optimize,
});
bait_test.root_module.addImport("zig-bait-tools", zig_bait_tools);
const run_lib_tests = b.addRunArtifact(bait_test);
const test_step = b.step("test", "Run the library tests");
test_step.dependOn(&run_lib_tests.step);
}