aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-06-19 00:17:45 -0700
committerFuwn <[email protected]>2022-06-19 00:17:45 -0700
commit7811d4288d91f0c15d834982ffdc6adfbeecc4a0 (patch)
tree03651001e07110c4a0c9ea94c036355aeb542ecc
parentci(check): cache llvm (diff)
downloadtatl-7811d4288d91f0c15d834982ffdc6adfbeecc4a0.tar.xz
tatl-7811d4288d91f0c15d834982ffdc6adfbeecc4a0.zip
chore(meson): optionalize clang-tidy
-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')