summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorian "sp1rit"​ <sp1ritCS@protonmail.com>2022-06-18 13:09:38 +0200
committerFlorian "sp1rit"​ <sp1ritCS@protonmail.com>2022-06-18 13:09:38 +0200
commit7c3626f15ed25b1d9eb4c14f7e4f887fab2ab62a (patch)
tree4ea1b393a0ecbe64511ff911fd787c5c92305998 /src
parent75918c14d767af3a70010c9d57a0e97bd01a3334 (diff)
meson: ensure non-debug builds will use proper configuration
meson will set add -DHYPRLAND_DEBUG to CXXFLAGS during compilation of debug builds. this avoids NDEBUG issues with wlroots and ensures asserts will also work on release builds.
Diffstat (limited to 'src')
-rw-r--r--src/debug/HyprCtl.cpp3
-rw-r--r--src/defines.hpp4
2 files changed, 7 insertions, 0 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp
index 83656e13..66a8128d 100644
--- a/src/debug/HyprCtl.cpp
+++ b/src/debug/HyprCtl.cpp
@@ -114,6 +114,9 @@ std::string versionRequest() {
#ifndef NDEBUG
result += "debug\n";
#endif
+#ifdef HYPRLAND_DEBUG
+ result += "debug\n";
+#endif
#ifdef NO_XWAYLAND
result += "no xwayland\n";
#endif
diff --git a/src/defines.hpp b/src/defines.hpp
index 18db3955..80750c23 100644
--- a/src/defines.hpp
+++ b/src/defines.hpp
@@ -7,10 +7,14 @@
#include "wlrunstable/wlr_ext_workspace_v1.hpp"
#ifndef NDEBUG
+#ifdef HYPRLAND_DEBUG
#define ISDEBUG true
#else
#define ISDEBUG false
#endif
+#else
+#define ISDEBUG false
+#endif
#define RIP(format, ... ) { fprintf(stderr, format "\n", ##__VA_ARGS__); exit(EXIT_FAILURE); }