Boost logo

Boost-Build :

From: Jurko Gospodnetić (jurko.gospodnetic_at_[hidden])
Date: 2008-07-10 05:23:05


   Hi Andrej.

> Is there a way that I can adjust my install rule based
> on the variant too? Currently I am using the rules
> like below, but it obviously copies both the release
> and debug build. Any idea?
>
> install dist-lib
> : [ glob $(boost-library-path)/*boost_system* ]
> [ glob $(boost-library-path)/*boost_thread* ]
> [ glob $(boost-library-path)/*boost_regex* ]
> [ glob $(boost-library-path)/*boost_data_time* ]
> [ glob $(boost-library-path)/*boost_filesystem* ]
> : <install-type>SHARED_LIB
> <os>CYGWIN:<location>$(install-path)/bin
> <os>LINUX:<location>$(install-path)/lib
> <os>AIX:<location>$(install-path)/lib
> ;

   Second parameter to the install rule are requirements for that target
to be considered relevant to your build. I.e. you are defining an
alternative of your dist-lib target specialized for those requirements.
You can add <variant>debug or <variant>release to those requirements and
it should work. The same applies for all Boost Build target types (e.g.
project, exe, lib, obj, install, ...)

   Boost Build then chooses the 'best available alternative' based on
the property values set for the target in the current build. In case it
can not decide it reports an error and says which alternatives it could
not decide between or that there were no acceptable alternatives found.

   Btw. I do believe all this is documented. Perhaps just not in an
intuitive location. :-) Feel free to send in a patch for the docs in
case you see an organization that makes more sense to you.

   Best regards,
     Jurko Gospodnetić


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