diff options
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 26 |
1 files changed, 19 insertions, 7 deletions
| @@ -6,15 +6,25 @@ pub fn build(b: *std.Build) void { | |||
| 6 | 6 | ||
| 7 | const ziglyph = b.dependency("ziglyph", .{}); | 7 | const ziglyph = b.dependency("ziglyph", .{}); |
| 8 | 8 | ||
| 9 | const gen_exe = b.addExecutable(.{ | 9 | const gbp_gen_exe = b.addExecutable(.{ |
| 10 | .name = "gen", | 10 | .name = "gbp_gen", |
| 11 | .root_source_file = .{ .path = "src/gbp_gen.zig" }, | 11 | .root_source_file = .{ .path = "src/gbp_gen.zig" }, |
| 12 | .target = target, | 12 | .target = target, |
| 13 | .optimize = optimize, | 13 | .optimize = optimize, |
| 14 | }); | 14 | }); |
| 15 | gen_exe.root_module.addImport("ziglyph", ziglyph.module("ziglyph")); | 15 | gbp_gen_exe.root_module.addImport("ziglyph", ziglyph.module("ziglyph")); |
| 16 | const run_gen_exe = b.addRunArtifact(gen_exe); | 16 | const run_gbp_gen_exe = b.addRunArtifact(gbp_gen_exe); |
| 17 | const gen_out = run_gen_exe.addOutputFileArg("gbp.zig"); | 17 | const gbp_gen_out = run_gbp_gen_exe.addOutputFileArg("gbp.zig"); |
| 18 | |||
| 19 | const emoji_gen_exe = b.addExecutable(.{ | ||
| 20 | .name = "emoji_gen", | ||
| 21 | .root_source_file = .{ .path = "src/emoji_gen.zig" }, | ||
| 22 | .target = target, | ||
| 23 | .optimize = optimize, | ||
| 24 | }); | ||
| 25 | emoji_gen_exe.root_module.addImport("ziglyph", ziglyph.module("ziglyph")); | ||
| 26 | const run_emoji_gen_exe = b.addRunArtifact(emoji_gen_exe); | ||
| 27 | const emoji_gen_out = run_emoji_gen_exe.addOutputFileArg("emoji.zig"); | ||
| 18 | 28 | ||
| 19 | const exe = b.addExecutable(.{ | 29 | const exe = b.addExecutable(.{ |
| 20 | .name = "zgbench", | 30 | .name = "zgbench", |
| @@ -23,7 +33,8 @@ pub fn build(b: *std.Build) void { | |||
| 23 | .optimize = optimize, | 33 | .optimize = optimize, |
| 24 | }); | 34 | }); |
| 25 | exe.root_module.addImport("ziglyph", ziglyph.module("ziglyph")); | 35 | exe.root_module.addImport("ziglyph", ziglyph.module("ziglyph")); |
| 26 | exe.root_module.addAnonymousImport("gbp", .{ .root_source_file = gen_out }); | 36 | exe.root_module.addAnonymousImport("gbp", .{ .root_source_file = gbp_gen_out }); |
| 37 | exe.root_module.addAnonymousImport("emoji", .{ .root_source_file = emoji_gen_out }); | ||
| 27 | b.installArtifact(exe); | 38 | b.installArtifact(exe); |
| 28 | 39 | ||
| 29 | const run_cmd = b.addRunArtifact(exe); | 40 | const run_cmd = b.addRunArtifact(exe); |
| @@ -39,7 +50,8 @@ pub fn build(b: *std.Build) void { | |||
| 39 | .optimize = optimize, | 50 | .optimize = optimize, |
| 40 | }); | 51 | }); |
| 41 | exe_unit_tests.root_module.addImport("ziglyph", ziglyph.module("ziglyph")); | 52 | exe_unit_tests.root_module.addImport("ziglyph", ziglyph.module("ziglyph")); |
| 42 | exe_unit_tests.root_module.addAnonymousImport("gbp", .{ .root_source_file = gen_out }); | 53 | exe_unit_tests.root_module.addAnonymousImport("gbp", .{ .root_source_file = gbp_gen_out }); |
| 54 | exe_unit_tests.root_module.addAnonymousImport("emoji", .{ .root_source_file = emoji_gen_out }); | ||
| 43 | 55 | ||
| 44 | const run_exe_unit_tests = b.addRunArtifact(exe_unit_tests); | 56 | const run_exe_unit_tests = b.addRunArtifact(exe_unit_tests); |
| 45 | 57 | ||