views:

302

answers:

2

Boost library is full of examples and tests and I would like to build them using bjam if possible.

How do I build boost examples with bjam?

PS. I wasn't able to locate proper documentation for this option.

+1  A: 

It depends on the library. Most of them run the examples from the test directory. Others from the example directory.

Go to the lib test or example directory where there is a Jamfile and do just

bjam
Vicente Botet Escriba
This would require to copy bjam from boost root. is it possible to call bjam from there for *all* boost libraries?
bogdan
Once you have installed bjam, you can call bjam from any directory with a Jamfile. There are others ways, but this is the easy way.
Vicente Botet Escriba
There's no standard way to build examples for all libraries. In fact, that does not seem too useful -- given that example is something you'd have to manually play with anyway. On Linux, typing `bjam libs/*/example` from the root *might* work.
Vladimir Prus
A: 

Duplicate

Danvil
There is a clear difference between he two, this one is about boost examples and not your won applications. Also is specific to bjam.
bogdan
The other one is also about bjam. And there is really no difference in compiling a boost example or a "custom" application ...
Danvil