-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.zig
37 lines (32 loc) · 1.1 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
// SPDX-License-Identifier: MIT
// SPDX-FileCopyrightText: 2025 Lee Cannon <[email protected]>
const std = @import("std");
pub fn build(b: *std.Build) !void {
_ = b.addModule("bitjuggle", .{
.root_source_file = b.path("bitjuggle.zig"),
});
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const test_exe = b.addTest(.{
.root_module = b.createModule(.{
.root_source_file = b.path("bitjuggle.zig"),
.target = target,
.optimize = optimize,
}),
});
const run_test_exe = b.addRunArtifact(test_exe);
const test_step = b.step("test", "Run tests");
test_step.dependOn(&run_test_exe.step);
// check step
{
const check_test_exe = b.addTest(.{
.root_module = b.createModule(.{
.root_source_file = b.path("bitjuggle.zig"),
.target = target,
.optimize = optimize,
}),
});
const check_test_step = b.step("check", "");
check_test_step.dependOn(&check_test_exe.step);
}
}