meson: Prepare for subprojects

Google-Bug-Id: 179721407
Change-Id: I517dcb47d7c73fa4f3c7fcc25146b77de50d69b8
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/meson.build b/meson.build
index a7bb4a2..c9d8c86 100644
--- a/meson.build
+++ b/meson.build
@@ -1,8 +1,21 @@
 project(
   'google-misc',
+  'c',
   version: '0.1',
   meson_version: '>=0.53.2',
   default_options: [
     'warning_level=3',
     'werror=true',
+    'cpp_std=c++17',
+    'c_std=c18',
+    'tests=' + (meson.is_subproject() ? 'disabled' : 'auto'),
   ])
+
+# Dummy file to make code coverage happy
+executable('hello', 'hello.c')
+
+# Meson has no feature option to str...
+tests_str = get_option('tests').enabled() ? 'enabled' : 'disabled'
+if get_option('tests').auto()
+  tests_str = 'auto'
+endif