authorgravatar for mail@linusgroh.deLinus Groh <mail@linusgroh.de> 2024-04-14 17:14:00+01:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2024-04-15 16:55:04+03:00
logd483ba725028375cb1e290f5196daed2929e6c6c
tree86e2446979dcdebbc7da231f0844b25a1976047d
parentd23a8e83d43be1f209e12744925852dbd1690163

zig init: Replace deprecated LazyPath.path with Build.path()


1 files changed, 4 insertions(+), 4 deletions(-)

lib/init/build.zig+4-4
...@@ -19,7 +19,7 @@ pub fn build(b: *std.Build) void {...@@ -19,7 +19,7 @@ pub fn build(b: *std.Build) void {
19 .name = "$",19 .name = "$",
20 // In this case the main source file is merely a path, however, in more20 // In this case the main source file is merely a path, however, in more
21 // complicated build scripts, this could be a generated file.21 // complicated build scripts, this could be a generated file.
22 .root_source_file = .{ .path = "src/root.zig" },22 .root_source_file = b.path("src/root.zig"),
23 .target = target,23 .target = target,
24 .optimize = optimize,24 .optimize = optimize,
25 });25 });
...@@ -31,7 +31,7 @@ pub fn build(b: *std.Build) void {...@@ -31,7 +31,7 @@ pub fn build(b: *std.Build) void {
3131
32 const exe = b.addExecutable(.{32 const exe = b.addExecutable(.{
33 .name = "$",33 .name = "$",
34 .root_source_file = .{ .path = "src/main.zig" },34 .root_source_file = b.path("src/main.zig"),
35 .target = target,35 .target = target,
36 .optimize = optimize,36 .optimize = optimize,
37 });37 });
...@@ -67,7 +67,7 @@ pub fn build(b: *std.Build) void {...@@ -67,7 +67,7 @@ pub fn build(b: *std.Build) void {
67 // Creates a step for unit testing. This only builds the test executable67 // Creates a step for unit testing. This only builds the test executable
68 // but does not run it.68 // but does not run it.
69 const lib_unit_tests = b.addTest(.{69 const lib_unit_tests = b.addTest(.{
70 .root_source_file = .{ .path = "src/root.zig" },70 .root_source_file = b.path("src/root.zig"),
71 .target = target,71 .target = target,
72 .optimize = optimize,72 .optimize = optimize,
73 });73 });
...@@ -75,7 +75,7 @@ pub fn build(b: *std.Build) void {...@@ -75,7 +75,7 @@ pub fn build(b: *std.Build) void {
75 const run_lib_unit_tests = b.addRunArtifact(lib_unit_tests);75 const run_lib_unit_tests = b.addRunArtifact(lib_unit_tests);
7676
77 const exe_unit_tests = b.addTest(.{77 const exe_unit_tests = b.addTest(.{
78 .root_source_file = .{ .path = "src/main.zig" },78 .root_source_file = b.path("src/main.zig"),
79 .target = target,79 .target = target,
80 .optimize = optimize,80 .optimize = optimize,
81 });81 });