Tweak build
This commit is contained in:
@@ -13,7 +13,6 @@ pub fn build(b: *std.Build) void {
|
||||
.name = "zig_squashfs",
|
||||
.root_module = lib_mod,
|
||||
});
|
||||
b.installArtifact(lib);
|
||||
const exe_mod = b.createModule(.{
|
||||
.root_source_file = b.path("src/main.zig"),
|
||||
.target = target,
|
||||
@@ -21,14 +20,20 @@ pub fn build(b: *std.Build) void {
|
||||
});
|
||||
const exe = b.addExecutable(.{
|
||||
.linkage = .static,
|
||||
.name = "unsquashfs",
|
||||
.name = "zig-unsquashfs",
|
||||
.root_module = exe_mod,
|
||||
});
|
||||
b.installArtifact(lib);
|
||||
b.installArtifact(exe);
|
||||
const lib_unit_tests = b.addTest(.{
|
||||
.root_module = lib_mod,
|
||||
});
|
||||
const exe_unit_test = b.addTest(.{
|
||||
.root_module = exe_mod,
|
||||
});
|
||||
const run_lib_unit_tests = b.addRunArtifact(lib_unit_tests);
|
||||
const run_exe_unit_tests = b.addRunArtifact(exe_unit_test);
|
||||
const test_step = b.step("test", "Run unit tests");
|
||||
test_step.dependOn(&run_lib_unit_tests.step);
|
||||
test_step.dependOn(&run_exe_unit_tests.step);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user