You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
925 B
33 lines
925 B
const std = @import("std");
|
|
|
|
pub fn build(b: *std.Build) void {
|
|
const target = b.standardTargetOptions(.{});
|
|
const optimize = b.standardOptimizeOption(.{});
|
|
|
|
// Create a module for the library
|
|
_ = b.addModule("pi-finder", .{
|
|
.root_source_file = b.path("src/lib.zig"),
|
|
.target = target,
|
|
.optimize = optimize,
|
|
});
|
|
|
|
// Library
|
|
const lib = b.addStaticLibrary(.{
|
|
.name = "pi-finder",
|
|
.root_source_file = b.path("src/lib.zig"),
|
|
.target = target,
|
|
.optimize = optimize,
|
|
});
|
|
b.installArtifact(lib);
|
|
|
|
// Tests
|
|
const lib_unit_tests = b.addTest(.{
|
|
.root_source_file = b.path("src/lib.zig"),
|
|
.target = target,
|
|
.optimize = optimize,
|
|
});
|
|
|
|
const run_lib_unit_tests = b.addRunArtifact(lib_unit_tests);
|
|
const test_step = b.step("test", "Run unit tests");
|
|
test_step.dependOn(&run_lib_unit_tests.step);
|
|
}
|
|
|