diff options
| author | 2020-12-31 23:56:33 +0100 | |
|---|---|---|
| committer | 2020-12-31 23:56:33 +0100 | |
| commit | cc1fb80c3c7159c06b546b8724c0163c345ff0a9 (patch) | |
| tree | 10011ed4141b3536af21aded49762a10b84e1b85 | |
| parent | Merge pull request #11 from vrischmann/map-errors (diff) | |
| download | zig-sqlite-cc1fb80c3c7159c06b546b8724c0163c345ff0a9.tar.gz zig-sqlite-cc1fb80c3c7159c06b546b8724c0163c345ff0a9.tar.xz zig-sqlite-cc1fb80c3c7159c06b546b8724c0163c345ff0a9.zip | |
build: set the target
| -rw-r--r-- | build.zig | 3 |
1 files changed, 3 insertions, 0 deletions
| @@ -7,9 +7,11 @@ fn linkAll(obj: *std.build.LibExeObjStep) void { | |||
| 7 | } | 7 | } |
| 8 | 8 | ||
| 9 | pub fn build(b: *Builder) void { | 9 | pub fn build(b: *Builder) void { |
| 10 | const target = b.standardTargetOptions(.{}); | ||
| 10 | const mode = b.standardReleaseOptions(); | 11 | const mode = b.standardReleaseOptions(); |
| 11 | 12 | ||
| 12 | const lib = b.addStaticLibrary("zig-sqlite", "sqlite.zig"); | 13 | const lib = b.addStaticLibrary("zig-sqlite", "sqlite.zig"); |
| 14 | lib.setTarget(target); | ||
| 13 | lib.setBuildMode(mode); | 15 | lib.setBuildMode(mode); |
| 14 | linkAll(lib); | 16 | linkAll(lib); |
| 15 | lib.install(); | 17 | lib.install(); |
| @@ -17,6 +19,7 @@ pub fn build(b: *Builder) void { | |||
| 17 | const in_memory = b.option(bool, "in_memory", "Should the tests run with sqlite in memory") orelse false; | 19 | const in_memory = b.option(bool, "in_memory", "Should the tests run with sqlite in memory") orelse false; |
| 18 | 20 | ||
| 19 | var main_tests = b.addTest("sqlite.zig"); | 21 | var main_tests = b.addTest("sqlite.zig"); |
| 22 | main_tests.setTarget(target); | ||
| 20 | main_tests.setBuildMode(mode); | 23 | main_tests.setBuildMode(mode); |
| 21 | main_tests.addBuildOption(bool, "in_memory", in_memory); | 24 | main_tests.addBuildOption(bool, "in_memory", in_memory); |
| 22 | linkAll(main_tests); | 25 | linkAll(main_tests); |