build: Don't generate markdown for subprojects
Change-Id: Ib4351fc4601b00d54470d4069a78a2b23efb54aa
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/meson.build b/meson.build
index 759d836..7882d89 100644
--- a/meson.build
+++ b/meson.build
@@ -5,6 +5,7 @@
'cpp_std=c++20',
'warning_level=3',
'werror=true',
+ 'generate_md=' + (meson.is_subproject() ? 'false' : 'true'),
],
version: '1.0.0',
)
@@ -66,7 +67,7 @@
output: 'md',
capture: true,
depends: generated_others,
- build_by_default: true)
+ build_by_default: get_option('generate_md'))
generated_files_headers = []
generated_files_cpp = []
diff --git a/meson_options.txt b/meson_options.txt
index 929055d..aa06d2e 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,3 +1,4 @@
+option('generate_md', type: 'boolean', value: true)
option('libphosphor_dbus', type: 'boolean', value: true)
option('data_com_ibm', type: 'boolean', value: false)
option('data_org_open_power', type: 'boolean', value: false)