Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-11-02 05:14:52


Jim Hague wrote:

>>> [...] So, how
>>> can I change the name of the C/C++ compiler command - i.e. I want to
>>> change the compiler command from, say, gcc to c4gl, for compiling and
>>> linking for any subproject using the Informix stuff - but while
>>> keeping the underlying toolset behavior?
>>
>> The simplest approach that comes to mind is:
>>
>> using gcc : 3.3 ; # use regular gcc
>> using gcc : c4gl : /usr/bin/c4gl_compiler ;
>>
>> Now, a project which uses Informix would use:
>>
>> project : requirements <toolset>gcc-c4gl ;
>>
>> and all files there will be compiled with your tool.
>
> Thanks for the suggestion. I've quickly tried it. I found that a couple of
> subprojects which provide shared libraries for the other projects then got
> rebuilt into two versions, one for each toolset.

Hmm... this should not happen, but without a testcase I cannot be sure.

> I presume then so stop
> this that I would need to add a usage-requirements (? sorry, manual not
> handy) specifying the toolset to these. And there will have to be a test
> on the target OS to determine which toolset (vacpp or gcc) to use.
> Obviously, I'd prefer not to have to scatter OS<->toolset mapping info
> around the subprojects. Which brings me back to wanting to keep the
> default toolset, but change the name of the command (as c4gl will call the
> default platform toolset itself), but I'm not at all sure this is
> possible.

Well, you can specify:

using gcc : : /usr/bin/c4gl_compiler ;

to change just the name of compiler and don't bother with any versions. In a
previous email you said you want this for specific subprojects, that's why
I've suggested more complex approach.

And on other system, you'll have

using vacpp : : /usr/bin/c4gl_compiler ;

- Volodya

 


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