From 648650d64c6777240f5e9e8ba5b005e7b6f415c3 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Sat, 10 Oct 2020 19:01:56 +0200 Subject: [PATCH] Makefile: ignore warnings in OpenCV headers OpenCV header files were triggering a lot of warnings because of the strict compiler flags set for the project. Instead of disabling the warnings treat the OpenCV headers as system dependencies, this way the compiler will ignore warnings on them but will still apply the warnings to the project code. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 75dde40..bd0d850 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ ifeq ($(COMPILER), clang) LDFLAGS += -Qunused-arguments endif -CXXFLAGS += $(shell pkg-config --cflags opencv4) +CXXFLAGS += $(shell pkg-config --cflags opencv4 | sed -e 's/-I/-isystem/g') LDLIBS += $(shell pkg-config --libs opencv4) LINK.o = $(LINK.cpp) -- 2.1.4