From: David Abrahams (dave_at_[hidden])
Date: 2004-07-02 12:22:07
Vladimir Prus <ghost_at_[hidden]> writes:
> David Abrahams wrote:
>> >> Seems as though it ought to be unneccessary, doesn't it?
>> > Why? The problem is: you want to use <toolset>msvc in requirements.
>> But only as a condition, right? If it were an actual requirement,
>> also asking people to have "using msvc" would be no problem.
> Non necessary in condition. If you want to do conditional compilation you have
> two approaches:
> lib a : : <toolset>msvc:<source>msvc.cpp <toolset>gcc:<source>gcc.cpp ;
> lib a : msvc.cpp : <toolset>msvc ;
> lib a : gcc.cpp : <toolset>gcc ;
> the role of <toolset> property in the second case is similiar to the role in
> the first case. And in the second case, user might well don't have msvs
I still don't see a problem with using an attribute on the toolset
feature to make this legal.
>> > You don't want to "using msvc " because that would warn that msvc is
>> > not installed. So you need a way to say the <toolset>msvc is OK.
>> Why shouldn't the person who defines the <toolset> feature do that
>> once instead of requiring everyone who wants to use it in a condition
>> to do a use-property?
> For example, I might have Jamfile which includes uses <toolset>nm in one
> place. Nobody is even has that toolset, so nobody can say "using nm ; ". If I
> want my Jamfiles to be compilable everywhere, I need a mechanism to say,
> "<toolset>nm" is ok.
No, you just need a mechanism to say "<toolset>xxxx" is OK for any xxxx.
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com
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