mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-02 10:05:58 +01:00
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.
This commit is contained in:
parent
75918c14d7
commit
7c3626f15e
3 changed files with 11 additions and 0 deletions
|
@ -15,6 +15,10 @@ if not have_xwayland
|
||||||
add_project_arguments('-DNO_XWAYLAND', language: 'cpp')
|
add_project_arguments('-DNO_XWAYLAND', language: 'cpp')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if get_option('buildtype') == 'debug'
|
||||||
|
add_project_arguments('-DHYPRLAND_DEBUG', language: 'cpp')
|
||||||
|
endif
|
||||||
|
|
||||||
subdir('protocols')
|
subdir('protocols')
|
||||||
subdir('src')
|
subdir('src')
|
||||||
subdir('hyprctl')
|
subdir('hyprctl')
|
||||||
|
|
|
@ -114,6 +114,9 @@ std::string versionRequest() {
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
result += "debug\n";
|
result += "debug\n";
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HYPRLAND_DEBUG
|
||||||
|
result += "debug\n";
|
||||||
|
#endif
|
||||||
#ifdef NO_XWAYLAND
|
#ifdef NO_XWAYLAND
|
||||||
result += "no xwayland\n";
|
result += "no xwayland\n";
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -7,10 +7,14 @@
|
||||||
#include "wlrunstable/wlr_ext_workspace_v1.hpp"
|
#include "wlrunstable/wlr_ext_workspace_v1.hpp"
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
|
#ifdef HYPRLAND_DEBUG
|
||||||
#define ISDEBUG true
|
#define ISDEBUG true
|
||||||
#else
|
#else
|
||||||
#define ISDEBUG false
|
#define ISDEBUG false
|
||||||
#endif
|
#endif
|
||||||
|
#else
|
||||||
|
#define ISDEBUG false
|
||||||
|
#endif
|
||||||
|
|
||||||
#define RIP(format, ... ) { fprintf(stderr, format "\n", ##__VA_ARGS__); exit(EXIT_FAILURE); }
|
#define RIP(format, ... ) { fprintf(stderr, format "\n", ##__VA_ARGS__); exit(EXIT_FAILURE); }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue