| ... | ... | @@ -50,6 +50,51 @@ pub fn build(b: *std.Build) void { |
| 50 | 50 | |
| 51 | 51 | test_step.dependOn(&check_config_header.step); |
| 52 | 52 | test_step.dependOn(&check_config_header_autoconf_at.step); |
| 53 | |
| 54 | const config_header_blank = b.addConfigHeader( |
| 55 | .{ |
| 56 | .style = .blank, |
| 57 | .include_path = "config.h", |
| 58 | }, |
| 59 | .{ |
| 60 | .UNDEFINED = null, |
| 61 | .DEFINED = {}, |
| 62 | .TRUE = true, |
| 63 | .FALSE = false, |
| 64 | .ZERO = 0, |
| 65 | .ONE = 1, |
| 66 | .TEN = 10, |
| 67 | .IDENT = @as(enum { identifier }, .identifier), |
| 68 | .STRING = "test", |
| 69 | }, |
| 70 | ); |
| 71 | const check_config_header_blank = b.addCheckFile(config_header_blank.getOutputFile(), .{ |
| 72 | .expected_exact = @embedFile("blank/config.h"), |
| 73 | }); |
| 74 | test_step.dependOn(&check_config_header_blank.step); |
| 75 | |
| 76 | const config_header_nasm = b.addConfigHeader( |
| 77 | .{ |
| 78 | .style = .nasm, |
| 79 | .include_path = "config.asm", |
| 80 | }, |
| 81 | .{ |
| 82 | .UNDEFINED = null, |
| 83 | .DEFINED = {}, |
| 84 | .TRUE = true, |
| 85 | .FALSE = false, |
| 86 | .ZERO = 0, |
| 87 | .ONE = 1, |
| 88 | .TEN = 10, |
| 89 | .IDENT = @as(enum { identifier }, .identifier), |
| 90 | .STRING = "test", |
| 91 | }, |
| 92 | ); |
| 93 | const check_config_header_nasm = b.addCheckFile(config_header_nasm.getOutputFile(), .{ |
| 94 | .expected_exact = @embedFile("nasm/config.asm"), |
| 95 | }); |
| 96 | test_step.dependOn(&check_config_header_nasm.step); |
| 97 | |
| 53 | 98 | addCmakeChecks(b, test_step); |
| 54 | 99 | } |
| 55 | 100 | |