|
Boost : |
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 <
boost_at_[hidden]> wrote:
> Hi,
>
> 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
> test/Jamfile.v2:
>
>
> project : requirements
> <warnings>pedantic
> <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:
>
> gcc.compile.c++
> bin.v2/libs/filesystem/build/gcc-5.4.0/release/cxxstd-11-iso/threading-multi/visibility-hidden/directory.o
> libs/filesystem/src/directory.cpp:217:48: error: unused parameter 'buffer'
> [-Werror=unused-parameter]
>
>
> 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 : : :
<library>/boost/filesystem//boost_filesystem/<warnings-as-errors>off ;
> 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
only.
-- -- 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