Skip to content

Commit

Permalink
Updated build.zig to support Zig 0.13.0-dev.211+6a65561e3
Browse files Browse the repository at this point in the history
  • Loading branch information
BrookJeynes authored and Hejsil committed May 16, 2024
1 parent 1d413d9 commit 03b8333
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build.zig
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
const std = @import("std");

pub fn build(b: *std.Build) void {
const clap_mod = b.addModule("clap", .{ .root_source_file = .{ .path = "clap.zig" } });
const clap_mod = b.addModule("clap", .{ .root_source_file = .{ .src_path = .{ .owner = b, .sub_path = "clap.zig" } } });

const optimize = b.standardOptimizeOption(.{});
const target = b.standardTargetOptions(.{});

const test_step = b.step("test", "Run all tests in all modes.");
const tests = b.addTest(.{
.root_source_file = .{ .path = "clap.zig" },
.root_source_file = .{ .src_path = .{ .owner = b, .sub_path = "clap.zig" } },
.target = target,
.optimize = optimize,
});
Expand All @@ -25,7 +25,7 @@ pub fn build(b: *std.Build) void {
}) |example_name| {
const example = b.addExecutable(.{
.name = example_name,
.root_source_file = .{ .path = b.fmt("example/{s}.zig", .{example_name}) },
.root_source_file = .{ .src_path = .{ .owner = b, .sub_path = b.fmt("example/{s}.zig", .{example_name}) } },
.target = target,
.optimize = optimize,
});
Expand Down

0 comments on commit 03b8333

Please sign in to comment.