aboutsummaryrefslogtreecommitdiffstats
path: root/build.zig
diff options
context:
space:
mode:
authorLibravatar Rutger Broekhoff2021-09-20 11:57:39 +0200
committerLibravatar Rutger Broekhoff2021-09-20 11:57:39 +0200
commit29fb00a1c3a60d4faca2fb29ae56b73362baa917 (patch)
tree5542426d762402fb5beb66da3ae8c2bc42d80d89 /build.zig
parent1148e92a6a84d5fa65e4e8ef18328fcb4f16664d (diff)
downloadzig-nkeys-0.3.1.tar.gz
zig-nkeys-0.3.1.zip
Make compatible with Zig master0.3.1
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig11
1 files changed, 7 insertions, 4 deletions
diff --git a/build.zig b/build.zig
index 6758252..412408b 100644
--- a/build.zig
+++ b/build.zig
@@ -4,7 +4,7 @@ pub fn build(b: *std.build.Builder) !void {
4 const mode = b.standardReleaseOptions(); 4 const mode = b.standardReleaseOptions();
5 const target = b.standardTargetOptions(.{}); 5 const target = b.standardTargetOptions(.{});
6 6
7 var lib_tests = b.addTest("src/main.zig"); 7 const lib_tests = b.addTest("src/main.zig");
8 lib_tests.setBuildMode(mode); 8 lib_tests.setBuildMode(mode);
9 9
10 const test_step = b.step("test", "Run library tests"); 10 const test_step = b.step("test", "Run library tests");
@@ -12,10 +12,13 @@ pub fn build(b: *std.build.Builder) !void {
12 12
13 const znk_version = "0.2.1"; 13 const znk_version = "0.2.1";
14 14
15 var znk_tests = b.addTest("tool/znk.zig"); 15 const znk_options = b.addOptions();
16 znk_options.addOption([]const u8, "version", znk_version);
17
18 const znk_tests = b.addTest("tool/znk.zig");
16 znk_tests.setBuildMode(mode); 19 znk_tests.setBuildMode(mode);
17 znk_tests.addPackagePath("nkeys", "src/main.zig"); 20 znk_tests.addPackagePath("nkeys", "src/main.zig");
18 znk_tests.addBuildOption([]const u8, "version", znk_version); 21 znk_tests.addOptions("build_options", znk_options);
19 22
20 const znk_test_step = b.step("test-znk", "Run znk tests"); 23 const znk_test_step = b.step("test-znk", "Run znk tests");
21 znk_test_step.dependOn(&znk_tests.step); 24 znk_test_step.dependOn(&znk_tests.step);
@@ -24,7 +27,7 @@ pub fn build(b: *std.build.Builder) !void {
24 znk.setBuildMode(mode); 27 znk.setBuildMode(mode);
25 znk.setTarget(target); 28 znk.setTarget(target);
26 znk.addPackagePath("nkeys", "src/main.zig"); 29 znk.addPackagePath("nkeys", "src/main.zig");
27 znk.addBuildOption([]const u8, "version", znk_version); 30 znk.addOptions("build_options", znk_options);
28 31
29 const znk_install = b.addInstallArtifact(znk); 32 const znk_install = b.addInstallArtifact(znk);
30 33