From: Antonio Ospite Date: Sat, 10 Oct 2020 17:01:56 +0000 (+0200) Subject: Makefile: ignore warnings in OpenCV headers X-Git-Url: https://git.ao2.it/experiments/opencv_trail_effect.git/commitdiff_plain/648650d64c6777240f5e9e8ba5b005e7b6f415c3?ds=inline;hp=9c0fa72ef05f2cc8dde373376b733b6b67e76e97 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. --- 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)