diff options
| author | Isaac Freund <ifreund@ifreund.xyz> | 2021-06-24 19:34:15 +0200 |
|---|---|---|
| committer | Isaac Freund <ifreund@ifreund.xyz> | 2021-06-24 19:34:15 +0200 |
| commit | 3392b21aa8982c1a9d5bf25307830a4294e5ae4c (patch) | |
| tree | 226c14cde04877e6afae8593d6aa5a6b052b5d9c | |
| parent | 951c11f6423c7343125ee9e7ef8b26bb8fe46430 (diff) | |
| download | river-3392b21aa8982c1a9d5bf25307830a4294e5ae4c.tar.gz river-3392b21aa8982c1a9d5bf25307830a4294e5ae4c.tar.xz | |
build: assert wlroots version at comptime
This will prevent people compiling river against the wrong wlroots
version and wondering why it crashes.
| m--------- | deps/zig-wlroots | 0 | ||||
| -rw-r--r-- | river/main.zig | 8 |
2 files changed, 8 insertions, 0 deletions
diff --git a/deps/zig-wlroots b/deps/zig-wlroots -Subproject c5f759484ec2bb6afdee54053f5b0aaccf06013 +Subproject b270171f7bfe19eb15c1bb2b20121dd9e7ac32f diff --git a/river/main.zig b/river/main.zig index 874b518..3a2d5ee 100644 --- a/river/main.zig +++ b/river/main.zig @@ -16,9 +16,17 @@ // along with this program. If not, see <https://www.gnu.org/licenses/>. const std = @import("std"); +const assert = std.debug.assert; const os = std.os; + const wlr = @import("wlroots"); +// River requires wlroots 0.14 +comptime { + assert(wlr.version.major == 0); + assert(wlr.version.minor == 14); +} + const build_options = @import("build_options"); const c = @import("c.zig"); |
