feat(benchmark): add benchmark build (with build option) to test frame rate
This commit is contained in:
@@ -15,6 +15,14 @@ pub fn build(b: *std.Build) void {
|
||||
// set a preferred release mode, allowing the user to decide how to optimize.
|
||||
const optimize = b.standardOptimizeOption(.{});
|
||||
|
||||
// build options to customize the log message formatting
|
||||
const benchmark = b.option(bool, "benchmark", "Create a benchmark build (default: false)") orelse false;
|
||||
|
||||
const options = b.addOptions();
|
||||
options.addOption(bool, "benchmark", benchmark);
|
||||
|
||||
const options_module = options.createModule();
|
||||
|
||||
// Dependencies
|
||||
const vaxis_dep = b.dependency("vaxis", .{
|
||||
.optimize = optimize,
|
||||
@@ -37,6 +45,7 @@ pub fn build(b: *std.Build) void {
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
exe.root_module.addImport("build_options", options_module);
|
||||
exe.root_module.addImport("vaxis", vaxis_dep.module("vaxis"));
|
||||
exe.root_module.addImport("zlog", zlog_dep.module("zlog"));
|
||||
exe.root_module.addImport("zmd", zmd_dep.module("zmd"));
|
||||
|
||||
Reference in New Issue
Block a user