summaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig29
1 files changed, 2 insertions, 27 deletions
diff --git a/build.zig b/build.zig
index 4316aaa..78147d3 100644
--- a/build.zig
+++ b/build.zig
@@ -15,23 +15,9 @@ pub fn build(b: *std.Build) void {
// set a preferred release mode, allowing the user to decide how to optimize.
const optimize = b.standardOptimizeOption(.{});
- const lib = b.addStaticLibrary(.{
- .name = "ziggy-with-it",
- // In this case the main source file is merely a path, however, in more
- // complicated build scripts, this could be a generated file.
- .root_source_file = .{ .path = "src/root.zig" },
- .target = target,
- .optimize = optimize,
- });
-
- // This declares intent for the library to be installed into the standard
- // location when the user invokes the "install" step (the default step when
- // running `zig build`).
- b.installArtifact(lib);
-
const exe = b.addExecutable(.{
.name = "ziggy-with-it",
- .root_source_file = .{ .path = "src/main.zig" },
+ .root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
@@ -64,18 +50,8 @@ pub fn build(b: *std.Build) void {
const run_step = b.step("run", "Run the app");
run_step.dependOn(&run_cmd.step);
- // Creates a step for unit testing. This only builds the test executable
- // but does not run it.
- const lib_unit_tests = b.addTest(.{
- .root_source_file = .{ .path = "src/root.zig" },
- .target = target,
- .optimize = optimize,
- });
-
- const run_lib_unit_tests = b.addRunArtifact(lib_unit_tests);
-
const exe_unit_tests = b.addTest(.{
- .root_source_file = .{ .path = "src/main.zig" },
+ .root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
@@ -86,7 +62,6 @@ pub fn build(b: *std.Build) void {
// the `zig build --help` menu, providing a way for the user to request
// running the unit tests.
const test_step = b.step("test", "Run unit tests");
- test_step.dependOn(&run_lib_unit_tests.step);
test_step.dependOn(&run_exe_unit_tests.step);
const dep = b.dependency("known-folders", .{});