From 20f6bc1e25b366c55fb95fb084ded37407042071 Mon Sep 17 00:00:00 2001 From: Bjoern Brandenburg Date: Wed, 11 Apr 2012 14:39:17 +0200 Subject: Suppress superfluous warnings - There are many unused parameters. This is ok, so tell gcc to ignore them. - The code still uses the (well-working) class ext::hash_map<>, which will trigger deprecation warnings. Ignore this for now; the alternatives are only available in recent C++ standard libraries. - Disable warnings alltogether for Swig-generated code. Swig sometimes generates meaningless self-assignments and triggers strict aliasing and a bunch of other warnings. Let's just trust Swig that it knows what it is doing. --- native/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/native/Makefile b/native/Makefile index a4ce685..27019a3 100644 --- a/native/Makefile +++ b/native/Makefile @@ -14,7 +14,8 @@ GMP_PATH ?= /usr # #### Flags #### -DISABLED_WARNINGS = -Wno-unused-parameter -Wno-deprecated +DISABLED_WARNINGS = -Wno-unused-parameter # Too much noise. +DISABLED_WARNINGS += -Wno-deprecated # We still use ext::hash_map<>. INCLUDES = -Iinclude -I${GMP_PATH}/include LIBS = -L${GMP_PATH}/lib -lgmp -lgmpxx @@ -35,7 +36,7 @@ PYTHON_LIB ?= SOFLAGS = -shared endif -CXXFLAGS = -Wall -Wextra -fPIC $(DISABLED_WARNINGS) $(INCLUDES) +CXXFLAGS = -Wall -Wextra $(DISABLED_WARNINGS) -fPIC $(INCLUDES) LDFLAGS = $(LIBS) SWIGFLAGS = -python -c++ -outdir . -includeall -Iinclude @@ -76,7 +77,7 @@ interface/%_wrap.cc: interface/%.i $(SWIG) $(SWIGFLAGS) -o $@ $< interface/%_wrap.o: interface/%_wrap.cc - $(CXX) $(CXXFLAGS) $(PYTHON_INC) -c -o $@ $+ + $(CXX) -fPIC $(INCLUDES) $(PYTHON_INC) -c -o $@ $+ _sched.so: ${CORE_OBJ} ${EDF_OBJ} interface/sched_wrap.o $(CXX) $(LDFLAGS) $(SOFLAGS) $(PYTHON_LIB) -o $@ $+ -- cgit v1.2.2