Boost logo

Boost-Build :

Subject: Re: [Boost-build] Is it possible to find out if a named target exists in a subproject jamfile
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2015-04-03 17:13:31


AMDG

On 04/03/2015 01:50 PM, Rene Rivera wrote:
> On Fri, Apr 3, 2015 at 2:43 PM, Steven Watanabe <watanabesj_at_[hidden]>
> wrote:
>
>>> ===
>>> import project ;
>>> local sub1-module = [ project.find sub1 : $(__file__:D) ] ;
>>> <snip>
>>> ===
>>>
>>
>> This won't work because the parent project is
>> loaded /before/ any subprojects.
>>
>
> IIRC calling project.find directly circumvents that. As it loads the given
> project regardless.
>

Right. You'll need to be careful, though,
as prematurely loading the subproject means
that later definitions in the superproject
won't be inherited. It will also probably
fail if you have any recursion in such loads.

In Christ,
Steven Watanabe


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