Boost logo

Boost-Build :

From: David Abrahams (dave_at_[hidden])
Date: 2002-11-27 00:45:12


Rene Rivera <grafik666_at_[hidden]> writes:

> The discussion of system libraries UI made me think of another target type
> that would be nice to have. With the new way of specifying alternatives of
> the same target, and previous desires to manage source files moreffectively,
> it seems that we need a way to support source files more effectively. For
> this I think having a special target for specifying sources (mostly files)
> is desireable.
>
> The idea is to have a "source" target that can collect a set a sources into
> a single named target which can later be used a substitute for those
> sources. For example specifying an executable which has different files
> depending on the toolset would currently be:
>
> exe test : main-gcc.cpp source1.cpp source2.cpp : <toolset>gcc ;
> exe test : main-msvc.cpp source1.cpp source2.cpp : <toolset>msvc ;
> exe test : main-darwin.cpp source1.cpp source2.cpp : <toolset>darwin ;
>
> With a source target it would be:
>
> source test-src : source1.cpp source2.cpp ;
> exe test : main-gcc.cpp test-src : <toolset>gcc ;
> exe test : main-msvc.cpp test-src : <toolset>msvc ;
> exe test : main-darwin.cpp test-src : <toolset>darwin ;
>
> Or even:
>
> source test-src-common : source1.cpp source2.cpp ;
> source test-src : main-gcc.cpp test-src-common : <toolset>gcc ;
> source test-src : main-msvc.cpp test-src-common : <toolset>msvc ;
> source test-src : main-darwin.cpp test-src-common : <toolset>darwin ;
> exe test : test-src ;

Ding!!

Beautiful. I vote yes.

-- 
David Abrahams
dave_at_[hidden] * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution
 

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