diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/boost-math/build-old-libs.patch | |
Diffstat (limited to 'vcpkg/ports/boost-math/build-old-libs.patch')
| -rw-r--r-- | vcpkg/ports/boost-math/build-old-libs.patch | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/vcpkg/ports/boost-math/build-old-libs.patch b/vcpkg/ports/boost-math/build-old-libs.patch new file mode 100644 index 0000000..9fb7881 --- /dev/null +++ b/vcpkg/ports/boost-math/build-old-libs.patch @@ -0,0 +1,111 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4e6c492..a910097 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -59,3 +59,106 @@ elseif(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) + install(DIRECTORY "include/" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") + + endif() ++ ++option(BOOST_MATH_BUILD_WITH_LEGACY_FUNCTIONS "" OFF) ++if(BOOST_MATH_BUILD_WITH_LEGACY_FUNCTIONS) ++include(CheckCXXSourceCompiles) ++set(CMAKE_REQUIRED_LIBRARIES Boost::config) ++set(CMAKE_REQUIRED_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/include") ++check_cxx_source_compiles("#include <${CMAKE_CURRENT_SOURCE_DIR}/config/has_long_double_support.cpp> \n int main() { return 0;}" BOOST_MATH_HAS_LONG_DOUBLE) ++unset(CMAKE_REQUIRED_LIBRARIES) ++unset(CMAKE_REQUIRED_INCLUDES) ++ ++set(C99_SOURCES ++ acosh ++ asinh ++ atanh ++ cbrt ++ copysign ++ erfc ++ erf ++ expm1 ++ fmax ++ fmin ++ fpclassify ++ hypot ++ lgamma ++ llround ++ log1p ++ lround ++ nextafter ++ nexttoward ++ round ++ tgamma ++ trunc ++) ++ ++set(TR1_SOURCES ++ assoc_laguerre ++ assoc_legendre ++ beta ++ comp_ellint_1 ++ comp_ellint_2 ++ comp_ellint_3 ++ cyl_bessel_i ++ cyl_bessel_j ++ cyl_bessel_k ++ cyl_neumann ++ ellint_1 ++ ellint_2 ++ ellint_3 ++ expint ++ hermite ++ laguerre ++ legendre ++ riemann_zeta ++ sph_bessel ++ sph_legendre ++ sph_neumann ++) ++ ++list(TRANSFORM C99_SOURCES PREPEND "src/tr1/" ) # OUTPUT_VARIABLE <output variable>]) ++list(TRANSFORM TR1_SOURCES PREPEND "src/tr1/" ) ++ ++list(TRANSFORM C99_SOURCES APPEND "f.cpp" OUTPUT_VARIABLE C99_SOURCESf) ++list(TRANSFORM TR1_SOURCES APPEND "f.cpp" OUTPUT_VARIABLE TR1_SOURCESf) ++ ++set(types "" f) ++ ++if(BOOST_MATH_HAS_LONG_DOUBLE) ++ list(TRANSFORM C99_SOURCES APPEND "l.cpp" OUTPUT_VARIABLE C99_SOURCESl) ++ list(TRANSFORM TR1_SOURCES APPEND "l.cpp" OUTPUT_VARIABLE TR1_SOURCESl) ++ list(APPEND types l) ++endif() ++ ++list(TRANSFORM C99_SOURCES APPEND ".cpp") ++list(TRANSFORM TR1_SOURCES APPEND ".cpp") ++ ++foreach(type IN LISTS types) ++ add_library(boost_math_tr1${type} ${TR1_SOURCES${type}}) ++ target_link_libraries(boost_math_tr1${type} PUBLIC Boost::config) ++ target_include_directories(boost_math_tr1${type} PRIVATE src/tr1) ++ target_include_directories(boost_math_tr1${type} PRIVATE include) ++ add_library(boost_math_c99${type} ${C99_SOURCES${type}}) ++ target_link_libraries(boost_math_c99${type} PUBLIC Boost::config) ++ target_include_directories(boost_math_c99${type} PRIVATE src/tr1) ++ target_include_directories(boost_math_c99${type} PRIVATE include) ++ if(BUILD_SHARED_LIBS) ++ target_compile_definitions(boost_math_tr1${type} PUBLIC BOOST_MATH_TR1_DYN_LINK=1) ++ target_compile_definitions(boost_math_c99${type} PUBLIC BOOST_MATH_TR1_DYN_LINK=1) ++ if(MSVC) ++ target_compile_definitions(boost_math_tr1${type} PRIVATE "BOOST_SYMBOL_EXPORT=__declspec(dllexport)" BOOST_ALL_NO_LIB) ++ target_compile_definitions(boost_math_c99${type} PRIVATE "BOOST_SYMBOL_EXPORT=__declspec(dllexport)" BOOST_ALL_NO_LIB) ++ endif() ++ endif() ++ target_compile_features(boost_math_tr1${type} PUBLIC cxx_std_14) ++ target_compile_features(boost_math_c99${type} PUBLIC cxx_std_14) ++ if(DARWIN) ++ target_compile_definitions(boost_math_tr1${type} PRIVATE _DARWIN_C_SOURCE) ++ target_compile_definitions(boost_math_c99${type} PRIVATE _DARWIN_C_SOURCE) ++ endif() ++ boost_install_target(TARGET boost_math_tr1${type} VERSION ${BOOST_SUPERPROJECT_VERSION}) ++ boost_install_target(TARGET boost_math_c99${type} VERSION ${BOOST_SUPERPROJECT_VERSION}) ++endforeach() ++endif() ++ |