aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--meson.build24
-rw-r--r--meson_options.txt4
3 files changed, 20 insertions, 11 deletions
diff --git a/.gitignore b/.gitignore
index a265be2..301b324 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,3 +10,6 @@ CMakeLists.txt
# Meson
build*
+
+# clangd
+.cache
diff --git a/meson.build b/meson.build
index 91356b4..029cde4 100644
--- a/meson.build
+++ b/meson.build
@@ -57,14 +57,16 @@ run_target('format',
project_header_files,
])
-run_target('tidy',
- command : [
- 'run-clang-tidy',
- # '-fix',
- '-j',
- '8',
- 'files',
- '.', # '^((?!(fuwn)).)*$',
- '-format',
- '-p=' + meson.build_root()
- ])
+if get_option('tidy')
+ run_target('tidy',
+ command : [
+ 'run-clang-tidy',
+ # '-fix',
+ '-j',
+ '8',
+ 'files',
+ '.', # '^((?!(fuwn)).)*$',
+ '-format',
+ '-p=' + meson.build_root()
+ ])
+endif
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..161c91b
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,4 @@
+option('tidy',
+ type : 'boolean',
+ value : false,
+ description : 'Enables the clang-tidy target')