Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: update to latest Zig #34

Merged
merged 1 commit into from
May 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub fn build(b: *Build) void {
const optimize = b.standardOptimizeOption(.{});

const xml = b.addModule("xml", .{
.root_source_file = .{ .path = "src/xml.zig" },
.root_source_file = b.path("src/xml.zig"),
});

addTests(b, target, optimize, xml);
Expand All @@ -18,7 +18,7 @@ pub fn build(b: *Build) void {

fn addTests(b: *Build, target: Build.ResolvedTarget, optimize: Mode, xml: *Build.Module) void {
const main_tests = b.addTest(.{
.root_source_file = .{ .path = "src/xml.zig" },
.root_source_file = b.path("src/xml.zig"),
.target = target,
.optimize = optimize,
});
Expand All @@ -30,7 +30,7 @@ fn addTests(b: *Build, target: Build.ResolvedTarget, optimize: Mode, xml: *Build

const xmlconf_exe = b.addExecutable(.{
.name = "xmlconf",
.root_source_file = .{ .path = "test/xmlconf.zig" },
.root_source_file = b.path("test/xmlconf.zig"),
.target = target,
.optimize = optimize,
});
Expand Down Expand Up @@ -72,7 +72,7 @@ fn addTests(b: *Build, target: Build.ResolvedTarget, optimize: Mode, xml: *Build
fn addDocs(b: *Build, target: Build.ResolvedTarget) void {
const obj = b.addObject(.{
.name = "xml",
.root_source_file = .{ .path = "src/xml.zig" },
.root_source_file = b.path("src/xml.zig"),
.target = target,
.optimize = .Debug,
});
Expand All @@ -93,7 +93,7 @@ fn addExamples(b: *Build, target: Build.ResolvedTarget, optimize: Mode, xml: *Bu

const scan_exe = b.addExecutable(.{
.name = "scan",
.root_source_file = .{ .path = "examples/scan.zig" },
.root_source_file = b.path("examples/scan.zig"),
.target = target,
.optimize = optimize,
});
Expand All @@ -110,7 +110,7 @@ fn addExamples(b: *Build, target: Build.ResolvedTarget, optimize: Mode, xml: *Bu

const read_exe = b.addExecutable(.{
.name = "read",
.root_source_file = .{ .path = "examples/read.zig" },
.root_source_file = b.path("examples/read.zig"),
.target = target,
.optimize = optimize,
});
Expand All @@ -130,7 +130,7 @@ fn addFuzz(b: *Build, target: Build.ResolvedTarget, xml: *Build.Module) void {
// Thanks to https://www.ryanliptak.com/blog/fuzzing-zig-code/ for the basis of this!
const fuzz_lib = b.addStaticLibrary(.{
.name = "fuzz",
.root_source_file = .{ .path = "fuzz/main.zig" },
.root_source_file = b.path("fuzz/main.zig"),
.target = target,
.optimize = .Debug,
});
Expand Down Expand Up @@ -164,7 +164,7 @@ fn addFuzz(b: *Build, target: Build.ResolvedTarget, xml: *Build.Module) void {

const fuzz_reproduce_exe = b.addExecutable(.{
.name = "fuzz-reproduce",
.root_source_file = .{ .path = "fuzz/main.zig" },
.root_source_file = b.path("fuzz/main.zig"),
.target = target,
.optimize = .Debug,
});
Expand Down
Loading