File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 11const std = @import ("std" );
22
33pub fn build (b : * std.Build ) void {
4+ const target = b .standardTargetOptions (.{});
5+ const optimize = b .standardOptimizeOption (.{});
6+
47 const entry = b .path ("src/root.zig" );
5- const lib = b .addModule ("datetime" , .{ .root_source_file = entry });
6- const lib_unit_tests = b .addTest (.{ .root_source_file = entry });
8+ const lib = b .addModule ("datetime" , .{
9+ .root_source_file = entry ,
10+ .target = target ,
11+ .optimize = optimize ,
12+ });
13+ const lib_unit_tests = b .addTest (.{
14+ .root_source_file = entry ,
15+ .target = target ,
16+ .optimize = optimize ,
17+ });
718 const run_lib_unit_tests = b .addRunArtifact (lib_unit_tests );
819
920 const demo = b .addTest (.{
1021 .name = "demo" ,
1122 .root_source_file = b .path ("demos.zig" ),
23+ .target = target ,
24+ .optimize = optimize ,
1225 });
1326 demo .root_module .addImport ("datetime" , lib );
1427 const run_demo = b .addRunArtifact (demo );
You can’t perform that action at this time.
0 commit comments