Added new --with-macports option for using MacPorts on Mac OS X; this falls back to using /opt/local if no /path/to/macports is given and implicitly sets Boost parameters. Also note that this implies "using darwin ;" as compiler.

This commit is contained in:
Christian Federmann 2012-05-10 09:40:13 +02:00
parent c1cf0faf14
commit af9b02c59b
2 changed files with 33 additions and 11 deletions

View File

@ -88,8 +88,17 @@ Common options are:
--with-giza=/path/to/giza to enable training scripts
-jN where N is the number of CPUs
--with-macports=/path/to/macports use MacPorts on Mac OS X.
If you leave out /path/to/macports bjam will use the /opt/local as default.
You don't have to use --with-boost with-macports as it is implicitly set.
Also note that using --with-macports automatically triggers "using darwin".
Binaries will appear in dist/bin.
You can clean up data from previous builds using
./bjam --clean
For further documentation, run
./bjam --help

View File

@ -47,17 +47,30 @@ rule auto-shared ( name : additional * ) {
}
}
with-boost = [ option.get "with-boost" ] ;
if $(with-boost) {
# MacPorts' default location is /opt/local -- use this if no path is given.
with-macports = [ option.get "with-macports" : : "/opt/local" ] ;
if $(with-macports) {
using darwin ;
ECHO "Using --with-macports=$(with-macports), implying use of darwin GCC" ;
L-boost-search = -L$(with-macports)/lib ;
boost-search = <search>$(with-macports)/lib ;
I-boost-include = -I$(with-macports)/include ;
boost-include = <include>$(with-macports)/include ;
}
else {
with-boost = [ option.get "with-boost" ] ;
if $(with-boost) {
L-boost-search = -L$(with-boost)/lib" "-L$(with-boost)/lib64 ;
boost-search = <search>$(with-boost)/lib <search>$(with-boost)/lib64 ;
I-boost-include = -I$(with-boost)/include ;
boost-include = <include>$(with-boost)/include ;
} else {
} else {
L-boost-search = "" ;
boost-search = ;
I-boost-include = "" ;
boost-include = ;
}
}
#Are we linking static binaries against shared boost?