Skip to content

Commit b8054a8

Browse files
Update to latest build.zig API
zig version 0.11.0-dev.1638+7199d7c77
1 parent 7f355bd commit b8054a8

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

build.zig

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@ const Builder = @import("std").build.Builder;
22

33
pub fn build(b: *Builder) void {
44
const target = b.standardTargetOptions(.{});
5-
const mode = b.standardReleaseOptions();
5+
const optimize = b.standardOptimizeOption(.{});
66

7-
var main_tests = b.addTest("src/main.zig");
8-
main_tests.setTarget(target);
9-
main_tests.setBuildMode(mode);
7+
var main_tests = b.addTest(.{
8+
.name = "main test suite",
9+
.root_source_file = .{ .path = "src/main.zig" },
10+
.target = target,
11+
.optimize = optimize,
12+
});
1013

1114
const test_step = b.step("test", "Run library tests");
1215
test_step.dependOn(&main_tests.step);

0 commit comments

Comments
 (0)