visual-c++boostboost-buildbjam

Does bjam's cxxflags option remove trailing minus signs?


I'm trying to pass a Visual-C++ compiler option /Zc:wchar_t- (note trailing minus to switch it off) to bjam, boost's build tool like so:

bjam --build-type=complete runtime-link=shared variant=debug toolset=msvc-8.0 cxxflags="/Zc:wchar_t-" threading=multi debug-symbols=on debug-store=database --with-program_options stage

However, when I check the *.rsp file that contains the resulting compiler options (at ...\boost_1_44_0\bin.v2\libs\program_options\build\msvc-8.0\debug\debug-store-database\threading-multi\options_description.obj.rsp), it will always contain /Zc:wchar_t as option, regardless whether I specify with - or without.

Is there something with the cxxflags that removes a trailing minus from the passed option?

Note that /Zc: is already set in tools\build\v2\tools\msvc.jam, resulting in the option being provided twice in the RSP file when I specify it with cxxflags -- still the one with cxxflags always gets its trailing minus removed, while -- if I edit msvc.jam -- the one in msvc.jam is taken verbatim and the minus preserved.


Solution

  • Short answer is: Yes, bjam messes this up.

    One can hack the .jam files to provide this option manually and it then works. (And yes, I'd provide where exactly, but I've since lost that test environment.)