1. Extracted the (Petr Machata's) patch on long double C++ source

from the CMake-ifying patch into a dedicated one.
2. Integrated the CMake-related part of the long double patch into
   the CMake-ifying patch.
This commit is contained in:
Denis Arnaud 2012-01-25 23:51:38 +01:00
parent 1a7f14244d
commit 9f85852534
2 changed files with 25 additions and 35 deletions

View File

@ -5740,18 +5740,15 @@ index 0000000..84080d5
+) +)
+ +
+ +
diff --git a/libs/math/config/has_long_double_support.cpp b/libs/math/config/has_long_double_support.cpp diff --git a/libs/math/config/CMakeLists.txt b/libs/math/config/CMakeLists.txt
index d314cf3..9022408 100644 new file mode 100644
--- a/libs/math/config/has_long_double_support.cpp index 0000000..80921b3
+++ b/libs/math/config/has_long_double_support.cpp --- /dev/null
@@ -8,3 +8,7 @@ +++ b/libs/math/config/CMakeLists.txt
#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS @@ -0,0 +1,3 @@
#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." +project(has_long_double_support CXX)
#endif +add_executable(has_long_double_support has_long_double_support.cpp)
+ +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../../)
+int main(int argc, char *argv[]) {
+ return 0;
+}
diff --git a/libs/math/module.cmake b/libs/math/module.cmake diff --git a/libs/math/module.cmake b/libs/math/module.cmake
new file mode 100644 new file mode 100644
index 0000000..e222098 index 0000000..e222098
@ -5762,10 +5759,10 @@ index 0000000..e222098
\ No newline at end of file \ No newline at end of file
diff --git a/libs/math/src/tr1/CMakeLists.txt b/libs/math/src/tr1/CMakeLists.txt diff --git a/libs/math/src/tr1/CMakeLists.txt b/libs/math/src/tr1/CMakeLists.txt
new file mode 100644 new file mode 100644
index 0000000..865062a index 0000000..e5400bc
--- /dev/null --- /dev/null
+++ b/libs/math/src/tr1/CMakeLists.txt +++ b/libs/math/src/tr1/CMakeLists.txt
@@ -0,0 +1,84 @@ @@ -0,0 +1,85 @@
+boost_add_library(math_tr1 +boost_add_library(math_tr1
+ +
+ assoc_laguerre.cpp assoc_legendre.cpp beta.cpp + assoc_laguerre.cpp assoc_legendre.cpp beta.cpp
@ -5819,7 +5816,8 @@ index 0000000..865062a
+ +
+try_compile(HAS_LONG_DOUBLE_SUPPORT +try_compile(HAS_LONG_DOUBLE_SUPPORT
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../config/ + ${CMAKE_CURRENT_SOURCE_DIR}/../../config/
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../config/has_long_double_support.cpp) + ${CMAKE_CURRENT_SOURCE_DIR}/../../config/
+ has_long_double_support)
+ +
+IF (HAS_LONG_DOUBLE_SUPPORT) +IF (HAS_LONG_DOUBLE_SUPPORT)
+ boost_add_library(math_tr1l + boost_add_library(math_tr1l

View File

@ -1,20 +1,12 @@
diff -urpN boost_1_48_0/libs/math/config/CMakeLists.txt boost_1_48_0.pm/libs/math/config/CMakeLists.txt diff --git a/libs/math/config/has_long_double_support.cpp b/libs/math/config/has_long_double_support.cpp
--- boost_1_48_0/libs/math/config/CMakeLists.txt 1969-12-31 19:00:00.000000000 -0500 index d314cf3..9022408 100644
+++ boost_1_48_0.pm/libs/math/config/CMakeLists.txt 2012-01-25 06:13:29.000000000 -0500 --- a/libs/math/config/has_long_double_support.cpp
@@ -0,0 +1,3 @@ +++ b/libs/math/config/has_long_double_support.cpp
+project(has_long_double_support CXX) @@ -8,3 +8,7 @@
+add_executable(has_long_double_support has_long_double_support.cpp) #ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../../) #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."
diff -urpN boost_1_48_0/libs/math/src/tr1/CMakeLists.txt boost_1_48_0.pm/libs/math/src/tr1/CMakeLists.txt #endif
--- boost_1_48_0/libs/math/src/tr1/CMakeLists.txt 2012-01-25 07:32:50.000000000 -0500 +
+++ boost_1_48_0.pm/libs/math/src/tr1/CMakeLists.txt 2012-01-25 07:29:01.000000000 -0500 +int main(int argc, char *argv[]) {
@@ -51,7 +51,8 @@ boost_add_library(math_c99f + return 0;
+}
try_compile(HAS_LONG_DOUBLE_SUPPORT
${CMAKE_CURRENT_SOURCE_DIR}/../../config/
- ${CMAKE_CURRENT_SOURCE_DIR}/../../config/has_long_double_support.cpp)
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../config/
+ has_long_double_support)
IF (HAS_LONG_DOUBLE_SUPPORT)
boost_add_library(math_tr1l