Boost logo

Boost-Build :

Subject: Re: [Boost-build] BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS causes build to fail
From: Steve M. Robbins (steve_at_[hidden])
Date: 2008-11-11 22:42:49


On Tue, Nov 11, 2008 at 08:04:07PM -0600, Steve M. Robbins wrote:

> Alternatively, since the test is used to suppress the long double
> version of the TR1 library, could I patch the build system to avoid
> building it when a certain parameter is given on the bjam command
> line? I can easily arrange for the parameter to be present on the
> affected architectures.

OK, after a bit of poking around, I came up with the following hack.
I'm interested in ideas for improvement. Could something like this
make it into Boost itself (minus the ECHOS, of course)?

--- boost1.36-1.36.0.orig/libs/math/build/Jamfile.v2
+++ boost1.36-1.36.0/libs/math/build/Jamfile.v2
@@ -51,7 +51,18 @@
 sph_neumann
 ;
 
-compile has_long_double_support.cpp ;
+if --disable-long-double in [ modules.peek : ARGV ]
+{
+ build-long-double = false ;
+}
+else
+{
+ build-long-double = true ;
+ compile has_long_double_support.cpp ;
+}
+
+ECHO "Build long double: " $(build-long-double) ;
+
 
 lib boost_math_tr1 : ../src/tr1/$(TR1_SOURCES).cpp
     :
@@ -63,11 +74,15 @@
               <link>shared:<define>BOOST_MATH_TR1_DYN_LINK=1
    ;
 
+if $(build-long-double) = true
+{
+echo "BUILDING MATH_TR1 LONG" ;
 lib boost_math_tr1l : ../src/tr1/$(TR1_SOURCES)l.cpp
     :
               <link>shared:<define>BOOST_MATH_TR1_DYN_LINK=1
               <dependency>has_long_double_support
    ;
+}
 
 lib boost_math_c99 : ../src/tr1/$(C99_SOURCES).cpp
     :
@@ -79,11 +94,15 @@
               <link>shared:<define>BOOST_MATH_TR1_DYN_LINK=1
    ;
 
+if $(build-long-double) = true
+{
+echo "BUILDING MATH_C99 LONG" ;
 lib boost_math_c99l : ../src/tr1/$(C99_SOURCES)l.cpp
     :
               <link>shared:<define>BOOST_MATH_TR1_DYN_LINK=1
               <dependency>has_long_double_support
    ;
+}
 
 
 boost-install boost_math_c99 boost_math_c99f boost_math_c99l boost_math_tr1 boost_math_tr1f boost_math_tr1l ;

Thanks,
-Steve




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