From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2019-12-15 14:01:58
On Sun, Dec 15, 2019 at 7:21 AM Alexander Grund via Boost <
> I want to build at least the tests but better also the library sources
> itself with warnings enabled and warnings-as-errors to avoid regressions.
> From BoostAssert I found the following snipped added to the top of
> project : requirements
> <warnings-as-errors>on ;
> Further down I have a dependency on BoostFilesystem like:
> run test_stdio.cpp : : : <library>/boost/filesystem//boost_filesystem ;
> But now the build of BoostFilesystem fails:
> libs/filesystem/src/directory.cpp:217:48: error: unused parameter 'buffer'
> Is there any way to restrict the warnings to my project only?
No, as warnings-as-error is a propagated feature.
> Or at least the warnings-as-errors option?
You can instead depend on boost_filesystem sans error warns with:
run test_stdio.cpp : : :
> Is there a way to set warnings-as-errors via b2 command only for this
> library? This would avoid putting it in the Jamfile which could affect
> end-users, but having it on CI is actually enough.
You can't selectively specify it in the CLI. It's going to be "global" at
that point. I don't see how it can affect end-users if it's in the tests
-- -- Rene Rivera -- Grafik - Don't Assume Anything -- Robot Dreams - http://robot-dreams.net
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk