build: update for zig 0.11 and format
There was an API change to addInstallArtifact. It now takes a second argument.
This commit is contained in:
parent
d1803284b4
commit
71653858ab
11
build.zig
11
build.zig
@ -5,7 +5,7 @@ pub fn build(b: *std.Build) void {
|
|||||||
const optimize: std.builtin.Mode = b.standardOptimizeOption(.{});
|
const optimize: std.builtin.Mode = b.standardOptimizeOption(.{});
|
||||||
|
|
||||||
const noclip = b.addModule("noclip", .{
|
const noclip = b.addModule("noclip", .{
|
||||||
.source_file = .{ .path = "source/noclip.zig" }
|
.source_file = .{ .path = "source/noclip.zig" },
|
||||||
});
|
});
|
||||||
|
|
||||||
demo(b, noclip, target, optimize);
|
demo(b, noclip, target, optimize);
|
||||||
@ -21,7 +21,12 @@ pub fn build(b: *std.Build) void {
|
|||||||
test_step.dependOn(&tests.step);
|
test_step.dependOn(&tests.step);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn demo(b: *std.Build, noclip: *std.Build.Module, target: std.zig.CrossTarget, optimize: std.builtin.Mode) void {
|
fn demo(
|
||||||
|
b: *std.Build,
|
||||||
|
noclip: *std.Build.Module,
|
||||||
|
target: std.zig.CrossTarget,
|
||||||
|
optimize: std.builtin.Mode,
|
||||||
|
) void {
|
||||||
const demo_step = b.step("demo", "Build and install CLI demo program");
|
const demo_step = b.step("demo", "Build and install CLI demo program");
|
||||||
|
|
||||||
const exe = b.addExecutable(.{
|
const exe = b.addExecutable(.{
|
||||||
@ -31,7 +36,7 @@ fn demo(b: *std.Build, noclip: *std.Build.Module, target: std.zig.CrossTarget, o
|
|||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
exe.addModule("noclip", noclip);
|
exe.addModule("noclip", noclip);
|
||||||
const install_demo = b.addInstallArtifact(exe);
|
const install_demo = b.addInstallArtifact(exe, .{});
|
||||||
|
|
||||||
demo_step.dependOn(&install_demo.step);
|
demo_step.dependOn(&install_demo.step);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user