From e34b0064456f797dabd22fa3b8f248d7be6e3475 Mon Sep 17 00:00:00 2001 From: Martin Lenders Date: Sun, 23 Feb 2014 21:04:58 +0100 Subject: [PATCH] Fix rpl app for clang --- examples/rpl_udp/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/rpl_udp/Makefile b/examples/rpl_udp/Makefile index 2228c286b9..0a267c13f4 100644 --- a/examples/rpl_udp/Makefile +++ b/examples/rpl_udp/Makefile @@ -28,7 +28,11 @@ export RIOTBASE ?= $(CURDIR)/../.. export QUIET ?= 1 # get rid of the mandatory RPL warning -CFLAGS += "-Wno-cpp" +ifeq ($(shell $(CC) -Wno-cpp -E - 2>/dev/null >/dev/null dev/null ; echo $$?),0) + ifeq ($(shell LANG=C $(CC) -Wno-cpp -E - 2>&1 1>/dev/null dev/null | grep warning: | grep -- -Wno-cpp),) + CFLAGS += -Wno-cpp + endif +endif # Modules to include: