aboutsummaryrefslogtreecommitdiff
path: root/test/standalone/pkg_import/build.zig
blob: 7529d106f9595b39b833326c9db3d9def2db33bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const Builder = @import("std").build.Builder;

pub fn build(b: *Builder) void {
    const exe = b.addExecutable("test", "test.zig");
    exe.addPackagePath("my_pkg", "pkg.zig");

    // This is duplicated to test that you are allowed to call
    // b.standardReleaseOptions() twice.
    exe.setBuildMode(b.standardReleaseOptions());
    exe.setBuildMode(b.standardReleaseOptions());

    const run = exe.run();

    const test_step = b.step("test", "Test it");
    test_step.dependOn(&run.step);
}