[C++-sig] RE: -sBUILD=debug-python

Stefan Quandt Stefan.Quandt at bardenheuer.de
Thu Nov 25 09:38:23 CET 2004


Rene Rivera wrote:

> Stefan Quandt wrote:
> 
>> Specifying TOOLS on the command line has no effect because of the line
>>   TOOLS=msvc
>> in my Jamrules file.
>> 
>> After deleting the line all compiler calls fail with
>>   Command line error D2016 : '/Ze' and '/Za' command-line options are
>> incompatible
>> Obviously bjam's tool detecting heuristics fail for MSVC6 (that's why I
>> originally added the TOOLS definition to my Jamrules).
> 
> There are *no* tool detecting heuristics. You need to specify TOOLS
> somehow, or it will default to vc-7_1 on Windows, gcc otherwise.
> 
>> Nevertheless with specifying "-sTOOLS=msvc" on the command line the
>> -DBOOST_DEBUG_PYTHON is now present in the compiler command lines!
>> And the "debug-python" build variant can be build successfully.
> 
> And the reason is that since you specified the TOOLS in Jamrules that is
> loaded after python.jam so it never got a chance to react to the TOOLS
> setting of "msvc".
I suppose that many boost users don't use the default tools.
So specifying TOOLS in a project file seems quite natural to me.

But placing it in the wrong file has bad consequences as my example shows.

> If you need to set the TOOLS someplace other than the command line, set
> it in boost-build.jam that is the first loaded file.
Including a statement like this in the boost documentation would help.

Many users of the boost libraries will not know much about the bjam
mechanics.
The tools/build/v1/build_system.htm describes Jam as a "open-source make
replacement".
I have a strong background with 'make' but in fact bjam seems to work very
different then make.
E.g. in a makefile the order of statements does not matter at all.
The mechanism of overriding a definition by setting it on the command line
seems at least similar.

Kind regards
  Stefan






More information about the Cplusplus-sig mailing list