Tidy up build configurations
This commit is contained in:
parent
14397b05e3
commit
35de8cf2ae
|
@ -19,7 +19,7 @@
|
|||
"arguments": "main.zig",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"valuesFormatting": "parseText",
|
||||
"preLaunchTask": "Build Tests",
|
||||
"preLaunchTask": "Build Debug",
|
||||
},
|
||||
]
|
||||
}
|
||||
|
|
|
@ -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",
|
||||
},
|
||||
],
|
||||
}
|
||||
|
|
17
build.zig
17
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue