zig/test/standalone/pkg_import/build.zig
Andrew Kelley 7b57454cc1 clean up error return tracing
* error return tracing is disabled in release-fast mode
 * add @errorReturnTrace
 * zig build API changes build return type from `void` to `%void`
 * allow `void`, `noreturn`, and `u8` from main. closes #535
2018-01-15 00:01:02 -05:00

18 lines
590 B
Zig

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 = b.addCommand(".", b.env_map, [][]const u8{exe.getOutputPath()});
run.step.dependOn(&exe.step);
const test_step = b.step("test", "Test it");
test_step.dependOn(&run.step);
}