meson: Don't build tests or examples if subproject
This can still be overridden, but it is probably the most sane setting.
Change-Id: I8aa4a68f94e536320d6203c2027119dc5d133984
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/meson.build b/meson.build
index e7c30b1..4f7bc49 100644
--- a/meson.build
+++ b/meson.build
@@ -3,7 +3,9 @@
default_options: [
'warning_level=3',
'werror=true',
- 'cpp_std=c++17'
+ 'cpp_std=c++17',
+ 'tests=' + (meson.is_subproject() ? 'disabled' : 'auto'),
+ 'examples=' + (meson.is_subproject() ? 'false' : 'true'),
])
subdir('src')