Build and Install only a Specified Library from command line using bjam (newbie!)
Hi, I've been trying to build and install selected Boost libraries (regex, graph, program options) from the command line (MS VC9 Express) using the --with-library option of bjam. However I find that bjam copies headers for all boost libraries to the target location. How do I build and install only the specified library and it's headers? The same problem has been discussed by another user here: http://stackoverflow.com/questions/439402/building-a-subset-of-boost-in-wind...
Agnel C J Kurian wrote:
Hi,
I've been trying to build and install selected Boost libraries (regex, graph, program options) from the command line (MS VC9 Express) using the --with-library option of bjam. However I find that bjam copies headers for all boost libraries to the target location. How do I build and install only the specified library and it's headers?
It's not possible. "its headers" typically depend on lots of other boost headers. What are you trying to achieve? - Volodya
Hmmm - maybe I'm misunderstanding the question but I think I do this all the time: a) I move the libs/serialization/test directory b) I invoke ../../../tools/regression/src/library_test.sh (or bat) c) read the help d) invoke ../../../tools/regression/src/library_test.sh with the proper toolset and other options e) thinks crank away building everthing that is needed (including ANY other need libraries). f) I get a report indicating which tests passed/failed g) I have to move by hand the compiled libraries/shared_libraries to a common place Then I'm in business - and as a side effect, I've tested the library in my environment. I don't know if this would work for all libraries or it is an unintended feature of the Jamfile in the serialization library test directory. Robert Ramey Vladimir Prus wrote:
Agnel C J Kurian wrote:
Hi,
I've been trying to build and install selected Boost libraries (regex, graph, program options) from the command line (MS VC9 Express) using the --with-library option of bjam. However I find that bjam copies headers for all boost libraries to the target location. How do I build and install only the specified library and it's headers?
It's not possible. "its headers" typically depend on lots of other boost headers.
What are you trying to achieve?
- Volodya
Robert Ramey wrote:
Hmmm - maybe I'm misunderstanding the question but I think I do this all the time:
a) I move the libs/serialization/test directory b) I invoke ../../../tools/regression/src/library_test.sh (or bat) c) read the help d) invoke ../../../tools/regression/src/library_test.sh with the proper toolset and other options e) thinks crank away building everthing that is needed (including ANY other need libraries). f) I get a report indicating which tests passed/failed g) I have to move by hand the compiled libraries/shared_libraries to a common place
I fail to see how the testing procedure you use (which you probably have described at least a dozen times already) serves to answer the original question in this thread. Am I missing something? - Volodya
I've been trying to build and install selected Boost libraries (regex, graph, program options) from the command line (MS VC9 Express)
Vladimir Prus wrote:
I fail to see how the testing procedure you use (which you probably have described at least a dozen times already) serves to answer the original question in this thread. Am I missing something?
It builds the library desired along with ALL the dependent libraries and skips the building any other libraries. Doesn't this address the request above?
- Volodya
It builds the library desired along with ALL the dependent libraries and skips the building any other libraries. Doesn't this address the request above?
The point was that the OP wanted also only to install the required headers, as well as only build the required libraries. Bcp is required, I suppose. Pete
Vladimir Prus
What are you trying to achieve?
- Volodya
I'm trying to build and install only a subset of boost libraries. The same problem has been discussed (by someone else) on stackoverflow: http://stackoverflow.com/questions/439402/building-a-subset-of-boost-in-wind... "bjam --with-library" seems to build only the specified library which is fine. However when I use "bjam --with-library install", all of the boost headers are copied to the target. I want only headers for the specified libraries. -- Agnel
Agnel C J Kurian wrote:
Vladimir Prus
writes: What are you trying to achieve?
- Volodya
I'm trying to build and install only a subset of boost libraries. The same problem has been discussed (by someone else) on stackoverflow: http://stackoverflow.com/questions/439402/building-a-subset-of-boost-in-wind...
"bjam --with-library" seems to build only the specified library which is fine. However when I use "bjam --with-library install", all of the boost headers are copied to the target. I want only headers for the specified libraries.
Why? For disk size reasons, or something else? As I've said above, in general boost libraries depend on a pile of lower-level libraries, so you can't take headers of just one library. And as pointed out by Pete, you can use the bcp tool to copy headers of the libraries you need together with an approximation of the other headers that might be needed. - Volodya
participants (4)
-
Agnel C J Kurian
-
Pete Bartlett
-
Robert Ramey
-
Vladimir Prus