From 14ef8e2fd2b99fc591bd1f29300c64d9fc14d84d Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Sat, 17 Feb 2018 12:54:43 +0100 Subject: [PATCH] Fix building boost.mpi (#2684) * Fix building boost.mpi * [boost-*] Remove boost-mpi dependencies to avoid direct dependency on msmpi. * [boost-build] Bump version with mpi changes --- ports/boost-build/CONTROL | 2 +- ports/boost-build/Jamroot.jam | 9 +++++++++ ports/boost-build/user-config.jam | 8 ++++++++ ports/boost-graph-parallel/CONTROL | 2 +- ports/boost-mpi/CONTROL | 4 ++-- ports/boost-odeint/CONTROL | 2 +- ports/boost-vcpkg-helpers/generate-ports.ps1 | 15 ++++++++++++--- ports/boost/CONTROL | 6 +++++- 8 files changed, 39 insertions(+), 9 deletions(-) diff --git a/ports/boost-build/CONTROL b/ports/boost-build/CONTROL index f74f24f5c..cf93bfa1e 100644 --- a/ports/boost-build/CONTROL +++ b/ports/boost-build/CONTROL @@ -1,3 +1,3 @@ Source: boost-build -Version: 1.66.0-4 +Version: 1.66.0-5 Description: Boost.Build diff --git a/ports/boost-build/Jamroot.jam b/ports/boost-build/Jamroot.jam index 84f82126d..6669b446e 100644 --- a/ports/boost-build/Jamroot.jam +++ b/ports/boost-build/Jamroot.jam @@ -125,6 +125,15 @@ if "@PORT@" != "boost-test" explicit boost_unit_test_framework ; } +if "@PORT@" != "boost-serialization" +{ + use-project /boost/serialization : . ; + + lib boost_serialization : : @CURRENT_INSTALLED_DIR@/lib/boost_serialization-vc140-mt.lib release ; + lib boost_serialization : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_serialization-vc140-mt-gd.lib debug ; + explicit boost_serialization ; +} + rule requires ( foo * ) { } diff --git a/ports/boost-build/user-config.jam b/ports/boost-build/user-config.jam index ab86c0c43..59cc160cc 100644 --- a/ports/boost-build/user-config.jam +++ b/ports/boost-build/user-config.jam @@ -11,6 +11,14 @@ if "@PORT@" = "boost-python" using python : @PYTHON_VERSION@ : : "@PYTHON_INCLUDE_PATH@" : "@PYTHONLIBS_DEBUG@" : on ; } +if "@PORT@" = "boost-mpi" +{ + using mpi : : + @CURRENT_INSTALLED_DIR@/lib + @CURRENT_INSTALLED_DIR@/include + msmpi ; +} + project user-config : ; lib advapi32 ; diff --git a/ports/boost-graph-parallel/CONTROL b/ports/boost-graph-parallel/CONTROL index f3a7a6744..ba7cf38d2 100644 --- a/ports/boost-graph-parallel/CONTROL +++ b/ports/boost-graph-parallel/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-graph-parallel Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-compatibility, boost-config, boost-detail, boost-dynamic-bitset, boost-function, boost-functional, boost-graph, boost-iterator, boost-lexical-cast, boost-math, boost-mpi, boost-mpl, boost-optional, boost-property-map, boost-random, boost-serialization, boost-smart-ptr, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-variant, boost-vcpkg-helpers +Build-Depends: boost-assert, boost-build, boost-compatibility, boost-config, boost-detail, boost-dynamic-bitset, boost-function, boost-functional, boost-graph, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-property-map, boost-random, boost-serialization, boost-smart-ptr, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-variant, boost-vcpkg-helpers Description: Boost graph_parallel module diff --git a/ports/boost-mpi/CONTROL b/ports/boost-mpi/CONTROL index 807729530..7d17fedec 100644 --- a/ports/boost-mpi/CONTROL +++ b/ports/boost-mpi/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-mpi -Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-function, boost-graph, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-property-map, boost-python (windows), boost-serialization, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Version: 1.66.0-1 +Build-Depends: boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-function, boost-graph, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-property-map, boost-python (windows), boost-serialization, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, msmpi Description: Boost mpi module diff --git a/ports/boost-odeint/CONTROL b/ports/boost-odeint/CONTROL index abe138aec..4ab8a7814 100644 --- a/ports/boost-odeint/CONTROL +++ b/ports/boost-odeint/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-odeint Version: 1.66.0 -Build-Depends: boost-array, boost-assert, boost-bind, boost-compute, boost-config, boost-core, boost-function, boost-fusion, boost-iterator, boost-math, boost-mpi, boost-mpl, boost-multi-array, boost-preprocessor, boost-range, boost-static-assert, boost-throw-exception, boost-type-traits, boost-units, boost-utility, boost-vcpkg-helpers +Build-Depends: boost-array, boost-assert, boost-bind, boost-compute, boost-config, boost-core, boost-function, boost-fusion, boost-iterator, boost-math, boost-mpl, boost-multi-array, boost-preprocessor, boost-range, boost-static-assert, boost-throw-exception, boost-type-traits, boost-units, boost-utility, boost-vcpkg-helpers Description: Boost odeint module diff --git a/ports/boost-vcpkg-helpers/generate-ports.ps1 b/ports/boost-vcpkg-helpers/generate-ports.ps1 index c410cd6a0..8b79826e2 100644 --- a/ports/boost-vcpkg-helpers/generate-ports.ps1 +++ b/ports/boost-vcpkg-helpers/generate-ports.ps1 @@ -22,7 +22,7 @@ function Generate() $sanitizedName = $name -replace "_","-" $versionsuffix = "" - if ($Name -eq "python" -or $Name -eq "asio") + if ($Name -eq "python" -or $Name -eq "asio" -or $Name -eq "mpi") { $versionsuffix = "-1" } @@ -301,7 +301,7 @@ foreach ($library in $libraries) -and ` (($library -notmatch "detail") -or ($_ -notmatch "static_assert|integer|mpl|type_traits"))` -and ` - (($library -notmatch "property_map") -or ($_ -notmatch "mpi"))` + ($_ -notmatch "mpi")` -and ` (($library -notmatch "spirit") -or ($_ -notmatch "serialization"))` -and ` @@ -339,6 +339,10 @@ foreach ($library in $libraries) { $deps += @("openssl") } + elseif ($library -eq "mpi") + { + $deps += @("msmpi") + } Generate ` -Name $library ` @@ -363,7 +367,8 @@ foreach ($library in $libraries) } # Generate master boost control file which depends on each individual library -$boostDependsList = @($libraries_in_boost_port | % { "boost-$_" -replace "_","-" }) -join ", " +# mpi is excluded due to it having a dependency on msmpi +$boostDependsList = @($libraries_in_boost_port | % { "boost-$_" -replace "_","-" } | ? { $_ -notmatch "boost-mpi" }) -join ", " @( "# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1" @@ -371,6 +376,10 @@ $boostDependsList = @($libraries_in_boost_port | % { "boost-$_" -replace "_","-" "Version: $version" "Description: Peer-reviewed portable C++ source libraries" "Build-Depends: $boostDependsList" + "" + "Feature: mpi" + "Description: Build with MPI support" + "Build-Depends: boost-mpi" ) | out-file -enc ascii $scriptsDir/../boost/CONTROL "set(VCPKG_POLICY_EMPTY_PACKAGE enabled)`n" | out-file -enc ascii $scriptsDir/../boost/portfile.cmake diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index e9ed7c84b..0153a151a 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -2,4 +2,8 @@ Source: boost Version: 1.66.0 Description: Peer-reviewed portable C++ source libraries -Build-Depends: boost-accumulators, boost-algorithm, boost-align, boost-any, boost-array, boost-asio, boost-assert, boost-assign, boost-atomic, boost-beast, boost-bimap, boost-bind, boost-callable-traits, boost-chrono, boost-circular-buffer, boost-compatibility, boost-compute, boost-concept-check, boost-config, boost-container, boost-context (windows), boost-conversion, boost-convert, boost-core, boost-coroutine (windows), boost-coroutine2, boost-crc, boost-date-time, boost-detail, boost-disjoint-sets, boost-dll, boost-dynamic-bitset, boost-endian, boost-exception, boost-fiber (windows), boost-filesystem (windows), boost-flyweight, boost-foreach, boost-format, boost-function, boost-functional, boost-function-types, boost-fusion, boost-geometry, boost-gil, boost-graph, boost-graph-parallel, boost-hana, boost-heap, boost-icl, boost-integer, boost-interprocess, boost-intrusive, boost-io, boost-iostreams (windows), boost-iterator, boost-lambda, boost-lexical-cast, boost-locale (windows), boost-local-function, boost-lockfree, boost-log (windows), boost-logic (windows), boost-math, boost-metaparse, boost-move, boost-mp11, boost-mpi, boost-mpl, boost-msm, boost-multiprecision, boost-multi-array, boost-multi-index, boost-numeric-conversion, boost-interval, boost-odeint, boost-ublas, boost-optional, boost-parameter, boost-phoenix, boost-polygon, boost-poly-collection, boost-pool, boost-predef, boost-preprocessor, boost-process, boost-program-options (windows), boost-property-map, boost-property-tree, boost-proto, boost-ptr-container, boost-python (windows), boost-qvm, boost-random, boost-range, boost-ratio, boost-rational, boost-regex, boost-scope-exit, boost-serialization, boost-signals, boost-signals2, boost-smart-ptr, boost-sort, boost-spirit, boost-stacktrace (windows), boost-statechart, boost-static-assert, boost-system, boost-test (windows), boost-thread (windows), boost-throw-exception, boost-timer, boost-tokenizer, boost-tti, boost-tuple, boost-typeof, boost-type-erasure (windows), boost-type-index, boost-type-traits, boost-units, boost-unordered, boost-utility, boost-uuid, boost-variant, boost-vmd, boost-wave (windows), boost-winapi, boost-xpressive +Build-Depends: boost-accumulators, boost-algorithm, boost-align, boost-any, boost-array, boost-asio, boost-assert, boost-assign, boost-atomic, boost-beast, boost-bimap, boost-bind, boost-callable-traits, boost-chrono, boost-circular-buffer, boost-compatibility, boost-compute, boost-concept-check, boost-config, boost-container, boost-context (windows), boost-conversion, boost-convert, boost-core, boost-coroutine (windows), boost-coroutine2, boost-crc, boost-date-time, boost-detail, boost-disjoint-sets, boost-dll, boost-dynamic-bitset, boost-endian, boost-exception, boost-fiber (windows), boost-filesystem (windows), boost-flyweight, boost-foreach, boost-format, boost-function, boost-functional, boost-function-types, boost-fusion, boost-geometry, boost-gil, boost-graph, boost-graph-parallel, boost-hana, boost-heap, boost-icl, boost-integer, boost-interprocess, boost-intrusive, boost-io, boost-iostreams (windows), boost-iterator, boost-lambda, boost-lexical-cast, boost-locale (windows), boost-local-function, boost-lockfree, boost-log (windows), boost-logic (windows), boost-math, boost-metaparse, boost-move, boost-mp11, boost-mpl, boost-msm, boost-multiprecision, boost-multi-array, boost-multi-index, boost-numeric-conversion, boost-interval, boost-odeint, boost-ublas, boost-optional, boost-parameter, boost-phoenix, boost-polygon, boost-poly-collection, boost-pool, boost-predef, boost-preprocessor, boost-process, boost-program-options (windows), boost-property-map, boost-property-tree, boost-proto, boost-ptr-container, boost-python (windows), boost-qvm, boost-random, boost-range, boost-ratio, boost-rational, boost-regex, boost-scope-exit, boost-serialization, boost-signals, boost-signals2, boost-smart-ptr, boost-sort, boost-spirit, boost-stacktrace (windows), boost-statechart, boost-static-assert, boost-system, boost-test (windows), boost-thread (windows), boost-throw-exception, boost-timer, boost-tokenizer, boost-tti, boost-tuple, boost-typeof, boost-type-erasure (windows), boost-type-index, boost-type-traits, boost-units, boost-unordered, boost-utility, boost-uuid, boost-variant, boost-vmd, boost-wave (windows), boost-winapi, boost-xpressive + +Feature: mpi +Description: Build with MPI support +Build-Depends: boost-mpi