Boost logo

Boost-Build :

Subject: Re: [Boost-build] link switches
From: Edward Diener (eldiener_at_[hidden])
Date: 2017-11-12 23:15:38


On 11/12/2017 5:35 PM, Robert Ramey via Boost-build wrote:
> On 11/12/17 2:14 PM, Steven Watanabe via Boost-build wrote:
>> AMDG
>>
>> On 11/12/2017 03:03 PM, Robert Ramey via Boost-build wrote:
>>> Putting the finishing touches on my fix to the serialization library
>>> tests, I have two pesky tests left.  One is to test a shared library
>>> plugin on unix/linix.  Boiled down to it's essentials, the jamfile looks
>>> like:
>>>
>>> ...
>>> lib polymorphic_derived2
>>>      :
>>>          polymorphic_derived2.cpp
>>>      :
>>>      ;
>>> ...
>>> run test_dll_plugin : polymorphic_derived2 : <link>static:<build>no
>>> <linkflags>-ldl ]
>>>
>>> But I'm getting an error when I invoke the jamfile:
>>>
>>> don't know how to make <e>polymorphc_derived2
>>>
>>> So what am I doing wrong here?
>>>
>>
>> You have the arguments for `run` in the wrong order.
>>
>
> My mistake. I transposed this by hand from the function I actually use
> which is:
>
> rule test-bsl-run ( test-name : sources * : libs * : requirements * )
>
> in serialization/util/test.jam.
>
> So my actual command is
>
> test-bsl-run test_dll_plugin : : dll_polymorphic_derived2_lib :
> <link>static:<build>no <target-os>linux:<linkflags>-ldl
>
> which should resolve to:
>
> run test_dll_plugin : :dll_polymorphic_derived2_lib :
> <link>static:<build>no <target-os>linux:<linkflags>-ldl :  test_dll_plugin
>
> I'm confused about "sources" which I take to mean *.cpp and *.hpp files
> and "input-files" which I take to mean ?  other targets.  Or should
> other targets - in this case dll_polymorphic_derived2_lib be in
> requirements?  In which case I don't know what "input-files" would be for.

For the "run' rule the designation "sources" means whatever files are
needed to build the final executable. The designation "input-files"
means command line parameters as the names of files passed to the final
executable on the command line when the program is run, or executed.

Since it was you who wrote the "test-bsl-run' rule, which eventually
causes the Boost Build 'run' rule to be invoked, shouldn't you yourself
know what the parameters to your own rule means ?

>
> Robert Ramey


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