diff options
| author | 2021-11-02 23:11:26 +0100 | |
|---|---|---|
| committer | 2021-11-02 23:11:26 +0100 | |
| commit | b1bd21a66a24ab929e2c9911fa6f5d09970d3ab5 (patch) | |
| tree | f67af409669585982717442608c96f42bc7bb30b /build.zig | |
| parent | implement savepoint (diff) | |
| download | zig-sqlite-b1bd21a66a24ab929e2c9911fa6f5d09970d3ab5.tar.gz zig-sqlite-b1bd21a66a24ab929e2c9911fa6f5d09970d3ab5.tar.xz zig-sqlite-b1bd21a66a24ab929e2c9911fa6f5d09970d3ab5.zip | |
add options to enable wine/wasmtime/darling for tests
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 6 |
1 files changed, 6 insertions, 0 deletions
| @@ -150,7 +150,10 @@ pub fn build(b: *std.build.Builder) void { | |||
| 150 | const in_memory = b.option(bool, "in_memory", "Should the tests run with sqlite in memory (default true)") orelse true; | 150 | const in_memory = b.option(bool, "in_memory", "Should the tests run with sqlite in memory (default true)") orelse true; |
| 151 | const dbfile = b.option([]const u8, "dbfile", "Always use this database file instead of a temporary one"); | 151 | const dbfile = b.option([]const u8, "dbfile", "Always use this database file instead of a temporary one"); |
| 152 | const use_bundled = b.option(bool, "use_bundled", "Use the bundled sqlite3 source instead of linking the system library (default false)"); | 152 | const use_bundled = b.option(bool, "use_bundled", "Use the bundled sqlite3 source instead of linking the system library (default false)"); |
| 153 | const enable_wine = b.option(bool, "enable_wine", "Enable wine for running tests (default false)") orelse false; | ||
| 153 | const enable_qemu = b.option(bool, "enable_qemu", "Enable qemu for running tests (default false)") orelse false; | 154 | const enable_qemu = b.option(bool, "enable_qemu", "Enable qemu for running tests (default false)") orelse false; |
| 155 | const enable_wasmtime = b.option(bool, "enable_wasmtime", "Enable wasmtime for running tests (default false)") orelse false; | ||
| 156 | const enable_darling = b.option(bool, "enable_darling", "Enable darling for running tests (default false)") orelse false; | ||
| 154 | 157 | ||
| 155 | const target = b.standardTargetOptions(.{}); | 158 | const target = b.standardTargetOptions(.{}); |
| 156 | 159 | ||
| @@ -195,7 +198,10 @@ pub fn build(b: *std.build.Builder) void { | |||
| 195 | tests.setTarget(cross_target); | 198 | tests.setTarget(cross_target); |
| 196 | tests.addIncludeDir("c"); | 199 | tests.addIncludeDir("c"); |
| 197 | linkSqlite(tests); | 200 | linkSqlite(tests); |
| 201 | tests.enable_wine = enable_wine; | ||
| 198 | tests.enable_qemu = enable_qemu; | 202 | tests.enable_qemu = enable_qemu; |
| 203 | tests.enable_wasmtime = enable_wasmtime; | ||
| 204 | tests.enable_darling = enable_darling; | ||
| 199 | 205 | ||
| 200 | const tests_options = b.addOptions(); | 206 | const tests_options = b.addOptions(); |
| 201 | tests.addOptions("build_options", tests_options); | 207 | tests.addOptions("build_options", tests_options); |