Skip to content

Commit

Permalink
[Nothing]: Update build.zig (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
jinzhongjia authored May 4, 2024
1 parent ff8bb0a commit e534a32
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
6 changes: 2 additions & 4 deletions build_12.zig
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ pub fn build(b: *std.Build) void {
const optimize = b.standardOptimizeOption(.{});

const msgpack = b.addModule("msgpack", .{
.root_source_file = .{
.path = "src/msgpack.zig",
},
.root_source_file = b.path("src/msgpack.zig"),
});

const test_step = b.step("test", "Run unit tests");

const msgpack_unit_tests = b.addTest(.{
.root_source_file = .{ .path = "src/msgpack_unit_test.zig" },
.root_source_file = b.path("src/msgpack_unit_test.zig"),
.target = target,
.optimize = optimize,
});
Expand Down
10 changes: 3 additions & 7 deletions build_13.zig
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,15 @@ pub fn build(b: *std.Build) void {
const optimize = b.standardOptimizeOption(.{});

const msgpack = b.addModule("msgpack", .{
.root_source_file = .{
.path = "src/msgpack.zig",
},
.root_source_file = b.path("src/msgpack.zig"),
});

generateDocs(b, optimize, target);

const test_step = b.step("test", "Run unit tests");

const msgpack_unit_tests = b.addTest(.{
.root_source_file = .{ .path = "src/msgpack_unit_test.zig" },
.root_source_file = b.path("src/msgpack_unit_test.zig"),
.target = target,
.optimize = optimize,
});
Expand All @@ -30,9 +28,7 @@ pub fn build(b: *std.Build) void {
fn generateDocs(b: *Build, optimize: OptimizeMode, target: Build.ResolvedTarget) void {
const lib = b.addObject(.{
.name = "zig-msgpack",
.root_source_file = .{
.path = "src/msgpack.zig",
},
.root_source_file = b.path("src/msgpack.zig"),
.target = target,
.optimize = optimize,
});
Expand Down

0 comments on commit e534a32

Please sign in to comment.