2022-12-18 10:31:00 +00:00
|
|
|
const Builder = @import("std").build.Builder;
|
|
|
|
|
|
|
|
pub fn build(b: *Builder) void {
|
2023-01-31 04:39:43 +00:00
|
|
|
const optimize = b.standardOptimizeOption(.{});
|
2022-12-18 10:31:00 +00:00
|
|
|
|
2023-01-31 04:39:43 +00:00
|
|
|
const hello = b.addExecutable(.{
|
|
|
|
.name = "hello",
|
|
|
|
.root_source_file = .{ .path = "hello.zig" },
|
|
|
|
.optimize = optimize,
|
|
|
|
});
|
|
|
|
|
|
|
|
const main = b.addExecutable(.{
|
|
|
|
.name = "main",
|
|
|
|
.root_source_file = .{ .path = "main.zig" },
|
|
|
|
.optimize = optimize,
|
|
|
|
});
|
2022-12-18 10:31:00 +00:00
|
|
|
|
|
|
|
const run = main.run();
|
|
|
|
run.addArtifactArg(hello);
|
|
|
|
|
|
|
|
const test_step = b.step("test", "Test it");
|
|
|
|
test_step.dependOn(&run.step);
|
|
|
|
}
|