Compare commits
2 Commits
27667032e1
...
a9f2298132
Author | SHA1 | Date | |
---|---|---|---|
a9f2298132 | |||
2b643c5221 |
@ -9,10 +9,8 @@ pub fn build(b: *std.Build) void {
|
||||
const optimize = b.standardOptimizeOption(.{});
|
||||
|
||||
const yaml_zig = b.addModule("zaye", .{
|
||||
.source_file = .{ .path = "src/zaye.zig" },
|
||||
.root_source_file = .{ .path = "src/zaye.zig" },
|
||||
});
|
||||
// yaml_zig.addIncludePath(.{ .path = b.getInstallPath(.header, "") });
|
||||
// _ = yaml_zig;
|
||||
|
||||
const libyaml = libyaml_build.libyamlLib(b, .{
|
||||
.name = "libyaml",
|
||||
@ -29,7 +27,7 @@ pub fn build(b: *std.Build) void {
|
||||
.optimize = optimize,
|
||||
});
|
||||
ex_exe.linkLibrary(libyaml);
|
||||
ex_exe.addModule("yaml", yaml_zig);
|
||||
ex_exe.root_module.addImport("yaml", yaml_zig);
|
||||
|
||||
const install = b.addInstallArtifact(ex_exe, .{});
|
||||
example_step.dependOn(&install.step);
|
||||
|
@ -5,7 +5,7 @@ const std = @import("std");
|
||||
|
||||
const LibyamlOptions = struct {
|
||||
name: []const u8,
|
||||
target: std.zig.CrossTarget,
|
||||
target: std.Build.ResolvedTarget,
|
||||
optimize: std.builtin.OptimizeMode,
|
||||
};
|
||||
|
||||
@ -23,7 +23,7 @@ pub fn libyamlLib(
|
||||
|
||||
lib.linkLibC();
|
||||
lib.addIncludePath(.{ .path = include_prefix });
|
||||
lib.addCSourceFiles(&sources, &cflags);
|
||||
lib.addCSourceFiles(.{ .files = &sources, .flags = &cflags });
|
||||
lib.defineCMacro("YAML_VERSION_MAJOR", "0");
|
||||
lib.defineCMacro("YAML_VERSION_MINOR", "2");
|
||||
lib.defineCMacro("YAML_VERSION_PATCH", "5");
|
||||
|
@ -266,7 +266,7 @@ pub const Value = union(enum) {
|
||||
}
|
||||
|
||||
fn endMap(self: *Builder, diag: *ParseDiagnostic) !void {
|
||||
var top = self.container_stack.pop();
|
||||
const top = self.container_stack.pop();
|
||||
|
||||
if (top != .map) {
|
||||
diag.setMessage("map ended when a map was not the top container");
|
||||
|
Loading…
x
Reference in New Issue
Block a user