سؤال

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.

هل كانت مفيدة؟

المحلول 2

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.)

نصائح أخرى

There is a workaround i used. Add space to avoid removal of trailing -

cxxflags="/Zc:wchar_t- "
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top