File tree Expand file tree Collapse file tree 1 file changed +21
-19
lines changed
Expand file tree Collapse file tree 1 file changed +21
-19
lines changed Original file line number Diff line number Diff line change @@ -4,26 +4,28 @@ pub fn build(b: *std.Build) void {
44 const target = b .standardTargetOptions (.{});
55 const optimize = b .standardOptimizeOption (.{});
66
7- const exe = b .addExecutable (.{
8- .name = "zigproject" ,
9- .root_source_file = b .path ("src/main.zig" ),
10- .target = target ,
11- .optimize = optimize ,
12- });
13-
14- b .installArtifact (exe );
15-
16- const run_exe = b .addRunArtifact (exe );
177 const run_step = b .step ("run" , "Run the application" );
18- run_step .dependOn (& run_exe .step );
19-
20- const unit_tests = b .addTest (.{
21- .root_source_file = b .path ("src/main.zig" ),
22- .target = target ,
23- .optimize = optimize ,
24- });
8+ {
9+ const exe = b .addExecutable (.{
10+ .name = "zigproject" ,
11+ .root_module = b .createModule (.{
12+ .root_source_file = b .path ("src/main.zig" ),
13+ .target = target ,
14+ .optimize = optimize ,
15+ }),
16+ });
17+ run_step .dependOn (& b .addRunArtifact (exe ).step );
18+ }
2519
26- const run_unit_tests = b .addRunArtifact (unit_tests );
2720 const test_step = b .step ("test" , "Run unit tests" );
28- test_step .dependOn (& run_unit_tests .step );
21+ {
22+ const unit_test = b .addTest (.{
23+ .root_module = b .createModule (.{
24+ .root_source_file = b .path ("src/main.zig" ),
25+ .target = target ,
26+ .optimize = optimize ,
27+ }),
28+ });
29+ test_step .dependOn (& b .addRunArtifact (unit_test ).step );
30+ }
2931}
You can’t perform that action at this time.
0 commit comments