Clang ignores some options during linkage and warns about it:
clang: warning: argument unused during compilation: '-ansi'
clang: warning: argument unused during compilation: '-Wp,-D_FORTIFY_SOURCE=2'
Add -Qunused-arguments to LDFLAGS to suppress the warnings.
-Wunused-but-set-variable
endif
-Wunused-but-set-variable
endif
+ifeq ($(CXX),clang++)
+ LDFLAGS += -Qunused-arguments
+endif
+
CXXFLAGS += $(shell pkg-config --cflags opencv)
LDLIBS += $(shell pkg-config --libs opencv)
CXXFLAGS += $(shell pkg-config --cflags opencv)
LDLIBS += $(shell pkg-config --libs opencv)