[bjam] How does one pass a compiler define

Is there a way to pass a compiler define when invoking bjam ? I want to build my libraries with by defining BOOST_ALL_DYN_LINK when linking to the dynamic run-time library. How do I do this ?

Edward Diener wrote:
Is there a way to pass a compiler define when invoking bjam ? I want to build my libraries with by defining BOOST_ALL_DYN_LINK when linking to the dynamic run-time library. How do I do this ?
bjam "-sBUILD=<define>BOOST_ALL_DYN_LINK=1" And add any other arguments you wish :-) -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - Grafik/jabber.org

Rene Rivera wrote:
Edward Diener wrote:
Is there a way to pass a compiler define when invoking bjam ? I want to build my libraries with by defining BOOST_ALL_DYN_LINK when linking to the dynamic run-time library. How do I do this ?
bjam "-sBUILD=<define>BOOST_ALL_DYN_LINK=1"
And add any other arguments you wish :-)
Thanks ! Where in the Boost Build documentation is the BUILD variable and its possible parameters described ?

Edward Diener wrote:
Rene Rivera wrote:
Edward Diener wrote:
Is there a way to pass a compiler define when invoking bjam ? I want to build my libraries with by defining BOOST_ALL_DYN_LINK when linking to the dynamic run-time library. How do I do this ?
bjam "-sBUILD=<define>BOOST_ALL_DYN_LINK=1"
And add any other arguments you wish :-)
Thanks ! Where in the Boost Build documentation is the BUILD variable and its possible parameters described ?
That one is first mentioned here: http://www.boost.org/more/getting_started.html#step5 It points you to the Boost.Build.v1 documentation (yes it's very sparse documentation). But the documentation as to what the different possibilities for the BUILD request is in the source of BBv1. Specifically all the standard, some toolset have additional ones, settings (features) are mentioned at: http://www.boost.org/tools/build/v1/build_system.htm#feature_description Which has a reference to: http://www.boost.org/tools/build/v1/features.jam -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - Grafik/jabber.org

Rene Rivera wrote:
Edward Diener wrote:
Rene Rivera wrote:
Edward Diener wrote:
Is there a way to pass a compiler define when invoking bjam ? I want to build my libraries with by defining BOOST_ALL_DYN_LINK when linking to the dynamic run-time library. How do I do this ?
bjam "-sBUILD=<define>BOOST_ALL_DYN_LINK=1"
And add any other arguments you wish :-)
Thanks ! Where in the Boost Build documentation is the BUILD variable and its possible parameters described ?
That one is first mentioned here:
http://www.boost.org/more/getting_started.html#step5
It points you to the Boost.Build.v1 documentation (yes it's very sparse documentation). But the documentation as to what the different possibilities for the BUILD request is in the source of BBv1. Specifically all the standard, some toolset have additional ones, settings (features) are mentioned at:
http://www.boost.org/tools/build/v1/build_system.htm#feature_description
Which has a reference to:
While I appreciate the information I find the state of the documentation regarding my question pretty ridiculous. You point me to three different links and in none of them is my simple question answered. The first link does not mention BUILD, the second link mentions what a feature is without mentioning BUILD, and the last link point me to a .jam file which supposedly I must understand just to determine how BUILD is used and even there I have no idea where to look. Surely BUILD needs to be documented somewhere in the Boost Build system documentation so that end-users would know how to use it to control the build of a library, or libraries, when using bjam. Or am I completely missing something which I myself do not understand, which may be something like "in order to understand how Boost build works in order to control a build effectively, one must study bjam, bjam files, and know how to read those files in order to understand how to use the bjam command line to control a build." If this is indeed the case, which may be the decision of Boost build developers, consider that it might be a very steep learning curve for those wishing to build boost libraries and simply use the bjam command line to manipulate the build. I personally think it should be easier for the end-user using bjam to build libraries and that the Boost build documentation should actually document what features are available and how they can be used from the command line without requiring the end user to understand the writing of .jam files and the internals of how Boost build works. But I am willing to be wrong about that.

Edward Diener wrote: One important thing you need to know is that this version of Boost.Build is the last. After the 1.33 release, scheduled for August 1st, we will be switching to version 2 of Boost.Build. So we have not spent the effort to further document the dead version. Yes I know this doesn't help you and others now. But all I can say is that the documentation for the new version is considerably better.
While I appreciate the information I find the state of the documentation regarding my question pretty ridiculous. You point me to three different links and in none of them is my simple question answered. The first link does not mention BUILD, the second link mentions what a feature is without mentioning BUILD, and the last link point me to a .jam file which supposedly I must understand just to determine how BUILD is used and even there I have no idea where to look.
The first link is to the section, it's the closest link, you need to read to near the bottom of that section to see the reference. Try doing a search for "-sBUILD" and you'll get to it faster.
Surely BUILD needs to be documented somewhere in the Boost Build system documentation so that end-users would know how to use it to control the build of a library, or libraries, when using bjam. Or am I completely missing something which I myself do not understand, which may be something like "in order to understand how Boost build works in order to control a build effectively, one must study bjam, bjam files, and know how to read those files in order to understand how to use the bjam command line to control a build."
I think the misunderstanding is that BUILD is not really intended for end users. Which is why it's a side note and not explained all that well.
If this is indeed the case, which may be the decision of Boost build developers, consider that it might be a very steep learning curve for those wishing to build boost libraries and simply use the bjam command line to manipulate the build. I personally think it should be easier for the end-user using bjam to build libraries and that the Boost build documentation should actually document what features are available and how they can be used from the command line without requiring the end user to understand the writing of .jam files and the internals of how Boost build works. But I am willing to be wrong about that.
Yes, I agree, and the rest of the Boost.Build developers are also likely to agree. Which is why considerable effort has been spent on the new version and its documentation. (And much gratitude goes to Volodya for the work over the past 3 years of work on BBv2) In case you feel like reading about BBv2: http://boost.org/boost-build2/ -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - Grafik/jabber.org

Rene Rivera wrote:
Edward Diener wrote:
One important thing you need to know is that this version of Boost.Build is the last. After the 1.33 release, scheduled for August 1st, we will be switching to version 2 of Boost.Build. So we have not spent the effort to further document the dead version. Yes I know this doesn't help you and others now.
Agreed.
But all I can say is that the documentation for the new version is considerably better.
I look forward to the upcoming documentation for Boost Build version 2 subsequent to the 1.33 release.
While I appreciate the information I find the state of the documentation regarding my question pretty ridiculous. You point me to three different links and in none of them is my simple question answered. The first link does not mention BUILD, the second link mentions what a feature is without mentioning BUILD, and the last link point me to a .jam file which supposedly I must understand just to determine how BUILD is used and even there I have no idea where to look.
The first link is to the section, it's the closest link, you need to read to near the bottom of that section to see the reference. Try doing a search for "-sBUILD" and you'll get to it faster.
I can see the "-sBUILD" there but it tells me nothing about any of the options I
can use with it, other than to say there are some. This to me is almost
laughable, that the documentation would make a point of saying 'Of the
additional options perhaps the most imporant is "-sBUILD=
Surely BUILD needs to be documented somewhere in the Boost Build system documentation so that end-users would know how to use it to control the build of a library, or libraries, when using bjam. Or am I completely missing something which I myself do not understand, which may be something like "in order to understand how Boost build works in order to control a build effectively, one must study bjam, bjam files, and know how to read those files in order to understand how to use the bjam command line to control a build."
I think the misunderstanding is that BUILD is not really intended for end users. Which is why it's a side note and not explained all that well.
Considering that you pointed out to me how I could control my build of the Boost libraries by defining BOOST_ALL_DYN_LINK using BUILD, I find it very odd that you say that "BUILD is not really intended for end users". Is it not an end-user possibility to control Boost build by specifying the correct command line options ?
If this is indeed the case, which may be the decision of Boost build developers, consider that it might be a very steep learning curve for those wishing to build boost libraries and simply use the bjam command line to manipulate the build. I personally think it should be easier for the end-user using bjam to build libraries and that the Boost build documentation should actually document what features are available and how they can be used from the command line without requiring the end user to understand the writing of .jam files and the internals of how Boost build works. But I am willing to be wrong about that.
Yes, I agree, and the rest of the Boost.Build developers are also likely to agree. Which is why considerable effort has been spent on the new version and its documentation. (And much gratitude goes to Volodya for the work over the past 3 years of work on BBv2)
In case you feel like reading about BBv2: http://boost.org/boost-build2/
Thanks for the link.

Edward Diener
I say this in all good spirits that "you just have to be kidding" if anybody considers this adequate documentation. It is rather like something out of Ionesco instead.
Nobody -- other than that rhinoceros over there behind you -- considers it adequate. -- Dave Abrahams Boost Consulting www.boost-consulting.com

David Abrahams wrote:
Edward Diener
writes: I say this in all good spirits that "you just have to be kidding" if anybody considers this adequate documentation. It is rather like something out of Ionesco instead.
Nobody -- other than that rhinoceros over there behind you -- considers it adequate.
Gotcha !

Edward Diener
Rene Rivera wrote:
Edward Diener wrote:
One important thing you need to know is that this version of Boost.Build is the last. After the 1.33 release, scheduled for August 1st, we will be switching to version 2 of Boost.Build. So we have not spent the effort to further document the dead version. Yes I know this doesn't help you and others now.
Agreed.
But all I can say is that the documentation for the new version is considerably better.
I look forward to the upcoming documentation for Boost Build version 2 subsequent to the 1.33 release.
Well, it may be better, but I think it is also far from adequate. I have put some energy into improving it, but it hasn't been enough. I urge you, if you care about this issue, to read through the documentation *now* and post your questions and editorial comments: http://engineering.meta-comm.com/resources/cs-win32_metacomm/doc/html/bbv2.h... -- Dave Abrahams Boost Consulting www.boost-consulting.com
participants (3)
-
David Abrahams
-
Edward Diener
-
Rene Rivera