Add option to run the tests with mudflap to detect pointer errors.
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>
Sat, 9 Mar 2013 11:09:14 +0000 (13:09 +0200)
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>
Sat, 9 Mar 2013 11:09:14 +0000 (13:09 +0200)
tests/Makefile

index 181628a..40fcabe 100644 (file)
@@ -22,6 +22,14 @@ ifneq (,$(findstring clang,$(CC_VERSION)))
        CFLAGS_CORE=-pedantic -Wextra -Wcast-qual -Wconversion
 endif
 
+# Also use mudflap if it is available
+# To enable, run with    make -B USE_MUDFLAP=y
+USE_MUDFLAP ?= n
+ifeq ($(USE_MUDFLAP),y)
+       CFLAGS += -fmudflap
+       LDFLAGS += -lmudflap -fmudflap
+endif
+
 all: breakpoints $(TESTS) run_unittests
 
 clean: