From: Vladimir Prus (ghost_at_[hidden])
Date: 2006-03-31 08:40:32
On Tuesday 28 March 2006 11:39, Emil Dotchevski wrote:
> With -wall, GCC warns about classes with virtual functions but with no
> virtual destructor, even if the destructor is protected and is never called
> virtually. So I use "<toolset>gcc:<cflags>-Wno-non-virtual-dtor" in my
> jamroot to disable this warning globally, and it works, but then I get this
> on C files:
> cc1: warning: command line option "-Wno-non-virtual-dtor" is valid for
> C++/ObjC++ but not for C
> I tried to use <cxxflags> instead of <cflags>, but then boost-build doesn't
> pass "-Wno-non-virtual-dtor" when compiling CPP files.
> What am I doing wrong? This warning just sucks, how do I disable it for
I'm afraid I can't reproduce this. I have a project with Jamroot containing
exe a : a.cpp : <toolset>gcc:<cxxflags>-Wno-non-virtual-dtor ;
and empty a.cpp and running "bjam -n" shows the -Wno-non-virtual-dtor option.
Do you get the problem on such reduced testcase?
If yes, your Boost.Build is probably out of date. If no, there's something
more complex going on, and you'd need to provide a minimal testcase
reproducing the problem.
-- Vladimir Prus http://vladimir_prus.blogspot.com Boost.Build V2: http://boost.org/boost-build2
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