Subject: Re: [Boost-build] how can we set the compiler options when using bjam for application building
From: Jurko GospodnetiÄ (jurko.gospodnetic_at_[hidden])
Date: 2012-06-29 03:49:05
> I gave <link>static in jamroot file and also tried to give "link=static"
> at bootstrap.bat, but still I can see that "cl.exe" is using "/MD".
> How can we change the flags passed to MSVC compiler, linker for
> different variants like debug, release, and different architectures?
There are several properties you might use related to this:
For raw tool option passing:
For the debug/release variants - see the <variant> feature, and since
its values are implicitly recognized, just stating debug or release or
both on the command line should be recognized correctly as well.
The fastest way to find an answer to all this is to just look at
msvc.jam. For example, lines:
> toolset.flags $(toolset).compile CFLAGS $(conditions)/<runtime-debugging>off/<runtime-link>static/<threading>single : /MT ;
> toolset.flags $(toolset).compile CFLAGS $(conditions)/<runtime-debugging>on/<runtime-link>static/<threading>single : /MTd ;
state that when you have runtime-link static & threading single
specifying specifying runtime-debugging off will add the /MT option to
the compiler command line while specifying runtime-debugging on will add
Hope this helps.
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