mirror of
https://github.com/microsoft/vcpkg
synced 2024-11-21 16:09:03 -07:00
[boost-math] Fix build on x64-linux-dynamic, add feature legacy (#38728)
Fixes #38725 Fixes #38714 Fixed https://github.com/microsoft/vcpkg/issues/38955
This commit is contained in:
parent
37630acd98
commit
0151c07c08
15 changed files with 66 additions and 16 deletions
|
@ -9,7 +9,6 @@ set(CMAKE_CXX_STANDARD 11)
|
|||
find_package(Boost REQUIRED COMPONENTS
|
||||
filesystem
|
||||
log
|
||||
math_tr1
|
||||
program_options
|
||||
random
|
||||
serialization
|
||||
|
@ -63,7 +62,6 @@ target_link_libraries(vina
|
|||
Boost::boost
|
||||
Boost::filesystem
|
||||
Boost::log
|
||||
Boost::math_tr1
|
||||
Boost::program_options
|
||||
Boost::random
|
||||
Boost::serialization
|
||||
|
@ -76,7 +74,6 @@ target_link_libraries(vina_split
|
|||
Boost::boost
|
||||
Boost::filesystem
|
||||
Boost::log
|
||||
Boost::math_tr1
|
||||
Boost::program_options
|
||||
Boost::random
|
||||
Boost::serialization
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "autodock-vina",
|
||||
"version-semver": "1.2.5",
|
||||
"port-version": 2,
|
||||
"port-version": 3,
|
||||
"description": "AutoDock Vina is one of the fastest and most widely used open-source docking engines.",
|
||||
"homepage": "http://vina.scripps.edu/",
|
||||
"dependencies": [
|
||||
|
|
|
@ -2,10 +2,12 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|||
index 7e7790271c..cd08a77e4a 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -41,6 +41,104 @@ else()
|
||||
@@ -41,6 +41,108 @@ else()
|
||||
|
||||
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")
|
||||
|
@ -80,9 +82,11 @@ index 7e7790271c..cd08a77e4a 100644
|
|||
+
|
||||
+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)
|
||||
|
@ -102,7 +106,7 @@ index 7e7790271c..cd08a77e4a 100644
|
|||
+ 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()
|
||||
+
|
||||
# Only enable tests when we're the root project
|
||||
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
||||
|
|
10
ports/boost-math/features.cmake
Normal file
10
ports/boost-math/features.cmake
Normal file
|
@ -0,0 +1,10 @@
|
|||
vcpkg_check_features(
|
||||
OUT_FEATURE_OPTIONS
|
||||
FEATURE_OPTIONS
|
||||
FEATURES
|
||||
"legacy" BOOST_MATH_BUILD_WITH_LEGACY_FUNCTIONS
|
||||
)
|
||||
|
||||
if(NOT BOOST_MATH_BUILD_WITH_LEGACY_FUNCTIONS)
|
||||
set(Z_VCPKG_BOOST_FORCE_HEADER_ONLY ON)
|
||||
endif()
|
|
@ -12,6 +12,7 @@ vcpkg_from_github(
|
|||
)
|
||||
|
||||
set(FEATURE_OPTIONS "")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/features.cmake")
|
||||
boost_configure_and_install(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS ${FEATURE_OPTIONS}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"$comment": "Automatically generated by scripts/boost/generate-ports.ps1",
|
||||
"name": "boost-math",
|
||||
"version": "1.85.0",
|
||||
"port-version": 1,
|
||||
"port-version": 2,
|
||||
"description": "Boost math module",
|
||||
"homepage": "https://www.boost.org/libs/math",
|
||||
"license": "BSL-1.0",
|
||||
|
@ -56,5 +56,10 @@
|
|||
"name": "boost-throw-exception",
|
||||
"version>=": "1.85.0"
|
||||
}
|
||||
]
|
||||
],
|
||||
"features": {
|
||||
"legacy": {
|
||||
"description": "Build the legacy C99 and TR1 libraries"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "cctag",
|
||||
"version-semver": "1.0.2",
|
||||
"port-version": 6,
|
||||
"port-version": 7,
|
||||
"maintainers": "alicevision-team@googlegroups.com",
|
||||
"description": "Computer vision library for detecting CCTag markers made up of concentric circles",
|
||||
"homepage": "https://github.com/alicevision/CCTag",
|
||||
|
@ -18,7 +18,12 @@
|
|||
"boost-foreach",
|
||||
"boost-iterator",
|
||||
"boost-lexical-cast",
|
||||
"boost-math",
|
||||
{
|
||||
"name": "boost-math",
|
||||
"features": [
|
||||
"legacy"
|
||||
]
|
||||
},
|
||||
"boost-mpl",
|
||||
"boost-multi-array",
|
||||
"boost-program-options",
|
||||
|
|
|
@ -8,7 +8,7 @@ function(boost_configure_and_install)
|
|||
set(boost_lib_name_config "${boost_lib_name}")
|
||||
|
||||
set(headers_only OFF)
|
||||
if(NOT EXISTS "${arg_SOURCE_PATH}/src") # regex|system|math are header only and only install libs due to compat
|
||||
if(NOT EXISTS "${arg_SOURCE_PATH}/src" OR Z_VCPKG_BOOST_FORCE_HEADER_ONLY) # regex|system|math are header only and only install libs due to compat
|
||||
set(headers_only ON)
|
||||
set(VCPKG_BUILD_TYPE release)
|
||||
endif()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "vcpkg-boost",
|
||||
"version-date": "2024-04-25",
|
||||
"version-date": "2024-05-15",
|
||||
"license": "MIT"
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ $semverVersion = ($version -replace "(\d+(\.\d+){1,3}).*", "`$1")
|
|||
$defaultPortVersion = 1
|
||||
$portVersions = @{
|
||||
'boost-container' = 1;
|
||||
'boost-math' = 2;
|
||||
}
|
||||
|
||||
function Get-PortVersion {
|
||||
|
@ -108,6 +109,13 @@ $portData = @{
|
|||
}
|
||||
};
|
||||
"boost-log" = @{ "supports" = "!uwp & !emscripten" };
|
||||
"boost-math" = @{
|
||||
"features" = @{
|
||||
"legacy" = @{
|
||||
"description" = "Build the legacy C99 and TR1 libraries";
|
||||
}
|
||||
}
|
||||
};
|
||||
"boost-mpi" = @{
|
||||
"dependencies" = @("mpi");
|
||||
"supports" = "!uwp";
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "17529fd4b800ef3453f99cf2607e64fea59f6481",
|
||||
"version-semver": "1.2.5",
|
||||
"port-version": 3
|
||||
},
|
||||
{
|
||||
"git-tree": "0a1f8b9271d163893c7bcb8f7097e38be9888519",
|
||||
"version-semver": "1.2.5",
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "ac6833c403ae80c2a96e0a04795df91b1197999c",
|
||||
"version": "1.85.0",
|
||||
"port-version": 2
|
||||
},
|
||||
{
|
||||
"git-tree": "073abacf431a555a65b186e63482d3ff47b0e615",
|
||||
"version": "1.85.0",
|
||||
|
|
|
@ -350,7 +350,7 @@
|
|||
},
|
||||
"autodock-vina": {
|
||||
"baseline": "1.2.5",
|
||||
"port-version": 2
|
||||
"port-version": 3
|
||||
},
|
||||
"avcpp": {
|
||||
"baseline": "2.4.0",
|
||||
|
@ -1022,7 +1022,7 @@
|
|||
},
|
||||
"boost-math": {
|
||||
"baseline": "1.85.0",
|
||||
"port-version": 1
|
||||
"port-version": 2
|
||||
},
|
||||
"boost-metaparse": {
|
||||
"baseline": "1.85.0",
|
||||
|
@ -1526,7 +1526,7 @@
|
|||
},
|
||||
"cctag": {
|
||||
"baseline": "1.0.2",
|
||||
"port-version": 6
|
||||
"port-version": 7
|
||||
},
|
||||
"cctz": {
|
||||
"baseline": "2.4",
|
||||
|
@ -9061,7 +9061,7 @@
|
|||
"port-version": 0
|
||||
},
|
||||
"vcpkg-boost": {
|
||||
"baseline": "2024-04-25",
|
||||
"baseline": "2024-05-15",
|
||||
"port-version": 0
|
||||
},
|
||||
"vcpkg-cmake": {
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "bc6878b6e5119f0b4b5f90b4b09e02bd50c9b213",
|
||||
"version-semver": "1.0.2",
|
||||
"port-version": 7
|
||||
},
|
||||
{
|
||||
"git-tree": "56e88632d9e1fd1d826e9486e66533cb8baddef8",
|
||||
"version-semver": "1.0.2",
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "aca8ab6ec76d120c4482a629de23cad5ad7e4643",
|
||||
"version-date": "2024-05-15",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "885223b657578128c0556fe6b53cfec8cbf50e12",
|
||||
"version-date": "2024-04-25",
|
||||
|
|
Loading…
Reference in a new issue