diff options
| author | 2021-01-31 03:45:22 +0100 | |
|---|---|---|
| committer | 2021-01-31 03:45:50 +0100 | |
| commit | 0c43f7e1282d64ca0f7d70b8ab242ed157af0914 (patch) | |
| tree | 79cd2e1edc2a9932c68ee3d134387325a07d6ca8 | |
| parent | add incremental i/o on blob (diff) | |
| download | zig-sqlite-0c43f7e1282d64ca0f7d70b8ab242ed157af0914.tar.gz zig-sqlite-0c43f7e1282d64ca0f7d70b8ab242ed157af0914.tar.xz zig-sqlite-0c43f7e1282d64ca0f7d70b8ab242ed157af0914.zip | |
build: add the dbfile option
| -rw-r--r-- | build.zig | 2 |
1 files changed, 2 insertions, 0 deletions
| @@ -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); |