diff options
| author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2012-04-11 08:39:17 -0400 |
|---|---|---|
| committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2012-04-11 09:06:59 -0400 |
| commit | 20f6bc1e25b366c55fb95fb084ded37407042071 (patch) | |
| tree | 678a6dd413e62628f87e888886abec93fb9258d5 | |
| parent | 77b614ec4df27dc0713dc71a2bf38527a4df4386 (diff) | |
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.
| -rw-r--r-- | native/Makefile | 7 |
1 files 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 | |||
| 14 | 14 | ||
| 15 | # #### Flags #### | 15 | # #### Flags #### |
| 16 | 16 | ||
| 17 | DISABLED_WARNINGS = -Wno-unused-parameter -Wno-deprecated | 17 | DISABLED_WARNINGS = -Wno-unused-parameter # Too much noise. |
| 18 | DISABLED_WARNINGS += -Wno-deprecated # We still use ext::hash_map<>. | ||
| 18 | 19 | ||
| 19 | INCLUDES = -Iinclude -I${GMP_PATH}/include | 20 | INCLUDES = -Iinclude -I${GMP_PATH}/include |
| 20 | LIBS = -L${GMP_PATH}/lib -lgmp -lgmpxx | 21 | LIBS = -L${GMP_PATH}/lib -lgmp -lgmpxx |
| @@ -35,7 +36,7 @@ PYTHON_LIB ?= | |||
| 35 | SOFLAGS = -shared | 36 | SOFLAGS = -shared |
| 36 | endif | 37 | endif |
| 37 | 38 | ||
| 38 | CXXFLAGS = -Wall -Wextra -fPIC $(DISABLED_WARNINGS) $(INCLUDES) | 39 | CXXFLAGS = -Wall -Wextra $(DISABLED_WARNINGS) -fPIC $(INCLUDES) |
| 39 | LDFLAGS = $(LIBS) | 40 | LDFLAGS = $(LIBS) |
| 40 | SWIGFLAGS = -python -c++ -outdir . -includeall -Iinclude | 41 | SWIGFLAGS = -python -c++ -outdir . -includeall -Iinclude |
| 41 | 42 | ||
| @@ -76,7 +77,7 @@ interface/%_wrap.cc: interface/%.i | |||
| 76 | $(SWIG) $(SWIGFLAGS) -o $@ $< | 77 | $(SWIG) $(SWIGFLAGS) -o $@ $< |
| 77 | 78 | ||
| 78 | interface/%_wrap.o: interface/%_wrap.cc | 79 | interface/%_wrap.o: interface/%_wrap.cc |
| 79 | $(CXX) $(CXXFLAGS) $(PYTHON_INC) -c -o $@ $+ | 80 | $(CXX) -fPIC $(INCLUDES) $(PYTHON_INC) -c -o $@ $+ |
| 80 | 81 | ||
| 81 | _sched.so: ${CORE_OBJ} ${EDF_OBJ} interface/sched_wrap.o | 82 | _sched.so: ${CORE_OBJ} ${EDF_OBJ} interface/sched_wrap.o |
| 82 | $(CXX) $(LDFLAGS) $(SOFLAGS) $(PYTHON_LIB) -o $@ $+ | 83 | $(CXX) $(LDFLAGS) $(SOFLAGS) $(PYTHON_LIB) -o $@ $+ |
