Hide clang warnings when building tests

This commit is contained in:
Erik Ekman 2020-07-03 17:58:53 +02:00
parent d8f3ac8971
commit ed78f1b43f
1 changed files with 6 additions and 0 deletions

View File

@ -8,6 +8,12 @@ CHECK_PATH = /usr/local
LDFLAGS = -L$(CHECK_PATH)/lib `pkg-config check --libs` -lpthread `sh ../src/osflags $(TARGETOS) link` LDFLAGS = -L$(CHECK_PATH)/lib `pkg-config check --libs` -lpthread `sh ../src/osflags $(TARGETOS) link`
CFLAGS = -std=c99 -g -Wall -D$(OS) `pkg-config check --cflags` -I../src -I$(CHECK_PATH)/include -pedantic `sh ../src/osflags $(TARGETOS) cflags` CFLAGS = -std=c99 -g -Wall -D$(OS) `pkg-config check --cflags` -I../src -I$(CHECK_PATH)/include -pedantic `sh ../src/osflags $(TARGETOS) cflags`
# Hide clang warnings from check.h about "token pasting of ',' and __VA_ARGS__ is a GNU extension"
# and "'format' attribute argument not supported: gnu_printf"
ifeq (clang,$(findstring clang,$(CC)))
CFLAGS += -Wno-gnu-zero-variadic-macro-arguments -Wno-ignored-attributes
endif
all: $(TEST) all: $(TEST)
@LD_LIBRARY_PATH=${CHECK_PATH}/lib ./$(TEST) @LD_LIBRARY_PATH=${CHECK_PATH}/lib ./$(TEST)