We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c1685f6 + c7f5ed3 commit a12b12fCopy full SHA for a12b12f
build.zig
@@ -1,4 +1,24 @@
1
const std = @import("std");
2
+const builtin = @import("builtin");
3
+
4
+const zig_version = std.SemanticVersion{
5
+ .major = 0,
6
+ .minor = 13,
7
+ .patch = 0,
8
+};
9
10
+comptime {
11
+ // Compare versions while allowing different pre/patch metadata.
12
+ const zig_version_eq = zig_version.major == builtin.zig_version.major and
13
+ zig_version.minor == builtin.zig_version.minor and
14
+ zig_version.patch == builtin.zig_version.patch;
15
+ if (!zig_version_eq) {
16
+ @compileError(std.fmt.comptimePrint(
17
+ "unsupported zig version: expected {}, found {}",
18
+ .{ zig_version, builtin.zig_version },
19
+ ));
20
+ }
21
+}
22
23
pub fn build(b: *std.Build) void {
24
const target = b.standardTargetOptions(.{});
0 commit comments