Boost logo

Boost-Build :

Subject: [Boost-build] Compile boost libs each one with different version number
From: Christina Larocca (christina.larocca_at_[hidden])
Date: 2010-05-25 04:45:07


Hello, good morning developers.

I'm trying to compile boost libs with different versions between each other.
For example, I could have a regex 1.39.0.1, a serialization 1.39.0.2, a
signals 1.39.1.0, etc...

So far, I've been trying to modify Jamroot to achieve this, but I can't pass
from one point:

In the layout=system block, I've added the following to try to change the
math_c99 version:

 if $(layout) = versioned
        {
           ...
        }
else
        {
           if <base>boost_math_c99
                {
                local result = [ common.format-name
                <base> -$(BUILD_ID)
                <base> -$(BUILD_ID)
                <base> -$(BUILD_ID)
                : $(name) : $(type) : $(property-set) ] ;
                }
           else
                {
                local result = [ common.format-name
                <base> -$(BUILD_ID)
                <base> -$(BUILD_ID))
                : $(name) : $(type) : $(property-set) ] ;
                }
           else
                {
                local result = [ common.format-name
                <base> -$(BUILD_ID)
                <base> -$(BUILD_ID))
                : $(name) : $(type) : $(property-set) ] ;
                }
            # Optionally add version suffix. On NT, library with version
suffix
            # will not be recognized by linkers. On CYGWIN, we get strage
            # duplicate symbol errors when library is generated with version
            # suffix. On OSX, version suffix is not needed -- the linker
expects
            # the libFoo.1.2.3.dylib format. AIX linkers do not accept
version
            # suffixes either. Pgi compilers can not accept library with
version
            # suffix.
            if $(type) = SHARED_LIB &&
              ( ! ( [ $(property-set).get <target-os> ] in windows cygwin
darwin aix ) &&
                ! ( [ $(property-set).get <toolset> ] in pgi ) )
            {
                result = $(result).$(BOOST_VERSION) ;
            }

            return $(result) ;
        }
    }

My idea with this code is to know quickly while compiling if boost_c99 is
recognised as a different lib and added 3 times the version number (I'll
change that later). Problem is I can't manage to put the "if
<base>boost_math_c99" part to work, so it never gets into that block. My log
from compilation is:

...found 5977 targets...
...updating 956 targets...
gcc.compile.c++
bin.v2/libs/math/build/gcc-3.4.2/release/threading-multi/acosh.o
gcc.compile.c++
bin.v2/libs/math/build/gcc-3.4.2/release/threading-multi/asinh.o
gcc.compile.c++
bin.v2/libs/math/build/gcc-3.4.2/release/threading-multi/atanh.o
gcc.compile.c++
bin.v2/libs/math/build/gcc-3.4.2/release/threading-multi/cbrt.o
gcc.compile.c++
bin.v2/libs/math/build/gcc-3.4.2/release/threading-multi/copysign.o
gcc.compile.c++
bin.v2/libs/math/build/gcc-3.4.2/release/threading-multi/erfc.o
gcc.compile.c++
bin.v2/libs/math/build/gcc-3.4.2/release/threading-multi/erf.o
gcc.compile.c++
bin.v2/libs/math/build/gcc-3.4.2/release/threading-multi/expm1.o
gcc.compile.c++
bin.v2/libs/math/build/gcc-3.4.2/release/threading-multi/fmax.o
gcc.compile.c++
bin.v2/libs/math/build/gcc-3.4.2/release/threading-multi/fmin.o
gcc.compile.c++
bin.v2/libs/math/build/gcc-3.4.2/release/threading-multi/fpclassify.o
gcc.compile.c++
bin.v2/libs/math/build/gcc-3.4.2/release/threading-multi/hypot.o
gcc.compile.c++
bin.v2/libs/math/build/gcc-3.4.2/release/threading-multi/lgamma.o
gcc.compile.c++
bin.v2/libs/math/build/gcc-3.4.2/release/threading-multi/llround.o
gcc.compile.c++
bin.v2/libs/math/build/gcc-3.4.2/release/threading-multi/log1p.o
gcc.compile.c++
bin.v2/libs/math/build/gcc-3.4.2/release/threading-multi/lround.o
gcc.compile.c++
bin.v2/libs/math/build/gcc-3.4.2/release/threading-multi/nextafter.o
gcc.compile.c++
bin.v2/libs/math/build/gcc-3.4.2/release/threading-multi/nexttoward.o
gcc.compile.c++
bin.v2/libs/math/build/gcc-3.4.2/release/threading-multi/round.o
gcc.compile.c++
bin.v2/libs/math/build/gcc-3.4.2/release/threading-multi/tgamma.o
gcc.compile.c++
bin.v2/libs/math/build/gcc-3.4.2/release/threading-multi/trunc.o
gcc.link.dll
bin.v2/libs/math/build/gcc-3.4.2/release/threading-multi/libboost_math_c99.so
common.copy stage/lib/libboost_math_c99.so

so, apparently it skips the if and else blocks. Probably my if block is
badly constructed.

Can you jelp me on this, moreover, could you tell me if that's the good way
to get each lib compiles with a potential different version number?

Thanks for your time, regards
Alejandro.



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