diff options
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 12 |
1 files changed, 12 insertions, 0 deletions
| @@ -26,6 +26,16 @@ pub fn build(b: *std.Build) void { | |||
| 26 | const run_emoji_gen_exe = b.addRunArtifact(emoji_gen_exe); | 26 | const run_emoji_gen_exe = b.addRunArtifact(emoji_gen_exe); |
| 27 | const emoji_gen_out = run_emoji_gen_exe.addOutputFileArg("emoji.zig"); | 27 | const emoji_gen_out = run_emoji_gen_exe.addOutputFileArg("emoji.zig"); |
| 28 | 28 | ||
| 29 | const indic_gen_exe = b.addExecutable(.{ | ||
| 30 | .name = "indic", | ||
| 31 | .root_source_file = .{ .path = "codegen/indic.zig" }, | ||
| 32 | .target = b.host, | ||
| 33 | .optimize = .Debug, | ||
| 34 | }); | ||
| 35 | indic_gen_exe.root_module.addImport("ziglyph", ziglyph.module("ziglyph")); | ||
| 36 | const run_indic_gen_exe = b.addRunArtifact(indic_gen_exe); | ||
| 37 | const indic_gen_out = run_indic_gen_exe.addOutputFileArg("indic.zig"); | ||
| 38 | |||
| 29 | const exe = b.addExecutable(.{ | 39 | const exe = b.addExecutable(.{ |
| 30 | .name = "zgbench", | 40 | .name = "zgbench", |
| 31 | .root_source_file = .{ .path = "src/main.zig" }, | 41 | .root_source_file = .{ .path = "src/main.zig" }, |
| @@ -35,6 +45,7 @@ pub fn build(b: *std.Build) void { | |||
| 35 | exe.root_module.addImport("ziglyph", ziglyph.module("ziglyph")); | 45 | exe.root_module.addImport("ziglyph", ziglyph.module("ziglyph")); |
| 36 | exe.root_module.addAnonymousImport("gbp", .{ .root_source_file = gbp_gen_out }); | 46 | exe.root_module.addAnonymousImport("gbp", .{ .root_source_file = gbp_gen_out }); |
| 37 | exe.root_module.addAnonymousImport("emoji", .{ .root_source_file = emoji_gen_out }); | 47 | exe.root_module.addAnonymousImport("emoji", .{ .root_source_file = emoji_gen_out }); |
| 48 | exe.root_module.addAnonymousImport("indic", .{ .root_source_file = indic_gen_out }); | ||
| 38 | b.installArtifact(exe); | 49 | b.installArtifact(exe); |
| 39 | 50 | ||
| 40 | const run_cmd = b.addRunArtifact(exe); | 51 | const run_cmd = b.addRunArtifact(exe); |
| @@ -52,6 +63,7 @@ pub fn build(b: *std.Build) void { | |||
| 52 | exe_unit_tests.root_module.addImport("ziglyph", ziglyph.module("ziglyph")); | 63 | exe_unit_tests.root_module.addImport("ziglyph", ziglyph.module("ziglyph")); |
| 53 | exe_unit_tests.root_module.addAnonymousImport("gbp", .{ .root_source_file = gbp_gen_out }); | 64 | 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 }); | 65 | exe_unit_tests.root_module.addAnonymousImport("emoji", .{ .root_source_file = emoji_gen_out }); |
| 66 | exe_unit_tests.root_module.addAnonymousImport("indic", .{ .root_source_file = indic_gen_out }); | ||
| 55 | 67 | ||
| 56 | const run_exe_unit_tests = b.addRunArtifact(exe_unit_tests); | 68 | const run_exe_unit_tests = b.addRunArtifact(exe_unit_tests); |
| 57 | 69 | ||