From: Bernhard Glück (bernhard.glueck_at_[hidden])
Date: 2006-01-27 02:09:44
I apologize if this is the wrong list to post to, but it seems the most
appropriate to me.
I am currently setting up a quite large C++ software project, which is
being built on multiple platforms ( Win32,Win64,Linux, MacOs ). We have
selected Boost::Build v1 as our build system ( wanting to migrate to V2
lateron when it is deemed fit for production use by its team )
Now after working around with it for a few days i have several questions
* Inclusion of libraries
For normal external dependencies i add a libpath to my target and
state the library name using the <lib> tag.
I assume this is the correct way to do so.
However we have boost itself as a dependency of our project. We built
boost using its install target so we have
a directory include and lib in our dependencies folder ( as built by
the install target ). We choose this so we can version the precompiled
boost libraries easily.
How do i link to those libraries ? THe above way just does not seem to
work correctly. And how can i select the correct library based on the
current compilation target ? I mean for external ones i use
<vc-8_0><*><lib>xxxx etc... but do i have to do it the same way for the
boost libraries ? I thought there was some automatic selection of
libraries going on ?
* Inclusion of platform specific source code.
We have several tempalte targets in our build system e.g PgeModule (
which is a library with some special settings) Now i want to add some
source code files to a PgeModule derived target based on the platform i
am building for and NOT the specific compiler. Can this be achieved ?
I thought maybe having a feature <win32> or something like that would
help ? But how would i implement it in
What i basically want is something like this:
lib PgeKernel :
right now i do it baed on the compiler, which seems awfully wordy since
i have to repeat the same inclusion for each compiler that potentially
targets that platform, and in the case of GCC i am totally stumped (
since it can be used on practially any platform..
* STLPORT building of Boost itself.
We are using VC8.0 as our default compiler on Windows. However due to
the recent STL bug in its shipping Dinkumware STL ( Memory leaks in
iostreams ) we decided to go for STLPort on all platforms.
However the following build command line:
bjam "-sTOOLS=vc-8_0-stlport" "-sBUILD=<runtime-link>dynamic
<stlport-version>5.0" "-sSTLPORT_PATH=d:\sdk" install
does not seem to work correctly, e.g the libraries built don't contain
reference to STLPort libs and are also not postfixed with the correct
stlport postfixes as described in the Docs..
Note : The d:\sdk path contains a path STLPORT-5.0 containing a prebuilt
version of STLPORT 5.1 for VC8
Note: I added the vc-8_0-stlport toolset myself like so:
Contents of vc-8_0-stlport-tools.jam in boostdir/tools/build/v1/
extends-toolset msvc ;
flags $(gCURRENT_TOOLSET) STLPORT_LIB_BASE_NAME ;
STLPORT_LIB_BASE_NAME = stlport_vc80 ;
# bring in the STLPort configuration
SEARCH on stlport.jam = $(BOOST_BUILD_PATH) ;
include stlport.jam ;
# singleton variables...
set-as-singleton VC80_ROOT ;
if ! $(MSVCDir)
VC80_ROOT ?= $(VS80COMNTOOLS:J=" ")..\\..\\VC ;
ProgramFiles ?= $(PROGRAMFILES) ;
VC80_ROOT ?= $(ProgramFiles:J=" ")"\\Microsoft Visual Studio
VC_TOOL_PATH = "$(VC80_ROOT)"\\bin\\ ;
VC_SETUP = "CALL \"$(VC_TOOL_PATH)vcvars32.BAT\" >nul" ;
VC_PDB_NAME = vc80 ;
VC_MANIFEST = "mt -manifest " ;
VC_OUTPUTRESOURCE = -outputresource: ;
feature native-wchar_t : on off ;
flags vc-8_0-stlport C++FLAGS : /Zc:forScope ;
flags vc-8_0-stlport C++FLAGS <native-wchar_t>on : /Zc:wchar_t ;
# The following #// line will be used by the regression test table
# program as the column heading for HTML tables. Must not include
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk