diff options
Diffstat (limited to 'examples/create_process/build.zig')
-rw-r--r-- | examples/create_process/build.zig | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/examples/create_process/build.zig b/examples/create_process/build.zig index b358a37..a52bd17 100644 --- a/examples/create_process/build.zig +++ b/examples/create_process/build.zig @@ -25,24 +25,24 @@ pub fn build(b: *std.Build) void { // set a preferred release mode, allowing the user to decide how to optimize. const optimize = b.standardOptimizeOption(.{}); - const exe = b.addExecutable(.{ - .name = "create_process", - .root_source_file = b.path("src/main.zig"), - .target = target, - .optimize = optimize, - }); const exe2 = b.addExecutable(.{ .name = "program2", .root_source_file = b.path("src/main2.zig"), .target = target, .optimize = optimize, }); + const exe = b.addExecutable(.{ + .name = "create_process", + .root_source_file = b.path("src/main.zig"), + .target = target, + .optimize = optimize, + }); // This declares intent for the executable to be installed into the // standard location when the user invokes the "install" step (the default // step when running `zig build`). - b.installArtifact(exe); b.installArtifact(exe2); + b.installArtifact(exe); // This *creates* a Run step in the build graph, to be executed when another // step is evaluated that depends on it. The next line below will establish @@ -69,24 +69,24 @@ pub fn build(b: *std.Build) void { // Creates a step for unit testing. This only builds the test executable // but does not run it. - const exe_unit_tests = b.addTest(.{ - .root_source_file = b.path("src/main.zig"), + const exe2_unit_tests = b.addTest(.{ + .root_source_file = b.path("src/main2.zig"), .target = target, .optimize = optimize, }); - const exe2_unit_tests = b.addTest(.{ - .root_source_file = b.path("src/main2.zig"), + const exe_unit_tests = b.addTest(.{ + .root_source_file = b.path("src/main.zig"), .target = target, .optimize = optimize, }); - const run_exe_unit_tests = b.addRunArtifact(exe_unit_tests); const run_exe2_unit_tests = b.addRunArtifact(exe2_unit_tests); + const run_exe_unit_tests = b.addRunArtifact(exe_unit_tests); // Similar to creating the run step earlier, this exposes a `test` step to // the `zig build --help` menu, providing a way for the user to request // running the unit tests. const test_step = b.step("test", "Run unit tests"); - test_step.dependOn(&run_exe_unit_tests.step); test_step.dependOn(&run_exe2_unit_tests.step); + test_step.dependOn(&run_exe_unit_tests.step); } |