build: update for zig-0.13

This commit is contained in:
torque 2024-06-18 18:24:19 -07:00
parent ad73ea6508
commit 8ccb2c3a66
Signed by: torque
SSH Key Fingerprint: SHA256:nCrXefBNo6EbjNSQhv0nXmEg/VuNq3sMF5b8zETw3Tk
2 changed files with 4 additions and 4 deletions

View File

@ -5,12 +5,12 @@ pub fn build(b: *std.Build) void {
const optimize = b.standardOptimizeOption(.{}); const optimize = b.standardOptimizeOption(.{});
const nice = b.addModule("nice", .{ const nice = b.addModule("nice", .{
.root_source_file = .{ .path = "src/nice.zig" }, .root_source_file = b.path("src/nice.zig"),
}); });
const tests = b.addTest(.{ const tests = b.addTest(.{
.name = "nice-unit-tests", .name = "nice-unit-tests",
.root_source_file = .{ .path = "tests/main.zig" }, .root_source_file = b.path("tests/main.zig"),
.target = target, .target = target,
.optimize = optimize, .optimize = optimize,
}); });
@ -50,7 +50,7 @@ pub fn add_examples(b: *std.Build, options: ExampleOptions) void {
inline for (examples) |example| { inline for (examples) |example| {
const ex_exe = b.addExecutable(.{ const ex_exe = b.addExecutable(.{
.name = example.name, .name = example.name,
.root_source_file = .{ .path = example.file }, .root_source_file = b.path(example.file),
.target = options.target, .target = options.target,
.optimize = .Debug, .optimize = .Debug,
}); });

View File

@ -1,5 +1,5 @@
.{ .{
.name = "nice-data", .name = "nice",
.version = "0.1.0-pre", .version = "0.1.0-pre",
.dependencies = .{}, .dependencies = .{},
.paths = .{ .paths = .{