move ziglyph dep to SharedDeps with .@"test" condition
parent
4f2d80b08f
commit
76cafeb957
|
|
@ -271,14 +271,6 @@ pub fn build(b: *std.Build) !void {
|
||||||
if (config.emit_test_exe) b.installArtifact(test_exe);
|
if (config.emit_test_exe) b.installArtifact(test_exe);
|
||||||
_ = try deps.add(test_exe);
|
_ = try deps.add(test_exe);
|
||||||
|
|
||||||
// Only need ziglyph for tests
|
|
||||||
if (b.lazyDependency("ziglyph", .{
|
|
||||||
.target = test_exe.root_module.resolved_target.?,
|
|
||||||
.optimize = test_exe.root_module.optimize.?,
|
|
||||||
})) |dep| {
|
|
||||||
test_exe.root_module.addImport("ziglyph", dep.module("ziglyph"));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Normal test running
|
// Normal test running
|
||||||
const test_run = b.addRunArtifact(test_exe);
|
const test_run = b.addRunArtifact(test_exe);
|
||||||
test_step.dependOn(&test_run.step);
|
test_step.dependOn(&test_run.step);
|
||||||
|
|
|
||||||
|
|
@ -403,6 +403,14 @@ pub fn add(
|
||||||
})) |dep| {
|
})) |dep| {
|
||||||
step.root_module.addImport("z2d", dep.module("z2d"));
|
step.root_module.addImport("z2d", dep.module("z2d"));
|
||||||
}
|
}
|
||||||
|
if (step.kind == .@"test") {
|
||||||
|
if (b.lazyDependency("ziglyph", .{
|
||||||
|
.target = step.root_module.resolved_target.?,
|
||||||
|
.optimize = step.root_module.optimize.?,
|
||||||
|
})) |dep| {
|
||||||
|
step.root_module.addImport("ziglyph", dep.module("ziglyph"));
|
||||||
|
}
|
||||||
|
}
|
||||||
if (b.lazyDependency("uucode", .{
|
if (b.lazyDependency("uucode", .{
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue