From 35de8cf2ae266b4d6a4622010ad80ca20abb6b35 Mon Sep 17 00:00:00 2001 From: kayomn Date: Sun, 30 Oct 2022 22:06:56 +0000 Subject: [PATCH] Tidy up build configurations --- .vscode/launch.json | 2 +- .vscode/tasks.json | 9 +-------- build.zig | 17 ++++++++--------- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 4c87ee2..9782360 100755 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -19,7 +19,7 @@ "arguments": "main.zig", "cwd": "${workspaceRoot}", "valuesFormatting": "parseText", - "preLaunchTask": "Build Tests", + "preLaunchTask": "Build Debug", }, ] } diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 0f3ff97..f2f1dbc 100755 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -28,7 +28,7 @@ "group": "build", "presentation": { "echo": true, - "reveal": "always", + "reveal": "silent", "focus": true, "panel": "shared", "showReuseMessage": true, @@ -36,12 +36,5 @@ "revealProblems": "onProblem", }, }, - - { - "label": "Build Tests", - "type": "shell", - "command": "zig build test", - "group": "build", - }, ], } diff --git a/build.zig b/build.zig index 9db4b88..6dd3828 100644 --- a/build.zig +++ b/build.zig @@ -10,15 +10,15 @@ pub fn build(builder: *std.build.Builder) void { // Ona executable. { - const exe = builder.addExecutable("ona", "./src/ona/main.zig"); + const ona = builder.addExecutable("ona", "./src/ona/main.zig"); - exe.addPackage(core_pkg); - exe.setTarget(target); - exe.setBuildMode(mode); - exe.install(); - exe.addIncludeDir("./ext"); - exe.linkSystemLibrary("SDL2"); - exe.linkLibC(); + ona.addPackage(core_pkg); + ona.setTarget(target); + ona.setBuildMode(mode); + ona.install(); + ona.addIncludeDir("./ext"); + ona.linkSystemLibrary("SDL2"); + ona.linkLibC(); } // Tests executable. @@ -29,7 +29,6 @@ pub fn build(builder: *std.build.Builder) void { tests.setTarget(target); tests.setBuildMode(mode); tests.install(); - builder.step("test", "Run unit tests").dependOn(&tests.step); } }