Initial commit

This commit is contained in:
johan0A 2024-09-19 18:05:42 +02:00 committed by GitHub
commit 0d0863ff0c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 857 additions and 0 deletions

51
build.zig Normal file
View file

@ -0,0 +1,51 @@
const std = @import("std");
const B = std.Build;
pub fn build(b: *B) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
{
_ = b.addModule("zig-package-template", .{
.root_source_file = b.path("src/root.zig"),
.target = target,
.optimize = optimize,
});
}
{
const exe_unit_tests = b.addTest(.{
.root_source_file = b.path("src/root.zig"),
.target = target,
.optimize = optimize,
});
const run_exe_unit_tests = b.addRunArtifact(exe_unit_tests);
const test_step = b.step("test", "Run unit tests");
test_step.dependOn(&run_exe_unit_tests.step);
}
{
const tests_check = b.addTest(.{
.name = "check",
.root_source_file = b.path("src/root.zig"),
.target = target,
.optimize = optimize,
});
const check = b.step("check", "Check if tests compile");
check.dependOn(&tests_check.step);
}
}
fn addDependencies(
compile_step: *B.Step.Compile,
b: *B,
target: B.ResolvedTarget,
optimize: std.builtin.OptimizeMode,
) void {
_ = compile_step;
_ = b;
_ = target;
_ = optimize;
}