Merge pull request #341 from leecannon/patch-1
Update to new std.build changes
This commit is contained in:
commit
66d629f3f2
@ -15,7 +15,7 @@ pub fn build(b: *std.build.Builder) !void {
|
||||
b.option([]const u8, "data_version", "The data version - 0.7.0, 0.7.1 or master.") orelse "master",
|
||||
);
|
||||
|
||||
exe.addPackage(.{ .name = "known-folders", .path = "src/known-folders/known-folders.zig" });
|
||||
exe.addPackage(.{ .name = "known-folders", .path = .{ .path = "src/known-folders/known-folders.zig" } });
|
||||
|
||||
exe.setTarget(target);
|
||||
exe.setBuildMode(mode);
|
||||
@ -31,7 +31,7 @@ pub fn build(b: *std.build.Builder) !void {
|
||||
test_step.dependOn(&unit_tests.step);
|
||||
|
||||
var session_tests = b.addTest("tests/sessions.zig");
|
||||
session_tests.addPackage(.{ .name = "header", .path = "src/header.zig" });
|
||||
session_tests.addPackage(.{ .name = "header", .path = .{ .path = "src/header.zig" } });
|
||||
session_tests.setBuildMode(.Debug);
|
||||
test_step.dependOn(&session_tests.step);
|
||||
}
|
||||
|
@ -52,7 +52,11 @@ fn processStep(stdout_stream: anytype, step: *std.build.Step) anyerror!void {
|
||||
}
|
||||
|
||||
fn processPackage(out_stream: anytype, pkg: Pkg) anyerror!void {
|
||||
try out_stream.print("{s}\x00{s}\n", .{ pkg.name, pkg.path });
|
||||
switch (pkg.path) {
|
||||
.path => |path| try out_stream.print("{s}\x00{s}\n", .{ pkg.name, path }),
|
||||
.generated => |generated| try out_stream.print("{s}\x00{s}\n", .{ pkg.name, generated.getPath() }),
|
||||
}
|
||||
|
||||
if (pkg.dependencies) |dependencies| {
|
||||
for (dependencies) |dep| {
|
||||
try processPackage(out_stream, dep);
|
||||
|
Loading…
Reference in New Issue
Block a user