mirror of
https://github.com/ziglang/zig.git
synced 2024-11-30 17:12:31 +00:00
24 lines
586 B
Zig
24 lines
586 B
Zig
const Builder = @import("std").build.Builder;
|
|
|
|
pub fn build(b: *Builder) void {
|
|
const optimize = b.standardOptimizeOption(.{});
|
|
|
|
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,
|
|
});
|
|
|
|
const run = main.run();
|
|
run.addArtifactArg(hello);
|
|
|
|
const test_step = b.step("test", "Test it");
|
|
test_step.dependOn(&run.step);
|
|
}
|