From b6b0e292098c0a2e0fe19b2a739fd157fe00e2b3 Mon Sep 17 00:00:00 2001 From: Billy O'Neal Date: Mon, 29 Nov 2021 08:40:37 -0800 Subject: [PATCH] [vcpkg baseline][hpx] Provide the correct dependencies when hpx chooses to use tcmalloc (#21673) * [hpx] Always use the system malloc. * Use tcmalloc rather than the system malloc when targeting Linux as requested by the hpx maintainers. --- ports/hpx/portfile.cmake | 10 ++++++++++ ports/hpx/vcpkg.json | 6 +++++- versions/baseline.json | 2 +- versions/h-/hpx.json | 5 +++++ 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/ports/hpx/portfile.cmake b/ports/hpx/portfile.cmake index 3c3fd2762a..9129eb75b5 100644 --- a/ports/hpx/portfile.cmake +++ b/ports/hpx/portfile.cmake @@ -9,6 +9,15 @@ vcpkg_from_github( HEAD_REF stable ) +set(HPX_WITH_MALLOC system) +if(VCPKG_TARGET_IS_LINUX) + # This is done at the request of the hpx maintainers; see + # https://github.com/microsoft/vcpkg/pull/21673#issuecomment-979904882 + # It must match when gperftools is treated as a dependency of this port. + set(HPX_WITH_MALLOC tcmalloc) +endif() + + vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS @@ -17,6 +26,7 @@ vcpkg_cmake_configure( -DHPX_WITH_EXAMPLES=OFF -DHPX_WITH_TOOLS=OFF -DHPX_WITH_RUNTIME=OFF + "-DHPX_WITH_MALLOC=${HPX_WITH_MALLOC}" ) vcpkg_cmake_install() diff --git a/ports/hpx/vcpkg.json b/ports/hpx/vcpkg.json index 76fdb78723..d13a24068a 100644 --- a/ports/hpx/vcpkg.json +++ b/ports/hpx/vcpkg.json @@ -1,7 +1,7 @@ { "name": "hpx", "version-semver": "1.7.1", - "port-version": 1, + "port-version": 2, "description": [ "The C++ Standards Library for Concurrency and Parallelism", "HPX is a C++ Standards Library for Concurrency and Parallelism. It implements all of the corresponding facilities as defined by the C++ Standard. Additionally, in HPX we implement functionalities proposed as part of the ongoing C++ standardization process. We also extend the C++ Standard APIs to the distributed case." @@ -23,6 +23,10 @@ "boost-throw-exception", "boost-variant", "boost-winapi", + { + "name": "gperftools", + "platform": "linux" + }, "hwloc", { "name": "vcpkg-cmake", diff --git a/versions/baseline.json b/versions/baseline.json index 24b60f6482..9362af152e 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2698,7 +2698,7 @@ }, "hpx": { "baseline": "1.7.1", - "port-version": 1 + "port-version": 2 }, "http-parser": { "baseline": "2.9.4", diff --git a/versions/h-/hpx.json b/versions/h-/hpx.json index e35502add1..c0dbe0ab72 100644 --- a/versions/h-/hpx.json +++ b/versions/h-/hpx.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "e3376f2a4ca78e32a29511450453e154cdb08a2a", + "version-semver": "1.7.1", + "port-version": 2 + }, { "git-tree": "739c83940b3bc753e7b1ada7192dd0c36970c9f5", "version-semver": "1.7.1",