bempp/bempp — pull request #52 by jenshnielsen (2014-01-30 10:09:19+00:00)
Title: Warnings/clang

This takes care of most of the warnings with clang

Some of the warnings are coming from fall back C++ 11 implementations inside dune. In order to fix this
we set the following c++ flags when enabling C++11 mode.

-DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_BOOST_MAKE_SHARED_HPP -DSHARED_PTR_NAMESPACE=std -DHAVE_TUPLE

These are set during the configure stage of the dune build by testing but that does not help when including the headers from
the bempp build so they should probably be tested and set during the bempp cmake step. Alternatively the code can be patched to define these flags. This is done at the moment for the null ptr implementation in dune which is similar.

It should be possible to use a system wide install of SWIG since there is no need to patch it and it is easily installable from home-brew apt-get, yum etc.

BEMPP ships some modules taken from other places. Numpy’s swig in numpy.i and dune foam grid. It should be clear which revision this comes from. Perhaps use git submodules for foam grid. Otherwise note it some were.

There is a lot of tautological compare warning because

dim = 1
and we have loops of the type

for (unsigned int j = 0; j < dim-1; ++1) where dim is a static const or templated parameter.
This is dune issue 1135 and clang/llvm bug 8682 it should be fixed in llvm 3.4. Compiling with llvm3.4 branch from homebrew confirms this.