Skip to content

Commit

Permalink
update build.zig
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenkristian committed Aug 30, 2022
1 parent 00c7cd5 commit b24bfcf
Showing 1 changed file with 8 additions and 19 deletions.
27 changes: 8 additions & 19 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,19 @@ pub fn build(b: *std.build.Builder) void {
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
const mode = b.standardReleaseOptions();

const brainf = b.addExecutable("brainf", "src/main.zig");
brainf.setTarget(target);
brainf.setBuildMode(mode);
brainf.install();

// const brainfuck = b.addExecutable("brainfuck", "src/main.zig");
// brainfuck.setTarget(target);
// brainfuck.setBuildMode(mode);
// brainfuck.install();

const run_brainf = brainf.run();
run_brainf.step.dependOn(b.getInstallStep());

// const run_brainfuck = brainfuck.run();
// run_brainfuck.step.dependOn(b.getInstallStep());
const exe = b.addExecutable("brainf", "src/main.zig");
exe.setTarget(target);
exe.setBuildMode(mode);
exe.install();

const run_cmd = exe.run();
run_cmd.step.dependOn(b.getInstallStep());
if (b.args) |args| {
run_brainf.addArgs(args);
// run_brainfuck.addArgs(args);
run_cmd.addArgs(args);
}

const run_step = b.step("run", "Run the app");
run_step.dependOn(&run_brainf.step);
// run_step.dependOn(&run_brainfuck.step);
run_step.dependOn(&run_cmd.step);

const exe_tests = b.addTest("src/main.zig");
exe_tests.setTarget(target);
Expand Down

0 comments on commit b24bfcf

Please sign in to comment.