meson: Convert options from feature to boolean
Features are things we can automatically enable or disable based on the
presence or absence of supporting dependencies. Neither ABI compliance
testing (despite the fact that we can detect the tool) nor tests fit
this category: They are developer tools and their use should be judged
ahead of the invocation of meson.
Change-Id: I9725cc0444d92c8443cfb28ecd878f77792f38ce
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/meson.build b/meson.build
index bf309ec..81f1982 100644
--- a/meson.build
+++ b/meson.build
@@ -9,13 +9,13 @@
'cpp_std': 'c++23',
'c_std': 'c17',
'b_ndebug': 'if-release',
- 'tests': (meson.is_subproject() ? 'disabled' : 'enabled'),
+ 'tests': not meson.is_subproject(),
},
version: '0.10.0',
meson_version: '>=1.3.0',
)
-if get_option('tests').allowed()
+if get_option('tests')
add_languages('cpp')
endif
@@ -74,7 +74,7 @@
subdir('include')
subdir('src')
-if get_option('tests').allowed()
+if get_option('tests')
subdir('tests')
endif