aether/build.zig
2025-06-06 21:55:16 -05:00

35 lines
1.1 KiB
Zig

pub fn build(b: *@import("std").Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const aether = b.addModule("aether", .{
.root_source_file = b.path("root.zig"),
});
_ = b.addStaticLibrary(.{
.name = "aether",
.root_source_file = b.path("root.zig"),
.target = target,
.optimize = optimize,
});
const benchmarks = b.addExecutable(.{
.name = "benchmarks",
.root_source_file = b.path("benchmarks/main.zig"),
.target = target,
.optimize = optimize,
});
const zbench_module = b.dependency("zbench", .{}).module("zbench");
benchmarks.root_module.addImport("aether", aether);
benchmarks.root_module.addImport("zbench", zbench_module);
b.installArtifact(benchmarks);
const benchmarks_cmd = b.addRunArtifact(benchmarks);
benchmarks_cmd.step.dependOn(b.getInstallStep());
const benchmarks_step = b.step("benchmarks", "Run the benchmarks");
benchmarks_step.dependOn(&benchmarks_cmd.step);
}