Application Context Implementation #4
|
@ -19,7 +19,7 @@
|
||||||
"arguments": "main.zig",
|
"arguments": "main.zig",
|
||||||
"cwd": "${workspaceRoot}",
|
"cwd": "${workspaceRoot}",
|
||||||
"valuesFormatting": "parseText",
|
"valuesFormatting": "parseText",
|
||||||
"preLaunchTask": "Build Tests",
|
"preLaunchTask": "Build Debug",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
"group": "build",
|
"group": "build",
|
||||||
"presentation": {
|
"presentation": {
|
||||||
"echo": true,
|
"echo": true,
|
||||||
"reveal": "always",
|
"reveal": "silent",
|
||||||
"focus": true,
|
"focus": true,
|
||||||
"panel": "shared",
|
"panel": "shared",
|
||||||
"showReuseMessage": true,
|
"showReuseMessage": true,
|
||||||
|
@ -36,12 +36,5 @@
|
||||||
"revealProblems": "onProblem",
|
"revealProblems": "onProblem",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
|
||||||
"label": "Build Tests",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "zig build test",
|
|
||||||
"group": "build",
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
17
build.zig
17
build.zig
|
@ -10,15 +10,15 @@ pub fn build(builder: *std.build.Builder) void {
|
||||||
|
|
||||||
// Ona executable.
|
// Ona executable.
|
||||||
{
|
{
|
||||||
const exe = builder.addExecutable("ona", "./src/ona/main.zig");
|
const ona = builder.addExecutable("ona", "./src/ona/main.zig");
|
||||||
|
|
||||||
exe.addPackage(core_pkg);
|
ona.addPackage(core_pkg);
|
||||||
exe.setTarget(target);
|
ona.setTarget(target);
|
||||||
exe.setBuildMode(mode);
|
ona.setBuildMode(mode);
|
||||||
exe.install();
|
ona.install();
|
||||||
exe.addIncludeDir("./ext");
|
ona.addIncludeDir("./ext");
|
||||||
exe.linkSystemLibrary("SDL2");
|
ona.linkSystemLibrary("SDL2");
|
||||||
exe.linkLibC();
|
ona.linkLibC();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tests executable.
|
// Tests executable.
|
||||||
|
@ -29,7 +29,6 @@ pub fn build(builder: *std.build.Builder) void {
|
||||||
tests.setTarget(target);
|
tests.setTarget(target);
|
||||||
tests.setBuildMode(mode);
|
tests.setBuildMode(mode);
|
||||||
tests.install();
|
tests.install();
|
||||||
builder.step("test", "Run unit tests").dependOn(&tests.step);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue