From 7ef729383ab801504035a4445b6dbca18c8865c8 Mon Sep 17 00:00:00 2001 From: MonicaLiu <110024546+MonicaLiu0311@users.noreply.github.com> Date: Tue, 19 Mar 2024 13:12:52 -0700 Subject: [PATCH] [boost-modular-build-helper] Do not force initialize B2_OPTIONS (#37414) --- ports/boost-modular-build-helper/CMakeLists.txt | 9 ++++++++- ports/boost-modular-build-helper/vcpkg.json | 2 +- scripts/boost/generate-ports.ps1 | 2 +- versions/b-/boost-modular-build-helper.json | 5 +++++ versions/baseline.json | 2 +- 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/ports/boost-modular-build-helper/CMakeLists.txt b/ports/boost-modular-build-helper/CMakeLists.txt index 272051b82b8191..aaa168aaae9b5c 100644 --- a/ports/boost-modular-build-helper/CMakeLists.txt +++ b/ports/boost-modular-build-helper/CMakeLists.txt @@ -9,7 +9,11 @@ set(USER_CONFIG_TOOLSET_OPTIONS "") set(USER_CONFIG_EXTRA_LINES "") set(USER_CONFIG_REQUIREMENTS "") -set(B2_OPTIONS "") +# Avoid forcing initialization of B2_OPTIONS here to allow some users to add custom configuration options to this command via VCPKG_CHAINLOAD_TOOLCHAIN_FILE. +if(NOT DEFINED B2_OPTIONS) + set(B2_OPTIONS "") +endif() + include("${VCPKG_CMAKE_VARS_FILE}") @@ -247,6 +251,9 @@ if(NOT python_versions STREQUAL "") endif() endif() +# Remove duplicates from B2_OPTIONS since VCPKG_CHAINLOAD_TOOLCHAIN_FILE may be loaded multiple times in some cases. +list(REMOVE_DUPLICATES B2_OPTIONS) + if("${PORT}" STREQUAL "boost-mpi" OR "${PORT}" STREQUAL "boost-graph-parallel") string(APPEND USER_CONFIG_EXTRA_LINES "using mpi : : \"${CURRENT_INSTALLED_DIR}/lib\"\n" diff --git a/ports/boost-modular-build-helper/vcpkg.json b/ports/boost-modular-build-helper/vcpkg.json index 216989d9492eda..e6a0b676a3590b 100644 --- a/ports/boost-modular-build-helper/vcpkg.json +++ b/ports/boost-modular-build-helper/vcpkg.json @@ -2,7 +2,7 @@ "$comment": "Automatically generated by scripts/boost/generate-ports.ps1", "name": "boost-modular-build-helper", "version": "1.84.0", - "port-version": 2, + "port-version": 3, "description": "Internal vcpkg port used to build Boost libraries", "license": "MIT", "dependencies": [ diff --git a/scripts/boost/generate-ports.ps1 b/scripts/boost/generate-ports.ps1 index bd8e449afe7d4c..3db38054554dcd 100644 --- a/scripts/boost/generate-ports.ps1 +++ b/scripts/boost/generate-ports.ps1 @@ -27,7 +27,7 @@ $semverVersion = ($version -replace "(\d+(\.\d+){1,3}).*", "`$1") # Clear this array when moving to a new boost version $defaultPortVersion = 0 $portVersions = @{ - 'boost-modular-build-helper' = 2; + 'boost-modular-build-helper' = 3; } function Get-PortVersion { diff --git a/versions/b-/boost-modular-build-helper.json b/versions/b-/boost-modular-build-helper.json index f1eddf016e1884..c86c0fed877c97 100644 --- a/versions/b-/boost-modular-build-helper.json +++ b/versions/b-/boost-modular-build-helper.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "04390ecd44200648eb89147cb4e11b196d2dc515", + "version": "1.84.0", + "port-version": 3 + }, { "git-tree": "b3eb3e3fdc08ffe6e8f9e19e761e583790aaf308", "version": "1.84.0", diff --git a/versions/baseline.json b/versions/baseline.json index d43e24c4668fbe..19627c7fd41f18 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1010,7 +1010,7 @@ }, "boost-modular-build-helper": { "baseline": "1.84.0", - "port-version": 2 + "port-version": 3 }, "boost-move": { "baseline": "1.84.0",