migton/build.zig

21 lines
607 B
Zig
Raw Normal View History

2024-09-01 14:52:28 +08:00
const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
2024-09-01 19:29:10 +08:00
_ = b.addModule("migton", .{ .root_source_file = b.path("src/migton.zig") });
2024-09-01 14:52:28 +08:00
2024-09-01 19:29:10 +08:00
// main test
const main_test = b.addTest(.{
.root_source_file = b.path("src/main_test.zig"),
2024-09-01 14:52:28 +08:00
.target = target,
.optimize = optimize,
});
2024-09-01 19:29:10 +08:00
// run main test
const run_main_tests = b.addRunArtifact(main_test);
2024-09-01 14:52:28 +08:00
2024-09-01 19:29:10 +08:00
const test_step = b.step("test", "Run library Test.");
test_step.dependOn(&run_main_tests.step);
2024-09-01 14:52:28 +08:00
}