Quantcast

Conditional Requirements for Library targets

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Conditional Requirements for Library targets

Boost - Build mailing list
Hello,

I have defined in my jamfile a library target that I want to include some extra source requirements when it is built as a shared library than when built as a static archive. To do this, I would like to utilize the conditional requirement capability of Boost build on the <link> feature as follows:

lib util : $(utils-source) : <link>shared : <source>$(shlib-source) <source>/external//libz ;

However, this does not work. The rule is not invoked for building a static version of the library. It is only invoked for building a shared library. Here are some questions:


How do I know what features can be utilized as conditional requirements?

Is it possible to have a single rule for a library target that is conditional based on feature <link>? 

Note that the current Boost Build documentation provides an example of this in the section "Declaring Targets", but it does not seem to work for me.

I am currently utilizing Boost Jam version 2015.07. OS=linux.

Many thanks and with regards,

DougC

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Conditional Requirements for Library targets

Boost - Build mailing list
AMDG

On 03/19/2017 01:34 PM, Douglas Capeci via Boost-build wrote:
>
> I have defined in my jamfile a library target that I want to include some extra source requirements when it is built as a shared library than when built as a static archive. To do this, I would like to utilize the conditional requirement capability of Boost build on the <link> feature as follows:
>
> lib util : $(utils-source) : <link>shared : <source>$(shlib-source) <source>/external//libz ;
>

  You have too many spaces.  The ':' is also an argument
separator.  A conditional requirement should be
<link>shared:<source>$(shlib-source)

> However, this does not work. The rule is not invoked for building a static version of the library. It is only invoked for building a shared library. Here are some questions:
>

In Christ,
Steven Watanabe

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Loading...