summaryrefslogtreecommitdiffstats
path: root/share/mk/configure/build-depends/cppcheck
diff options
context:
space:
mode:
Diffstat (limited to 'share/mk/configure/build-depends/cppcheck')
-rw-r--r--share/mk/configure/build-depends/cppcheck/cppcheck.mk25
1 files changed, 25 insertions, 0 deletions
diff --git a/share/mk/configure/build-depends/cppcheck/cppcheck.mk b/share/mk/configure/build-depends/cppcheck/cppcheck.mk
new file mode 100644
index 0000000..2a5d844
--- /dev/null
+++ b/share/mk/configure/build-depends/cppcheck/cppcheck.mk
@@ -0,0 +1,25 @@
+# Copyright 2022-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_CPPCHECK_CPPCHECK_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_CPPCHECK_CPPCHECK_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/configure/directory_variables/src.mk
+
+
+CPPCHECK_SUPPRESS := $(SYSCONFDIR)/cppcheck/cppcheck.suppress
+DEFAULT_CPPCHECKFLAGS := \
+ --enable=all \
+ --error-exitcode=2 \
+ --inconclusive \
+ --check-level=exhaustive \
+ --quiet \
+ --suppressions-list=$(CPPCHECK_SUPPRESS)
+EXTRA_CPPCHECKFLAGS :=
+CPPCHECKFLAGS := $(DEFAULT_CPPCHECKFLAGS) $(EXTRA_CPPCHECKFLAGS)
+CPPCHECK := cppcheck
+
+
+endif # include guard