diff options
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 33 |
1 files changed, 31 insertions, 2 deletions
| @@ -146,6 +146,24 @@ pub fn build(b: *std.Build) void { | |||
| 146 | const run_scripts_gen_exe = b.addRunArtifact(scripts_gen_exe); | 146 | const run_scripts_gen_exe = b.addRunArtifact(scripts_gen_exe); |
| 147 | const scripts_gen_out = run_scripts_gen_exe.addOutputFileArg("scripts.bin.z"); | 147 | const scripts_gen_out = run_scripts_gen_exe.addOutputFileArg("scripts.bin.z"); |
| 148 | 148 | ||
| 149 | const core_gen_exe = b.addExecutable(.{ | ||
| 150 | .name = "core", | ||
| 151 | .root_source_file = .{ .path = "codegen/core_props.zig" }, | ||
| 152 | .target = b.host, | ||
| 153 | .optimize = .Debug, | ||
| 154 | }); | ||
| 155 | const run_core_gen_exe = b.addRunArtifact(core_gen_exe); | ||
| 156 | const core_gen_out = run_core_gen_exe.addOutputFileArg("core_props.bin.z"); | ||
| 157 | |||
| 158 | const props_gen_exe = b.addExecutable(.{ | ||
| 159 | .name = "props", | ||
| 160 | .root_source_file = .{ .path = "codegen/props.zig" }, | ||
| 161 | .target = b.host, | ||
| 162 | .optimize = .Debug, | ||
| 163 | }); | ||
| 164 | const run_props_gen_exe = b.addRunArtifact(props_gen_exe); | ||
| 165 | const props_gen_out = run_props_gen_exe.addOutputFileArg("props.bin.z"); | ||
| 166 | |||
| 149 | // Modules we provide | 167 | // Modules we provide |
| 150 | // Code points | 168 | // Code points |
| 151 | const code_point = b.addModule("code_point", .{ | 169 | const code_point = b.addModule("code_point", .{ |
| @@ -304,9 +322,18 @@ pub fn build(b: *std.Build) void { | |||
| 304 | }); | 322 | }); |
| 305 | scripts_data.addAnonymousImport("scripts", .{ .root_source_file = scripts_gen_out }); | 323 | scripts_data.addAnonymousImport("scripts", .{ .root_source_file = scripts_gen_out }); |
| 306 | 324 | ||
| 325 | // Properties | ||
| 326 | const props_data = b.addModule("ScriptsData", .{ | ||
| 327 | .root_source_file = .{ .path = "src/PropsData.zig" }, | ||
| 328 | .target = target, | ||
| 329 | .optimize = optimize, | ||
| 330 | }); | ||
| 331 | props_data.addAnonymousImport("core_props", .{ .root_source_file = core_gen_out }); | ||
| 332 | props_data.addAnonymousImport("props", .{ .root_source_file = props_gen_out }); | ||
| 333 | |||
| 307 | // Tests | 334 | // Tests |
| 308 | const exe_unit_tests = b.addTest(.{ | 335 | const exe_unit_tests = b.addTest(.{ |
| 309 | .root_source_file = .{ .path = "src/ScriptsData.zig" }, | 336 | .root_source_file = .{ .path = "src/PropsData.zig" }, |
| 310 | .target = target, | 337 | .target = target, |
| 311 | .optimize = optimize, | 338 | .optimize = optimize, |
| 312 | }); | 339 | }); |
| @@ -324,7 +351,9 @@ pub fn build(b: *std.Build) void { | |||
| 324 | // exe_unit_tests.root_module.addAnonymousImport("case_prop", .{ .root_source_file = case_prop_gen_out }); | 351 | // exe_unit_tests.root_module.addAnonymousImport("case_prop", .{ .root_source_file = case_prop_gen_out }); |
| 325 | // exe_unit_tests.root_module.addAnonymousImport("upper", .{ .root_source_file = upper_gen_out }); | 352 | // exe_unit_tests.root_module.addAnonymousImport("upper", .{ .root_source_file = upper_gen_out }); |
| 326 | // exe_unit_tests.root_module.addAnonymousImport("lower", .{ .root_source_file = lower_gen_out }); | 353 | // exe_unit_tests.root_module.addAnonymousImport("lower", .{ .root_source_file = lower_gen_out }); |
| 327 | exe_unit_tests.root_module.addAnonymousImport("scripts", .{ .root_source_file = scripts_gen_out }); | 354 | // exe_unit_tests.root_module.addAnonymousImport("scripts", .{ .root_source_file = scripts_gen_out }); |
| 355 | exe_unit_tests.root_module.addAnonymousImport("core_props", .{ .root_source_file = core_gen_out }); | ||
| 356 | exe_unit_tests.root_module.addAnonymousImport("props", .{ .root_source_file = props_gen_out }); | ||
| 328 | // exe_unit_tests.filter = "nfd !ASCII"; | 357 | // exe_unit_tests.filter = "nfd !ASCII"; |
| 329 | 358 | ||
| 330 | const run_exe_unit_tests = b.addRunArtifact(exe_unit_tests); | 359 | const run_exe_unit_tests = b.addRunArtifact(exe_unit_tests); |