[boost] Integrated Petr Machata's patch for long double support by Boost.Math (https://bugzilla.redhat.com/s
Denis Arnaud
denisarnaud at fedoraproject.org
Tue Jan 24 23:13:09 UTC 2012
commit a7311be69805670a2ccf00060439f2129ff7e265
Author: Denis Arnaud <denis.arnaud_fedora at m4x.org>
Date: Wed Jan 25 00:12:57 2012 +0100
Integrated Petr Machata's patch for long double support by Boost.Math (https://bugzilla.redhat.com/show_bug.cgi?id=783660).
boost-1.48.0-cmakeify-full.patch | 70 ++++++++++++++++++++++++-------------
1 files changed, 45 insertions(+), 25 deletions(-)
---
diff --git a/boost-1.48.0-cmakeify-full.patch b/boost-1.48.0-cmakeify-full.patch
index c0d4be0..eca40d6 100644
--- a/boost-1.48.0-cmakeify-full.patch
+++ b/boost-1.48.0-cmakeify-full.patch
@@ -5740,6 +5740,18 @@ index 0000000..84080d5
+)
+
+
+diff --git a/libs/math/config/has_long_double_support.cpp b/libs/math/config/has_long_double_support.cpp
+index d314cf3..9022408 100644
+--- a/libs/math/config/has_long_double_support.cpp
++++ b/libs/math/config/has_long_double_support.cpp
+@@ -8,3 +8,7 @@
+ #ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+ #error "long double support is not supported by Boost.Math on this Plaform: the long double version of the TR1 library will not be built."
+ #endif
++
++int main(int argc, char *argv[]) {
++ return 0;
++}
diff --git a/libs/math/module.cmake b/libs/math/module.cmake
new file mode 100644
index 0000000..e222098
@@ -5750,10 +5762,10 @@ index 0000000..e222098
\ No newline at end of file
diff --git a/libs/math/src/tr1/CMakeLists.txt b/libs/math/src/tr1/CMakeLists.txt
new file mode 100644
-index 0000000..692fa72
+index 0000000..865062a
--- /dev/null
+++ b/libs/math/src/tr1/CMakeLists.txt
-@@ -0,0 +1,76 @@
+@@ -0,0 +1,84 @@
+boost_add_library(math_tr1
+
+ assoc_laguerre.cpp assoc_legendre.cpp beta.cpp
@@ -5782,20 +5794,6 @@ index 0000000..692fa72
+ COMPILE_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR}"
+)
+
-+boost_add_library(math_tr1l
-+
-+ assoc_laguerrel.cpp assoc_legendrel.cpp betal.cpp
-+ comp_ellint_1l.cpp comp_ellint_2l.cpp comp_ellint_3l.cpp
-+ cyl_bessel_il.cpp cyl_bessel_jl.cpp cyl_bessel_kl.cpp
-+ cyl_neumannl.cpp ellint_1l.cpp ellint_2l.cpp ellint_3l.cpp
-+ expintl.cpp hermitel.cpp laguerrel.cpp legendrel.cpp
-+ riemann_zetal.cpp sph_bessell.cpp sph_legendrel.cpp
-+ sph_neumannl.cpp
-+
-+ SHARED_COMPILE_FLAGS "-DBOOST_MATH_TR1_DYN_LINK=1"
-+ COMPILE_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR}"
-+)
-+
+boost_add_library(math_c99
+
+ acosh.cpp asinh.cpp atanh.cpp cbrt.cpp copysign.cpp erfc.cpp
@@ -5819,17 +5817,39 @@ index 0000000..692fa72
+ COMPILE_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR}"
+)
+
-+boost_add_library(math_c99l
++try_compile(HAS_LONG_DOUBLE_SUPPORT
++ ${CMAKE_CURRENT_SOURCE_DIR}/../../config/
++ ${CMAKE_CURRENT_SOURCE_DIR}/../../config/has_long_double_support.cpp)
+
-+ acoshl.cpp asinhl.cpp atanhl.cpp cbrtl.cpp copysignl.cpp
-+ erfcl.cpp erfl.cpp expm1l.cpp fmaxl.cpp fminl.cpp
-+ fpclassifyl.cpp hypotl.cpp lgammal.cpp llroundl.cpp log1pl.cpp
-+ lroundl.cpp nextafterl.cpp nexttowardl.cpp roundl.cpp
-+ tgammal.cpp truncl.cpp
++IF (HAS_LONG_DOUBLE_SUPPORT)
++ boost_add_library(math_tr1l
+
-+ SHARED_COMPILE_FLAGS "-DBOOST_MATH_TR1_DYN_LINK=1"
-+ COMPILE_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR}"
-+)
++ assoc_laguerrel.cpp assoc_legendrel.cpp betal.cpp
++ comp_ellint_1l.cpp comp_ellint_2l.cpp comp_ellint_3l.cpp
++ cyl_bessel_il.cpp cyl_bessel_jl.cpp cyl_bessel_kl.cpp
++ cyl_neumannl.cpp ellint_1l.cpp ellint_2l.cpp ellint_3l.cpp
++ expintl.cpp hermitel.cpp laguerrel.cpp legendrel.cpp
++ riemann_zetal.cpp sph_bessell.cpp sph_legendrel.cpp
++ sph_neumannl.cpp
++
++ SHARED_COMPILE_FLAGS "-DBOOST_MATH_TR1_DYN_LINK=1"
++ COMPILE_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR}"
++ )
++
++ boost_add_library(math_c99l
++
++ acoshl.cpp asinhl.cpp atanhl.cpp cbrtl.cpp copysignl.cpp
++ erfcl.cpp erfl.cpp expm1l.cpp fmaxl.cpp fminl.cpp
++ fpclassifyl.cpp hypotl.cpp lgammal.cpp llroundl.cpp log1pl.cpp
++ lroundl.cpp nextafterl.cpp nexttowardl.cpp roundl.cpp
++ tgammal.cpp truncl.cpp
++
++ SHARED_COMPILE_FLAGS "-DBOOST_MATH_TR1_DYN_LINK=1"
++ COMPILE_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR}"
++ )
++ELSE ()
++ colormsg(RED "+-- long double not supported, skipping math_*l libraries.")
++ENDIF ()
diff --git a/libs/math/test/CMakeLists.txt b/libs/math/test/CMakeLists.txt
new file mode 100644
index 0000000..88f26b7
More information about the scm-commits
mailing list