summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vincent Rischmann2021-01-31 03:45:22 +0100
committerGravatar Vincent Rischmann2021-01-31 03:45:50 +0100
commit0c43f7e1282d64ca0f7d70b8ab242ed157af0914 (patch)
tree79cd2e1edc2a9932c68ee3d134387325a07d6ca8
parentadd incremental i/o on blob (diff)
downloadzig-sqlite-0c43f7e1282d64ca0f7d70b8ab242ed157af0914.tar.gz
zig-sqlite-0c43f7e1282d64ca0f7d70b8ab242ed157af0914.tar.xz
zig-sqlite-0c43f7e1282d64ca0f7d70b8ab242ed157af0914.zip
build: add the dbfile option
-rw-r--r--build.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/build.zig b/build.zig
index b48f43d..0a715b0 100644
--- a/build.zig
+++ b/build.zig
@@ -17,6 +17,7 @@ pub fn build(b: *std.build.Builder) void {
17 const mode = b.standardReleaseOptions(); 17 const mode = b.standardReleaseOptions();
18 18
19 const in_memory = b.option(bool, "in_memory", "Should the tests run with sqlite in memory (default true)") orelse true; 19 const in_memory = b.option(bool, "in_memory", "Should the tests run with sqlite in memory (default true)") orelse true;
20 const dbfile = b.option([]const u8, "dbfile", "Always use this database file instead of a temporary one");
20 const use_bundled = b.option(bool, "use_bundled", "Use the bundled sqlite3 source instead of linking the system library (default false)") orelse false; 21 const use_bundled = b.option(bool, "use_bundled", "Use the bundled sqlite3 source instead of linking the system library (default false)") orelse false;
21 22
22 // Build sqlite from source if asked 23 // Build sqlite from source if asked
@@ -43,6 +44,7 @@ pub fn build(b: *std.build.Builder) void {
43 main_tests.setTarget(target); 44 main_tests.setTarget(target);
44 main_tests.setBuildMode(mode); 45 main_tests.setBuildMode(mode);
45 main_tests.addBuildOption(bool, "in_memory", in_memory); 46 main_tests.addBuildOption(bool, "in_memory", in_memory);
47 main_tests.addBuildOption(?[]const u8, "dbfile", dbfile);
46 48
47 const test_step = b.step("test", "Run library tests"); 49 const test_step = b.step("test", "Run library tests");
48 test_step.dependOn(&main_tests.step); 50 test_step.dependOn(&main_tests.step);