@@ -15,18 +15,22 @@ pub fn build(b: *std.Build) void {
1515
1616 const unit_test_step = b .step ("unit-test" , "Run only the unit tests" );
1717 const unit_tests = b .addTest (.{
18- .root_source_file = b .path ("src/root.zig" ),
19- .target = target ,
20- .optimize = optimize ,
18+ .root_module = b .createModule (.{
19+ .root_source_file = b .path ("src/root.zig" ),
20+ .target = target ,
21+ .optimize = optimize ,
22+ }),
2123 });
2224 const run_unit_tests = b .addRunArtifact (unit_tests );
2325 unit_test_step .dependOn (& run_unit_tests .step );
2426
2527 const integration_test_step = b .step ("integration-test" , "Run only the integration tests" );
2628 const integration_tests = b .addTest (.{
27- .root_source_file = b .path ("tests/root.zig" ),
28- .target = target ,
29- .optimize = optimize ,
29+ .root_module = b .createModule (.{
30+ .root_source_file = b .path ("tests/root.zig" ),
31+ .target = target ,
32+ .optimize = optimize ,
33+ }),
3034 });
3135 integration_tests .root_module .addImport ("csscolorparser" , csscolorparser_mod );
3236 const run_integration_tests = b .addRunArtifact (integration_tests );
@@ -39,9 +43,11 @@ pub fn build(b: *std.Build) void {
3943 const doc_step = b .step ("doc" , "Build the package documentation" );
4044 const doc_obj = b .addObject (.{
4145 .name = "csscolorparser" ,
42- .root_source_file = b .path ("src/root.zig" ),
43- .target = target ,
44- .optimize = optimize ,
46+ .root_module = b .createModule (.{
47+ .root_source_file = b .path ("src/root.zig" ),
48+ .target = target ,
49+ .optimize = optimize ,
50+ }),
4551 });
4652 const install_doc = b .addInstallDirectory (.{
4753 .source_dir = doc_obj .getEmittedDocs (),
@@ -55,9 +61,11 @@ pub fn build(b: *std.Build) void {
5561 inline for (example_names ) | example_name | {
5662 const example = b .addExecutable (.{
5763 .name = example_name ,
58- .root_source_file = b .path ("examples/" ++ example_name ++ ".zig" ),
59- .target = target ,
60- .optimize = optimize ,
64+ .root_module = b .createModule (.{
65+ .root_source_file = b .path ("examples/" ++ example_name ++ ".zig" ),
66+ .target = target ,
67+ .optimize = optimize ,
68+ }),
6169 });
6270 example .root_module .addImport ("csscolorparser" , csscolorparser_mod );
6371 const install_example = b .addInstallArtifact (example , .{});
0 commit comments