[Boost-users] Install header-only libraries

1,907 views
Skip to first unread message

Gonzalo BG

unread,
Aug 10, 2015, 2:01:45 PM8/10/15
to boost...@lists.boost.org
I'm trying to find in the docs what is the right way to install only the header-only libraries from a boost distribution without any luck.

That is, I want to install everything that can be installed without having to compile anything. 

Is there an argument for `bootstrap.sh` or `b2` that does this?

Best regards,
Gonzalo

Glen Fernandes

unread,
Aug 10, 2015, 3:11:18 PM8/10/15
to boost...@lists.boost.org
Gonzalo wrote:
> I'm trying to find in the docs what is the right way to install only the
> header-only libraries from a boost distribution without any luck.
> That is, I want to install everything that can be installed without having
> to compile anything.

For header-only libraries you can probably stop after:
$ ./boostrap.sh
$ ./b2 headers

The result is the 'boost' subdirectory with all headers.

Best,
Glen




--
View this message in context: http://boost.2283326.n4.nabble.com/Install-header-only-libraries-tp4678691p4678694.html
Sent from the Boost - Users mailing list archive at Nabble.com.
_______________________________________________
Boost-users mailing list
Boost...@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Gonzalo BG

unread,
Aug 11, 2015, 8:01:02 AM8/11/15
to Boost Users, boost...@lists.boost.org

Glen Fernandez wrote:
For header-only libraries you can probably stop after: 
$ ./boostrap.sh 
$ ./b2 headers 

The result is the 'boost' subdirectory with all headers.

I'm trying to install the header-only libraries of boost.

Doing:
$ ./bootstrap.sh --prefix=/path/to/prefix
$ ./b2 --prefix=/path/to/prefix headers

generates, as you pointed out, a boost directory in the current directory that contains all
the headers.

At least in my system this does not, however, install anything (there is no boost directory 
in /path/to/prefix/include). The directory generated also contains the headers of 
non-header-only libraries.

Should I just move this directory to my prefix manually and leave the headers of non-header-only
libraries inside?

Bests,
Gonzalo

Glen Fernandes

unread,
Aug 11, 2015, 9:53:32 AM8/11/15
to boost...@lists.boost.org
Gonzalo wrote:
> Should I just move this directory to my prefix manually and leave the
> headers of non-header-only
libraries inside?

I just add that directory to my include path (usually replacing the entry
for the previous Boost path in my include path).

By the way, you said "boost distribution", and I just assumed you mean the
Boost source from git. If you meant a Boost release then you don't need to
run "b2 headers". The boost subdirectory in that archive would already exist
with headers for all libraries.

It would be nice to have a way to "b2 install" only the header-only
libraries.

Best,
Glen






--
View this message in context: http://boost.2283326.n4.nabble.com/Install-header-only-libraries-tp4678691p4678728.html
Reply all
Reply to author
Forward
0 new messages