Boost logo

Boost-Build :

Subject: Re: [Boost-build] third-party library dependencies
From: Stefan Seefeld (stefan_at_[hidden])
Date: 2018-06-11 00:38:17


On 06/10/18 19:03, Steven Watanabe via Boost-build wrote:
> AMDG
>
> On 06/08/2018 01:14 PM, Stefan Seefeld via Boost-build wrote:
>>
>>> Here are my two modules:
>>> https://github.com/stefanseefeld/boost.ublas/blob/opencl/opencl.jam
>>> https://github.com/stefanseefeld/boost.ublas/blob/opencl/clblas.jam
>>>
>>> how should I modify clblas.jam to add opencl to its usage requirements ?
>>>
> The normal method is to list opencl as a source to clblas.

In the clblas.jam file I pointed to, where would I need to add it ?
(There are no "sources" involved at all...)

> This is a bit tricky as you want users to be able to configure
> clblas only (and rely on autoconfiguration of opencl), or
> configure both libraries explicitly (in any order). I think
> I'm going to have to revisit the library configuration mechanism
> to handle this better.

That would be great indeed !
>>> And finally, what would be the right place to put these modules, such
>>> that users can see / use them ?
>>> While I'm of course happy to contribute them to Boost.Build itself,
>>> I'm not sure this is the right solution in general. There needs to be
>>> a mechanism for users to write and publish their own modules, but I
>>> couldn't quite figure out how.
>>>
> At the moment, adding such modules to Boost.Build is
> the most reliable solution. You could technically
> put them anywhere as long as you set BOOST_BUILD_PATH
> appropriately, but that requires an extra pre-build
> configuration step. I've considered ways to allow
> user-config.jam to find project specific modules, but
> I don't have any solution that isn't pretty hacky.

With my faber frontend that's easy and natural, as modules are handled
by Python, so all I need to do is set the PYTHONPATH variable. I would
expect something equivalent with bjam, i.e. a simple search path where
bjam will look for extension modules.
>>> (Also, as a side-note: the two modules above contain a lot of
>>> boilerplate code. Is there a way to compact that, or even create
>>> something like a module template that I could use and parametrize for
>>> the specifics of a given library ?
>>>
> I've been meaning to create such a module template.
> I think there are enough concrete uses to work out
> a reasonable abstraction now.

Many thanks,

Stefan

-- 
      ...ich hab' noch einen Koffer in Berlin...
    



signature.png

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