| ... | @@ -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 more | 20 | // 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 { |
| 31 | | 31 | |
| 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 executable | 67 | // 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); |
| 76 | | 76 | |
| 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 | }); |