|
Boost-Build : |
From: Artem Alimarine (artem_at_[hidden])
Date: 2006-08-10 06:00:54
Hi,
I have a high warning level in my project. It leads to lots of warnings
in stl and boost includes. How do I filter warnings in the system
include files and in boost?
On MSVC I can suppress them by pragmas. However there is no such pragmas
in GCC. I tried to use -Wno-system-headers and -isystem to give the root
boost directory as the system include directory. However, I still get a
lot of boost warnings. It seems that -isystem only disables warnings in
the BOOST root include directory. Not in the subdirectories. Adding the
subdirectories does not help.
My Jamfile has the following:
project frame
: requirements
<library>/boost//date_time/
<include>$(PROJECT_ROOT)/..
<include>$(PROJECT_ROOT)
<define>BOOST_ALL_NO_LIB
<link>static
<threading>multi
<toolset>gcc:<cflags>-Wall
<toolset>gcc:<cflags>-Woverloaded-virtual
<toolset>gcc:<cflags>-Weffc++
<toolset>gcc:<cflags>-Wold-style-cast
# <toolset>gcc:<cflags>-Wstrict-null-sentinel
<toolset>gcc:<cflags>-Wsign-promo
<toolset>gcc:<cflags>-Wno-system-headers
<toolset>gcc:<cflags>"-isystem "$(BOOST_ROOT)
<toolset>msvc:<define>_WIN32_WINNT=0x0501
<toolset>msvc:<define>NOMINMAX
<toolset>msvc:<cxxflags>"-Wall -Wp64"
<toolset>msvc:<cxxflags>"-wd4250 -wd4355 -wd4996 -wd4668 -wd4820
-wd4710 -wd4625 -wd4626 -wd4100 -wd4127 -wd4371 -wd4711 -wd4061 -wd4640
-wd4619 -wd4548 -wd4571 -wd4514"
<toolset>msvc:<cxxflags>"-we4701 -we4706"
: default-build debug
;
Example warning:
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_list.h: In
instantiation of `std::_List_iterator<boost::unit_test::test_suite*>':
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_list.h:732:
instantiated from `typename _Alloc::reference std::list<_Tp,
_Alloc>::back() [with _Tp = boost::unit_test::test_suite*, _Alloc =
std::allocator<boost::unit_test::test_suite*>]'
/cygdrive/c/boost-cvs/boost/boost/test/unit_test_suite_impl.hpp:264:
instantiated from here
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_list.h:112:
warning: `struct std::_List_iterator<boost::unit_test::test_suite*>' has
pointer data members
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_list.h:112:
warning: but does not override
`std::_List_iterator<boost::unit_test::test_suite*>(const
std::_List_iterator<boost::unit_test::test_suite*>&)'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_list.h:112:
warning: or `operator=(const
std::_List_iterator<boost::unit_test::test_suite*>&)'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_list.h: In
instantiation of `std::_List_const_iterator<boost::unit_test::test_suite*>':
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_list.h:676:
instantiated from `size_t std::list<_Tp, _Alloc>::size() const [with _Tp
= boost::unit_test::test_suite*, _Alloc =
std::allocator<boost::unit_test::test_suite*>]'
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk