Skip to content

Commit 22ff262

Browse files
authored
Merge pull request #1328 from Anakael/pr/anakael/experimental-flag
build: Add experimental build option
2 parents a832814 + 2fb671f commit 22ff262

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

meson.build

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,10 @@ else
257257
src_files += 'src/modules/simpleclock.cpp'
258258
endif
259259

260+
if get_option('experimental')
261+
add_project_arguments('-DUSE_EXPERIMENTAL', language: 'cpp')
262+
endif
263+
260264
subdir('protocol')
261265

262266
executable(
@@ -383,3 +387,4 @@ if clangtidy.found()
383387
'-p', meson.build_root()
384388
] + src_files)
385389
endif
390+

meson_options.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ option('gtk-layer-shell', type: 'feature', value: 'auto', description: 'Use gtk-
1111
option('rfkill', type: 'feature', value: 'auto', description: 'Enable support for RFKILL')
1212
option('sndio', type: 'feature', value: 'auto', description: 'Enable support for sndio')
1313
option('tests', type: 'feature', value: 'auto', description: 'Enable tests')
14+
option('experimental', type : 'boolean', value : false, description: 'Enable experimental features')

src/factory.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@ waybar::AModule* waybar::Factory::makeModule(const std::string& name) const {
3030
if (ref == "wlr/taskbar") {
3131
return new waybar::modules::wlr::Taskbar(id, bar_, config_[name]);
3232
}
33+
#ifdef USE_EXPERIMENTAL
3334
if (ref == "wlr/workspaces") {
3435
return new waybar::modules::wlr::WorkspaceManager(id, bar_, config_[name]);
3536
}
3637
#endif
38+
#endif
3739
#ifdef HAVE_RIVER
3840
if (ref == "river/tags") {
3941
return new waybar::modules::river::Tags(id, bar_, config_[name]);

0 commit comments

Comments
 (0)