[buid] disabling specific warnings
Can I pass a command line argument of some sort to tell Boost.Build V2 to disable some specific MSVC warnings?
Vladimir Prus wrote:
Yuval Ronen wrote:
Can I pass a command line argument of some sort to tell Boost.Build V2 to disable some specific MSVC warnings?
bjam cxxflags=<whatever-MSVC-option-you-want>
should work.
It doesn't. I tried bjam --toolset=msvc-8.0 cxxflags=/wd4251 but bjam spits errors about invalid arguments and aborts without building anything. So I tried bjam --toolset=msvc-8.0 --cxxflags=/wd4251 and it was better, but not good enough. It did compile this time, only warning 4251 was still not disabled. So I tried bjam -d+2 --toolset=msvc-8.0 --cxxflags=/wd4251 to show the actual command executed (as suggested by bjam --help) but I couldn't figure anything from it. It seems 'cl' is passed some .rsp files, instead of .cpp file (as I expected). The command line didn't include '/wd4251', but maybe it's because the usage of the .rsp file (which I have no idea what it is). To conclude, I still can't disable a warning...
Yuval Ronen wrote:
Vladimir Prus wrote:
Yuval Ronen wrote:
Can I pass a command line argument of some sort to tell Boost.Build V2 to disable some specific MSVC warnings? bjam cxxflags=<whatever-MSVC-option-you-want>
should work.
It doesn't. I tried
bjam --toolset=msvc-8.0 cxxflags=/wd4251
but bjam spits errors about invalid arguments and aborts without building anything. So I tried
bjam --toolset=msvc-8.0 --cxxflags=/wd4251
and it was better, but not good enough. It did compile this time, only warning 4251 was still not disabled. So I tried
bjam -d+2 --toolset=msvc-8.0 --cxxflags=/wd4251
to show the actual command executed (as suggested by bjam --help) but I couldn't figure anything from it. It seems 'cl' is passed some .rsp files, instead of .cpp file (as I expected). The command line didn't include '/wd4251', but maybe it's because the usage of the .rsp file (which I have no idea what it is).
To conclude, I still can't disable a warning...
Ping...
on Wed May 16 2007, Yuval Ronen
Yuval Ronen wrote:
Vladimir Prus wrote:
Yuval Ronen wrote:
Can I pass a command line argument of some sort to tell Boost.Build V2 to disable some specific MSVC warnings? bjam cxxflags=<whatever-MSVC-option-you-want>
should work.
It doesn't. I tried
bjam --toolset=msvc-8.0 cxxflags=/wd4251
but bjam spits errors about invalid arguments
What are the *exact* error messages?
and aborts without building anything. So I tried
bjam --toolset=msvc-8.0 --cxxflags=/wd4251
and it was better, but not good enough.
No, --cxxflags is not a valid option. Only cxxflags=... will have anything remotely like the right effect. The other one will be ignored.
It did compile this time, only warning 4251 was still not disabled. So I tried
bjam -d+2 --toolset=msvc-8.0 --cxxflags=/wd4251
to show the actual command executed (as suggested by bjam --help) but I couldn't figure anything from it. It seems 'cl' is passed some .rsp files, instead of .cpp file (as I expected). The command line didn't include '/wd4251', but maybe it's because the usage of the .rsp file (which I have no idea what it is).
Yeah, so look at the commands that build the .rsp file. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com Don't Miss BoostCon 2007! ==> http://www.boostcon.com
David Abrahams wrote:
on Wed May 16 2007, Yuval Ronen
wrote: Yuval Ronen wrote:
Vladimir Prus wrote:
Yuval Ronen wrote:
Can I pass a command line argument of some sort to tell Boost.Build V2 to disable some specific MSVC warnings? bjam cxxflags=<whatever-MSVC-option-you-want>
should work. It doesn't. I tried
bjam --toolset=msvc-8.0 cxxflags=/wd4251
but bjam spits errors about invalid arguments
What are the *exact* error messages?
The exact command line was bjam --toolset=msvc-8.0 --without-python cxxflags=/wd4251 stage and the exact output was D:/Projects/Boost/boost_1_34_0/tools/build/v2/build\property.jam:282: in validate1 from module property error: Invalid property '<cxxflags>': No value specified for feature 'cxxflags'. D:/Projects/Boost/boost_1_34_0/tools/build/v2/build\property.jam:290: in property.validate from module property D:/Projects/Boost/boost_1_34_0/tools/build/v2/build\build-request.jam:185: in convert-command-line-element from module build-request D:/Projects/Boost/boost_1_34_0/tools/build/v2/build\build-request.jam:143: in build-request.from-command-line from module build-request D:/Projects/Boost/boost_1_34_0/tools/build/v2\build-system.jam:265: in load from module build-system D:\Projects\Boost\boost_1_34_0\tools\build\v2/kernel\modules.jam:261: in import from module modules D:\Projects\Boost\boost_1_34_0\tools\build\v2/kernel/bootstrap.jam:132: in boost-build from module D:\Projects\Boost\boost_1_34_0\boost-build.jam:9: in module scope from module
and aborts without building anything. So I tried
bjam --toolset=msvc-8.0 --cxxflags=/wd4251
and it was better, but not good enough.
No, --cxxflags is not a valid option. Only cxxflags=... will have anything remotely like the right effect. The other one will be ignored.
As someone else pointed out, it would be nice if wrong options would generate an error message rather than being ignored...
Yuval Ronen wrote:
David Abrahams wrote:
on Wed May 16 2007, Yuval Ronen
wrote: Yuval Ronen wrote:
Vladimir Prus wrote:
Yuval Ronen wrote:
Can I pass a command line argument of some sort to tell Boost.Build V2 to disable some specific MSVC warnings? bjam cxxflags=<whatever-MSVC-option-you-want>
should work. It doesn't. I tried
bjam --toolset=msvc-8.0 cxxflags=/wd4251
but bjam spits errors about invalid arguments What are the *exact* error messages?
The exact command line was
bjam --toolset=msvc-8.0 --without-python cxxflags=/wd4251 stage
and the exact output was
D:/Projects/Boost/boost_1_34_0/tools/build/v2/build\property.jam:282: in validate1 from module property error: Invalid property '<cxxflags>': No value specified for feature 'cxxflags'. D:/Projects/Boost/boost_1_34_0/tools/build/v2/build\property.jam:290: in property.validate from module property D:/Projects/Boost/boost_1_34_0/tools/build/v2/build\build-request.jam:185: in convert-command-line-element from module build-request D:/Projects/Boost/boost_1_34_0/tools/build/v2/build\build-request.jam:143: in build-request.from-command-line from module build-request D:/Projects/Boost/boost_1_34_0/tools/build/v2\build-system.jam:265: in load from module build-system D:\Projects\Boost\boost_1_34_0\tools\build\v2/kernel\modules.jam:261: in import from module modules D:\Projects\Boost\boost_1_34_0\tools\build\v2/kernel/bootstrap.jam:132: in boost-build from module D:\Projects\Boost\boost_1_34_0\boost-build.jam:9: in module scope from module
Actually, that's not the whole output. The first lines were the usual regex Unicode stuff: Building Boost.Regex with the optional Unicode/ICU support disabled. Please refer to the Boost.Regex documentation for more information (don't panic: this is a strictly optional feature). The errors above were printed after. Don't know if it's of any help...
"Yuval Ronen"
The exact command line was
bjam --toolset=msvc-8.0 --without-python cxxflags=/wd4251 stage
and the exact output was
D:/Projects/Boost/boost_1_34_0/tools/build/v2/build\property.jam:282: in validate1 from module property error: Invalid property '<cxxflags>': No value specified for feature 'cxxflags'. D:/Projects/Boost/boost_1_34_0/tools/build/v2/build\property.jam:290: in property.validate from module property D:/Projects/Boost/boost_1_34_0/tools/build/v2/build\build-request.jam:185: in convert-command-line-element from module build-request D:/Projects/Boost/boost_1_34_0/tools/build/v2/build\build-request.jam:143: in build-request.from-command-line from module build-request D:/Projects/Boost/boost_1_34_0/tools/build/v2\build-system.jam:265: in load from module build-system D:\Projects\Boost\boost_1_34_0\tools\build\v2/kernel\modules.jam:261: in import from module modules D:\Projects\Boost\boost_1_34_0\tools\build\v2/kernel/bootstrap.jam:132: in boost-build from module D:\Projects\Boost\boost_1_34_0\boost-build.jam:9: in module scope from module
I saw the same thing yesterday when trying to use 'cxxflags'. Here's the version output from bjam which I downloaded from Sourceforge at the same time I got the 1.34.0 source code: Boost.Build V2 (Milestone 11) Boost.Jam 03.1.14 The file date is 4/30/2007 which co-incides with the package date on Sourceforge. -Chris
on Wed May 16 2007, Yuval Ronen
David Abrahams wrote:
on Wed May 16 2007, Yuval Ronen
wrote: Yuval Ronen wrote:
Vladimir Prus wrote:
Yuval Ronen wrote:
Can I pass a command line argument of some sort to tell Boost.Build V2 to disable some specific MSVC warnings? bjam cxxflags=<whatever-MSVC-option-you-want>
should work. It doesn't. I tried
bjam --toolset=msvc-8.0 cxxflags=/wd4251
but bjam spits errors about invalid arguments
What are the *exact* error messages?
The exact command line was
bjam --toolset=msvc-8.0 --without-python cxxflags=/wd4251 stage
OK, try this: bjam --toolset=msvc-8.0 --without-python cxxflags=-wd4251 stage I think it's a problem in BBv2 that "/" is given special meaning in property values. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com Don't Miss BoostCon 2007! ==> http://www.boostcon.com
David Abrahams wrote:
on Wed May 16 2007, Yuval Ronen
wrote: David Abrahams wrote:
on Wed May 16 2007, Yuval Ronen
wrote: Yuval Ronen wrote:
Vladimir Prus wrote:
Yuval Ronen wrote:
> Can I pass a command line argument of some sort to tell Boost.Build V2 > to disable some specific MSVC warnings? bjam cxxflags=<whatever-MSVC-option-you-want>
should work. It doesn't. I tried
bjam --toolset=msvc-8.0 cxxflags=/wd4251
but bjam spits errors about invalid arguments What are the *exact* error messages? The exact command line was
bjam --toolset=msvc-8.0 --without-python cxxflags=/wd4251 stage
OK, try this:
bjam --toolset=msvc-8.0 --without-python cxxflags=-wd4251 stage
I think it's a problem in BBv2 that "/" is given special meaning in property values.
Yes, that works. Thanks a lot. Although I have to admit that I find it weird that cxxflags doesn't pass its value as-is to the compiler...
Yuval Ronen wrote:
David Abrahams wrote:
on Wed May 16 2007, Yuval Ronen
wrote: David Abrahams wrote:
on Wed May 16 2007, Yuval Ronen
wrote: Yuval Ronen wrote:
Vladimir Prus wrote: > Yuval Ronen wrote: > >> Can I pass a command line argument of some sort to tell Boost.Build V2 >> to disable some specific MSVC warnings? > bjam cxxflags=<whatever-MSVC-option-you-want> > > should work. It doesn't. I tried
bjam --toolset=msvc-8.0 cxxflags=/wd4251
but bjam spits errors about invalid arguments What are the *exact* error messages? The exact command line was
bjam --toolset=msvc-8.0 --without-python cxxflags=/wd4251 stage OK, try this:
bjam --toolset=msvc-8.0 --without-python cxxflags=-wd4251 stage
I think it's a problem in BBv2 that "/" is given special meaning in property values.
Yes, that works. Thanks a lot. Although I have to admit that I find it weird that cxxflags doesn't pass its value as-is to the compiler...
Oops, I spoke too soon. It doesn't work. I guess I got confused last time, and missed the warning, but it's still there.
participants (4)
-
Christopher Woods
-
David Abrahams
-
Vladimir Prus
-
Yuval Ronen