|
|
| boost-build support for pre-built boost
libraries? |
  Austria |
2007-07-19 10:41:16 |
I am wondering what is the best practice for specifying
pre-built boost
libraries.
E.g.
lib boost_thread : : <name>boost_thread ;
exe hello : hello.cpp boost_thread ;
is not enough, since the actual name of boost_thread is
decorated with
debugging variant, threading, compiler ....
As I understand it would be possible to come up with a
site-config.jam
file that could perform this kind of mapping. But this is
tedious...
I guess a better way would be to write a boost.jam and put
it into the
tools of boost-build.
In user-config.jam I would need simply say "using
boost" and in my
projects e.g.
exe hello : hello.cpp /boost//boost_thread ;
Is this possible, i.e. does anyone know of (or intend to
write) such a
boost.jam module?
regards
Roland
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
a>
|
|
| Re: boost-build support for pre-built
boost libraries? |
  United States |
2007-07-19 11:50:55 |
Roland Schwarz wrote:
> I am wondering what is the best practice for specifying
pre-built boost
> libraries.
>
> E.g.
>
> lib boost_thread : : <name>boost_thread ;
>
> exe hello : hello.cpp boost_thread ;
>
> is not enough, since the actual name of boost_thread is
decorated with
> debugging variant, threading, compiler ....
>
> As I understand it would be possible to come up with a
site-config.jam
> file that could perform this kind of mapping. But this
is tedious...
>
> I guess a better way would be to write a boost.jam and
put it into the
> tools of boost-build.
>
> In user-config.jam I would need simply say "using
boost" and in my
> projects e.g.
>
> exe hello : hello.cpp /boost//boost_thread ;
>
> Is this possible, i.e. does anyone know of (or intend
to write) such a
> boost.jam module?
>
> regards
> Roland
>
>
>
Roland -
This might not be the best way to do it... but this is what
I do (I figure Volodya or Rene
will correct me if I'm leading you astray). In fact I do
something similar for all of the
libraries that I use and it works well for me.
I have described a project ID in my Jamroot that looks like
this:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Jamroot line
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
use-project /vendor/boost : library/vendor/boost/build ;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~
The library/vendor/boost/build directory is at the same
level as my boost versions such
as library/vendor/boost/1_34_0. The Jamfile in the
boost/build directory looks like this.
It's job is to provide me with the latest version right now.
It can do that via normal
header and library or just header. As you can see, I simply
provide a <library-path>
directive to the usage requirements section for the alias.
~~~~~~~~~~~~~~~~~~~~~~~~~~
library/vendor/boost/build/Jamfile ~~~~~~~~~~~~~~~~~~~~~~~~
import os ;
if [ os.name ] = NT
{
LIB_SEARCH_PATH = stage/lib ;
}
LATEST_RELEASE = 1_34_0 ;
# This Jamfile is used to help point other projects that
# use boost in the right direction.
project /vendor/boost
:
:
:
:
;
alias latest
:
:
:
: <include>../$(LATEST_RELEASE)
<library-path>../$(LATEST_RELEASE)/stage/lib
;
alias latest_header_only
:
:
:
: <include>../$(LATEST_RELEASE)
;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When I want to use a boost library in something I simply add
the project//target that
I need. For example:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ snipet from Jamfile
~~~~~~~~~~~~~~~~~~~~~~~~~~~
exe test_0_DispatcherService
: test_0_DispatcherService.cpp
/omd/common//header_only
/vendor/boost//latest
: <include>.
;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~
Hopefully this is useful for you.
Best Regards -
Michael
--
----------------------------------
Michael Caisse
Object Modeling Designs
www.objectmodelingdesigns.com
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
a>
|
|
| Re: boost-build support for pre-built
boost libraries? |
  Austria |
2007-07-20 01:25:51 |
Hi Michael,
Michael Caisse wrote:
> alias latest
> :
> :
> :
> : <include>../$(LATEST_RELEASE)
> <library-path>../$(LATEST_RELEASE)/stage/lib
> ;
I am pretty sure this will work for msvc compilers because
they support
automatic linking. I.e. including the headers will embed a
hint for the
linker which will tell it the decorated name of the
library.
I am afraid this is not so on linux.
Did you try this on linux too?
Regards Roland
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
a>
|
|
| Re: boost-build support for pre-built
boost libraries? |
  Russian Federation |
2007-07-20 02:21:29 |
Roland Schwarz wrote:
> Hi Michael,
>
> Michael Caisse wrote:
>> alias latest
>> :
>> :
>> :
>> : <include>../$(LATEST_RELEASE)
>> <library-path>../$(LATEST_RELEASE)/stage/lib
>> ;
>
> I am pretty sure this will work for msvc compilers
because they support
> automatic linking. I.e. including the headers will
embed a hint for the
> linker which will tell it the decorated name of the
library.
>
> I am afraid this is not so on linux.
Yeah, that won't work on Linux. As for linking to
pre-installed
boost libraries, using right names, I've sketched the
attached.
It's dirty, because it's copy-paste for Boost's top-level
Jamfile.v2,
but kinda works.
I think it would be good to have it implemented in a nice
way,
but I don't think the right way is adding boost.jam to
*Boost.Build*.
The problem is that Boost.Build used by the user is not
necessary
the Boost.Build used when building Boost itself. So, it's
possible
that the installed Boost has different naming scheme.
I think the ideal approach is to make the install process
create to $prefix/share/boost/Jamroot
Then, any Boost.Build project wishing to link to boost can
use-project /boost : $prefix/share/boost/Jamroot ;
and then have:
exe a : a.cpp /boost//boost_whatever ;
I think it's not very hard to do, actually. We need to
extract this
tag rule into boost.jam, located in top-level Boost dir, so
that
both Jamfile.v2 and this new installed Jamroot can use it.
Then, we can pre-create Jamroot that will be installed.
Then,
we have to modify the install process to install boost.jam
and
Jamroot to $prefix/share. I'd imagine this Jamroot need not
be generated -- it can be just hand-written, using the
attached
one as reference, and importing boost.jam instead of
copy-pasting
the 'tag' rule. Of course, if only I have the time to
implement
everything
- Volodya
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
a>
|
|
|
| Re: boost-build support for pre-built
boost libraries? |
  United States |
2007-07-20 10:58:42 |
on Fri Jul 20 2007, Vladimir Prus <ghost-AT-cs.msu.su>
wrote:
> I think the ideal approach is to make the install
process
> create to $prefix/share/boost/Jamroot
Yes, it would be nice to finally have this feature!
> Then, any Boost.Build project wishing to link to boost
can
>
> use-project /boost :
$prefix/share/boost/Jamroot ;
Are you sure you meant to write "/Jamroot" above?
> and then have:
>
> exe a : a.cpp /boost//boost_whatever ;
>
--
Dave Abrahams
Boost Consulting
http://www.boost-cons
ulting.com
The Astoria Seminar ==> http://www.astoriasemin
ar.com
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
a>
|
|
| Re: boost-build support for pre-built
boost libraries? |

|
2007-07-20 11:08:49 |
David Abrahams wrote:
>
> on Fri Jul 20 2007, Vladimir Prus
<ghost-AT-cs.msu.su> wrote:
>
>> I think the ideal approach is to make the install
process
>> create to $prefix/share/boost/Jamroot
>
> Yes, it would be nice to finally have this feature!
>
>> Then, any Boost.Build project wishing to link to
boost can
>>
>> use-project /boost :
$prefix/share/boost/Jamroot ;
>
> Are you sure you meant to write "/Jamroot"
above?
Yes, I meant that. What is wrong with that?
- Volodya
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
a>
|
|
| Re: boost-build support for pre-built
boost libraries? |
  United States |
2007-07-21 13:33:07 |
on Fri Jul 20 2007, Vladimir Prus <ghost-AT-cs.msu.su>
wrote:
> David Abrahams wrote:
>
>>
>> on Fri Jul 20 2007, Vladimir Prus
<ghost-AT-cs.msu.su> wrote:
>>
>>> I think the ideal approach is to make the
install process
>>> create to $prefix/share/boost/Jamroot
>>
>> Yes, it would be nice to finally have this
feature!
>>
>>> Then, any Boost.Build project wishing to link
to boost can
>>>
>>> use-project /boost :
$prefix/share/boost/Jamroot ;
>>
>> Are you sure you meant to write
"/Jamroot" above?
>
> Yes, I meant that. What is wrong with that?
I was under the impression that projects are identified by
paths to
directories containing Jamfiles, not by the paths to the
Jamfiles
themselves. This is the first time I've ever seen the
latter usage.
--
Dave Abrahams
Boost Consulting
http://www.boost-cons
ulting.com
The Astoria Seminar ==> http://www.astoriasemin
ar.com
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
a>
|
|
| Re: boost-build support for pre-built
boost libraries? |

|
2007-07-21 14:30:29 |
David Abrahams wrote:
>
> on Fri Jul 20 2007, Vladimir Prus
<ghost-AT-cs.msu.su> wrote:
>
>> David Abrahams wrote:
>>
>>>
>>> on Fri Jul 20 2007, Vladimir Prus
<ghost-AT-cs.msu.su> wrote:
>>>
>>>> I think the ideal approach is to make the
install process
>>>> create to $prefix/share/boost/Jamroot
>>>
>>> Yes, it would be nice to finally have this
feature!
>>>
>>>> Then, any Boost.Build project wishing to
link to boost can
>>>>
>>>> use-project /boost :
$prefix/share/boost/Jamroot ;
>>>
>>> Are you sure you meant to write
"/Jamroot" above?
>>
>> Yes, I meant that. What is wrong with that?
>
> I was under the impression that projects are identified
by paths to
> directories containing Jamfiles, not by the paths to
the Jamfiles
> themselves. This is the first time I've ever seen the
latter usage.
Oops. You're right, there should not be 'Jamroot' in
'use-project'.
- Volodya
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
a>
|
|