Fix zollections module configuration.

This commit is contained in:
Madeorsk 2024-10-11 12:06:32 +02:00
parent 85d302d522
commit 7d1c4d2cc4
Signed by: Madeorsk
GPG key ID: 677E51CA765BB79F

View file

@ -24,6 +24,13 @@ pub fn build(b: *std.Build) void {
// running `zig build`). // running `zig build`).
b.installArtifact(lib); b.installArtifact(lib);
// Add zollections module.
const zollections_module = b.addModule("zollections", .{
.root_source_file = b.path("src/root.zig"),
.target = target,
.optimize = optimize,
});
// Creates a step for unit testing. This only builds the test executable // Creates a step for unit testing. This only builds the test executable
// but does not run it. // but does not run it.
const lib_unit_tests = b.addTest(.{ const lib_unit_tests = b.addTest(.{
@ -33,7 +40,7 @@ pub fn build(b: *std.Build) void {
}); });
// Add zouter dependency. // Add zouter dependency.
lib_unit_tests.root_module.addImport("zollections", &lib.root_module); lib_unit_tests.root_module.addImport("zollections", zollections_module);
const run_lib_unit_tests = b.addRunArtifact(lib_unit_tests); const run_lib_unit_tests = b.addRunArtifact(lib_unit_tests);