Boost logo

Boost :

Subject: [boost] [build] Annoying warnings from Asio, -isystem from bjam?
From: Vinnie Falco (vinnie.falco_at_[hidden])
Date: 2016-11-02 19:00:43


When I have "-Wunused-variable" I get these highly annoying warnings
from boost/asio/error.hpp which I'm sure almost everyone has seen:

boost_1_60_0/boost/asio/error.hpp:258:45: warning:
‘boost::asio::error::system_category’ defined but not used
[-Wunused-variable]
 static const boost::system::error_category& system_category

I don't want to disable the warning but I also don't want the false
positives. Thankfully, clang and gcc have this wonderful option
"-isystem" which lets you mark include paths as belonging to the
system. This prevents warnings from being emitted that the programmer
can do nothing about.

How can I get Boost.Build to add the Boost library header search paths
using "-isystem" so that gcc doesn't report warnings in Boost headers
that I cannot do anything about? More detail here:
http://stackoverflow.com/questions/1867065/how-to-suppress-gcc-warnings-from-library-headers

I've played around with <sysinclude> but can't seem to figure it out.
Here's my Jamroot (my project builds on its own, without putting it in
the Boost tree):
https://github.com/vinniefalco/Beast/blob/master/Jamroot#L80

-- 
Follow me on Github: https://github.com/vinniefalco

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk