From 47c89b36d7754913e5a49b25f5e8d2fa09650ef9 Mon Sep 17 00:00:00 2001 From: Daniel Stevens Date: Mon, 3 Mar 2025 19:42:54 -0700 Subject: [PATCH 1/2] Have `show-warnings` run `clean-all` If we want to see warnings for the unit test and demo project too, then we should clean all build outputs, not just the main library's build outputs. --- makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/makefile b/makefile index 40cd377a..a77fa37c 100644 --- a/makefile +++ b/makefile @@ -187,9 +187,9 @@ $(PACKAGE_NAME): $(OUTPUT) $(shell find $(SRCDIR) -name '*.h') .PHONY: show-warnings show-warnings: - @$(MAKE) clean > /dev/null + @$(MAKE) clean-all > /dev/null $(MAKE) --output-sync all CXX=clang++ CXXFLAGS_WARN=-Weverything 2>&1 >/dev/null | grep -o "\[-W.*\]" | sort | uniq - @$(MAKE) clean > /dev/null + @$(MAKE) clean-all > /dev/null .PHONY: lint lint: cppcheck cppclean From b5bb18fd430777809873dbe863e2d17e1fceb382 Mon Sep 17 00:00:00 2001 From: Daniel Stevens Date: Mon, 3 Mar 2025 19:48:05 -0700 Subject: [PATCH 2/2] Add ability to suppress uninteresting warnings --- makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/makefile b/makefile index a77fa37c..3e9d42c6 100644 --- a/makefile +++ b/makefile @@ -185,10 +185,12 @@ $(PACKAGE_NAME): $(OUTPUT) $(shell find $(SRCDIR) -name '*.h') ## Linting ## +WarnNoUninteresting := -Wno-c++98-compat-pedantic -Wno-pre-c++17-compat + .PHONY: show-warnings show-warnings: @$(MAKE) clean-all > /dev/null - $(MAKE) --output-sync all CXX=clang++ CXXFLAGS_WARN=-Weverything 2>&1 >/dev/null | grep -o "\[-W.*\]" | sort | uniq + $(MAKE) --output-sync all CXX=clang++ CXXFLAGS_WARN="-Weverything $(WarnNoUninteresting)" 2>&1 >/dev/null | grep -o "\[-W.*\]" | sort | uniq @$(MAKE) clean-all > /dev/null .PHONY: lint