master
1const std = @import("std");
2
3pub fn build(b: *std.Build) void {
4 const config_header = b.addConfigHeader(
5 .{ .style = .{ .autoconf_undef = b.path("config.h.in") } },
6 .{
7 .SOME_NO = null,
8 .SOME_TRUE = true,
9 .SOME_FALSE = false,
10 .SOME_ZERO = 0,
11 .SOME_ONE = 1,
12 .SOME_TEN = 10,
13 .SOME_ENUM = @as(enum { foo, bar }, .foo),
14 .SOME_ENUM_LITERAL = .@"test",
15 .SOME_STRING = "test",
16
17 .PREFIX_SPACE = null,
18 .PREFIX_TAB = null,
19 .POSTFIX_SPACE = null,
20 .POSTFIX_TAB = null,
21 },
22 );
23
24 const check_config_header = b.addCheckFile(config_header.getOutput(), .{ .expected_exact = @embedFile("config.h") });
25
26 const test_step = b.step("test", "Test it");
27 test_step.dependOn(&check_config_header.step);
28}