Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcece620

Browse files
committed
zwin32: change test to comptime check
Also cleanup of redundent specification of dependency target option
1 parent2f34c19 commitcece620

File tree

22 files changed

+22
-117
lines changed

22 files changed

+22
-117
lines changed

‎build.zig

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,6 @@ pub fn build(b: *std.Build) void {
8383
{// Tests
8484
consttest_step=b.step("test","Run all tests");
8585
tests(b,target,optimize,test_step);
86-
if (builtin.os.tag==.windows) {
87-
testsWindows(b,target,optimize,test_step);
88-
}
8986
}
9087

9188
{// Benchmarks
@@ -308,19 +305,6 @@ fn tests(
308305
test_step.dependOn(&b.addRunArtifact(ztracy.artifact("ztracy-tests")).step);
309306
}
310307

311-
fntestsWindows(
312-
b:*std.Build,
313-
target:std.Build.ResolvedTarget,
314-
optimize:std.builtin.OptimizeMode,
315-
test_step:*std.Build.Step,
316-
)void {
317-
constzwin32=b.dependency("zwin32", .{
318-
.target=target,
319-
.optimize=optimize,
320-
});
321-
test_step.dependOn(&b.addRunArtifact(zwin32.artifact("zwin32-tests")).step);
322-
}
323-
324308
// TODO: Delete this once Zig checks minimum_zig_version in build.zig.zon
325309
fnensureZigVersion()!void {
326310
varinstalled_ver=builtin.zig_version;

‎libs/zd3d12/build.zig

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ const std = @import("std");
33
constdefault_upload_heap_capacity:u32=32*1024*1024;
44

55
pubfnbuild(b:*std.Build)void {
6-
consttarget=b.standardTargetOptions(.{});
7-
86
constoptions= .{
97
.debug_layer=b.option(
108
bool,
@@ -31,9 +29,7 @@ pub fn build(b: *std.Build) void {
3129

3230
constoptions_module=options_step.createModule();
3331

34-
constzwin32=b.dependency("zwin32", .{
35-
.target=target,
36-
});
32+
constzwin32=b.dependency("zwin32", .{});
3733
constzwin32_module=zwin32.module("root");
3834

3935
_=b.addModule("root", .{

‎libs/zopenvr/build.zig

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
conststd=@import("std");
22

33
pubfnbuild(b:*std.Build)void {
4-
consttarget=b.standardTargetOptions(.{});
5-
6-
constzwin32=b.dependency("zwin32", .{
7-
.target=target,
8-
});
4+
constzwin32=b.dependency("zwin32", .{});
95
_=b.addModule("root", .{
106
.root_source_file=b.path("src/openvr.zig"),
117
.imports= &.{

‎libs/zwin32/build.zig

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,9 @@ const std = @import("std");
22
constbuiltin=@import("builtin");
33

44
pubfnbuild(b:*std.Build)!void {
5-
constoptimize=b.standardOptimizeOption(.{});
6-
consttarget=b.standardTargetOptions(.{});
7-
85
_=b.addModule("root", .{
96
.root_source_file=b.path("src/zwin32.zig"),
107
});
11-
12-
consttest_step=b.step("test","Run zwin32 tests");
13-
14-
consttests=b.addTest(.{
15-
.name="zwin32-tests",
16-
.root_source_file=b.path("src/zwin32.zig"),
17-
.target=target,
18-
.optimize=optimize,
19-
});
20-
21-
b.installArtifact(tests);
22-
23-
test_step.dependOn(&b.addRunArtifact(tests).step);
248
}
259

2610
pubfninstall_xaudio2(

‎libs/zwin32/src/zwin32.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub const xinput = @import("xinput.zig");
1919
pubconstdds_loader=@import("dds_loader.zig");
2020
pubconstd3dcompiler=@import("d3dcompiler.zig");
2121

22-
test {
22+
comptime {
2323
std.testing.refAllDeclsRecursive(@This());
2424
}
2525

‎libs/zxaudio2/build.zig

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
conststd=@import("std");
22

33
pubfnbuild(b:*std.Build)void {
4-
consttarget=b.standardTargetOptions(.{});
5-
64
constoptions= .{
75
.debug_layer=b.option(bool,"debug_layer","Enables debug layer")orelsefalse,
86
};
@@ -14,9 +12,7 @@ pub fn build(b: *std.Build) void {
1412

1513
constoptions_module=options_step.createModule();
1614

17-
constzwin32=b.dependency("zwin32", .{
18-
.target=target,
19-
});
15+
constzwin32=b.dependency("zwin32", .{});
2016

2117
_=b.addModule("root", .{
2218
.root_source_file=b.path("src/zxaudio2.zig"),

‎samples/audio_experiments/build.zig

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,11 @@ pub fn build(b: *std.Build, options: anytype) *std.Build.Step.Compile {
3232
});
3333
exe.root_module.addImport("zxaudio2",zxaudio2.module("root"));
3434

35-
constzwin32=b.dependency("zwin32", .{
36-
.target=options.target,
37-
});
35+
constzwin32=b.dependency("zwin32", .{});
3836
constzwin32_module=zwin32.module("root");
3937
exe.root_module.addImport("zwin32",zwin32_module);
4038

4139
constzd3d12=b.dependency("zd3d12", .{
42-
.target=options.target,
4340
.debug_layer=options.zd3d12_enable_debug_layer,
4441
.gbv=options.zd3d12_enable_gbv,
4542
});

‎samples/audio_playback_test/build.zig

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,11 @@ pub fn build(b: *std.Build, options: anytype) *std.Build.Step.Compile {
2121

2222
@import("system_sdk").addLibraryPathsTo(exe);
2323

24-
constzwin32=b.dependency("zwin32", .{
25-
.target=options.target,
26-
});
24+
constzwin32=b.dependency("zwin32", .{});
2725
constzwin32_module=zwin32.module("root");
2826
exe.root_module.addImport("zwin32",zwin32_module);
2927

3028
constzd3d12=b.dependency("zd3d12", .{
31-
.target=options.target,
3229
.debug_layer=options.zd3d12_enable_debug_layer,
3330
.gbv=options.zd3d12_enable_gbv,
3431
});

‎samples/bindless/build.zig

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,11 @@ pub fn build(b: *std.Build, options: anytype) *std.Build.Step.Compile {
3333
exe.root_module.addImport("zstbi",zstbi.module("root"));
3434
exe.linkLibrary(zstbi.artifact("zstbi"));
3535

36-
constzwin32=b.dependency("zwin32", .{
37-
.target=options.target,
38-
});
36+
constzwin32=b.dependency("zwin32", .{});
3937
constzwin32_module=zwin32.module("root");
4038
exe.root_module.addImport("zwin32",zwin32_module);
4139

4240
constzd3d12=b.dependency("zd3d12", .{
43-
.target=options.target,
4441
.debug_layer=options.zd3d12_enable_debug_layer,
4542
.gbv=options.zd3d12_enable_gbv,
4643
});

‎samples/directml_convolution_test/build.zig

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,11 @@ pub fn build(b: *std.Build, options: anytype) *std.Build.Step.Compile {
2020

2121
@import("system_sdk").addLibraryPathsTo(exe);
2222

23-
constzwin32=b.dependency("zwin32", .{
24-
.target=options.target,
25-
});
23+
constzwin32=b.dependency("zwin32", .{});
2624
constzwin32_module=zwin32.module("root");
2725
exe.root_module.addImport("zwin32",zwin32_module);
2826

2927
constzd3d12=b.dependency("zd3d12", .{
30-
.target=options.target,
3128
.debug_layer=options.zd3d12_enable_debug_layer,
3229
.gbv=options.zd3d12_enable_gbv,
3330
});

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp