-1

以下命令使用 VCPKG 构建 boost。

vcpkg install boost:x64-windows boost:x64-windows

这个命令构建了所有的 Boost. 具体来说,它构建了以下包: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-container-hash, boost -context (!uwp), boost-contract (!arm), boost-conversion, boost-convert, boost-core, boost-coroutine (!uwp), 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 (!uwp), boost-flyweight, boost-foreach,升压格式,升压功能,升压功能,升压功能类型,升压融合,升压几何,升压吉尔,升压图,

问题是这个命令没有在 ICU 支持下构建 Boost。

“vcpkg search”命令包含以下相关条目。

boost                1.71.0           Peer-reviewed portable C++ source libraries
boost-locale         1.71.0           Boost locale module
boost-locale[icu]                     ICU backend for Boost.Locale
boost-regex          1.71.0           Boost regex module
boost-regex[icu]                      ICU backend for Boost.Regex

以下不起作用,因为它会产生错误。

vcpkg install boost[icu]:x64-windows boost[icu]:x64-windows

以下构建具有 ICU 支持,但并未构建所有 Boost

vcpkg install boost-locale[icu]:x64-windows boost-locale[icu]:x64-windows boost-regex[icu]:x64-windows boost-regex[icu]:x64-windows

构建 boost-locale 构建以下组件:boost-locale、boost-assert、boost-build、boost-config、boost-function、boost-integer、boost-iterator、boost-modular-build-helper、boost-smart-ptr 、boost-static-assert、boost-system、boost-thread、boost-type-traits、boost-unordered 和 boost-vcpkg-helpers。

构建 boost-regex 构建以下组件:boost-regex、boost-assert、boost-build、boost-compatibility、boost-concept-check、boost-config、boost-container-hash、boost-core、boost-detail、boost -integer、boost-iterator、boost-modular-build-helper、boost-mpl、boost-predef、boost-smart-ptr、boost-static-assert、boost-throw-exception、boost-type-traits、boost-utility和 boost-vcpkg-helpers。

boost-locale 和 boost-regex 都省略了诸如 boost-accumulators 之类的组件。

首先安装 boost 然后安装 boost-locale 和 boost-regex 会导致某种你想要重建的消息。

应该只有一个命令来构建具有 ICU 支持的所有 Boost,而无需重建废话。

4

1 回答 1

1

事实证明,对于那些支持 ICU 功能的组件,可以在使用 ICU 的同时构建所有 Boost,如下所示。

./vcpkg install boost-locale[icu] boost-regex[icu] boost --triplet x64-windows --recurse

资料来源:如何在 ICU 支持下构建 boost 而无需构建 boost 的大多数组件两次?

于 2019-10-23T01:55:22.600 回答