|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-08-23 06:42:05
Toon Knapen wrote:
>> I believe that with the current CVS, you can do this:
>>
>> exe my_app : my_source.cpp :
>> [ lib nsl dl readline : : <search> $(SYS_LIB_PATH) ] ;
>>
>> If you use all those libs everywhere, you might consider declaraing them
>> out-of-line:
>>
>> lib nsl : : <search>$(SYS_LIB_PATH) ;
>> exe my_app : my_source.cpp nsl ;
>
> I tried to use prebuilt targets as you suggest here but the problem is
> that I want to link with a _list_ of libraries. When specifying the name
> of the library however, you can only specify one name like this:
>
> lib all_system_libs : : <name>nsl <search>$(SYS_LIB_PATH) ;
>
> So here is only one library listed. So what I would like to do is soth.
> like the following:
>
> lib all_system_libs : : <name>"nsl dl readline" <search>$(SYS_LIB_PATH) ;
The possible variants are:
local libs = nsl dl readline ;
exe my_app : my_source.cpp [ lib $(libs) : : <search>$(SYS_LIB_PATH) ] ;
and:
lib $(libs) : : <search>$(SYS_LIB_PATH) ;
exe my_app : my_source.cpp $(libs) ;
When the 'lib' rule is invoked with no sources (meaning it's searched
library), several names are ok.
- 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