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
 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:

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):

Follow me on Github:

Boost list run by bdawes at, gregod at, cpdaniel at, john at