mirror of
https://github.com/ziglang/zig.git
synced 2024-11-29 00:22:33 +00:00
67b4de33d2
closes #2024 there's a new cli option `--main-pkg-path` which you can use to choose a different root package directory besides the one inferred from the root source file and a corresponding build.zig API: foo.setMainPkgPath(path)
10 lines
261 B
Zig
10 lines
261 B
Zig
const Builder = @import("std").build.Builder;
|
|
|
|
pub fn build(b: *Builder) void {
|
|
const test_exe = b.addTest("a/test.zig");
|
|
test_exe.setMainPkgPath(".");
|
|
|
|
const test_step = b.step("test", "Test the program");
|
|
test_step.dependOn(&test_exe.step);
|
|
}
|