Skip to content

Commit

Permalink
[HPX] Don't remove HPXCacheVariables.cmake during install (#23042)
Browse files Browse the repository at this point in the history
* Don't remove HPXCacheVariables.cmake during install

- make sure HPXCMakeVariables.cmake does not contain any directory names

* Fixing versions
  • Loading branch information
hkaiser committed Mar 11, 2022
1 parent 43235cf commit af22873
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 4 deletions.
22 changes: 22 additions & 0 deletions ports/hpx/fix-cmakecache-paths.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/cmake/HPX_ForwardCacheVariables.cmake b/cmake/HPX_ForwardCacheVariables.cmake
index 7c434085a76..34cc47c7750 100644
--- a/cmake/HPX_ForwardCacheVariables.cmake
+++ b/cmake/HPX_ForwardCacheVariables.cmake
@@ -23,6 +23,17 @@ set(_cache_var_file_template
)
set(_cache_variables)
foreach(_var IN LISTS cache_vars)
+ if(HPX_WITH_VCPKG)
+ # avoid writing directory names into cache file
+ string(FIND ${_var} "_DIR" _pos)
+ if(NOT ${_pos} EQUAL -1)
+ continue()
+ endif()
+ string(FIND ${_var} "_PATH" _pos)
+ if(NOT ${_pos} EQUAL -1)
+ continue()
+ endif()
+ endif()
set(_cache_variables "${_cache_variables}set(${_var} ${${_var}})\n")
endforeach()

5 changes: 3 additions & 2 deletions ports/hpx/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ vcpkg_from_github(
REF 1.7.1
SHA512 6bdb294da393a198abf81d5f63799a066334755eed0fda40bbfc4e9a774b6e19a3e5ad7ab45c989d31f3797e7b547bb552c29f51b552d9a79d166f86aee375a3
HEAD_REF stable
PATCHES fix-dependency-hwloc.patch
PATCHES
fix-dependency-hwloc.patch
fix-cmakecache-paths.patch
)

set(HPX_WITH_MALLOC system)
Expand Down Expand Up @@ -93,6 +95,5 @@ vcpkg_fixup_pkgconfig()

vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/bin/hpxcxx" "\"${CURRENT_PACKAGES_DIR}\"" "os.path.dirname(os.path.dirname(os.path.realpath(__file__)))")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/bin/hpxcxx" "\"${CURRENT_PACKAGES_DIR}/debug\"" "os.path.dirname(os.path.dirname(os.path.realpath(__file__)))")
file(REMOVE "${CURRENT_PACKAGES_DIR}/share/hpx/HPXCacheVariables.cmake")

vcpkg_copy_pdbs()
2 changes: 1 addition & 1 deletion ports/hpx/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "hpx",
"version-semver": "1.7.1",
"port-version": 4,
"port-version": 5,
"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."
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2738,7 +2738,7 @@
},
"hpx": {
"baseline": "1.7.1",
"port-version": 4
"port-version": 5
},
"http-parser": {
"baseline": "2.9.4",
Expand Down
5 changes: 5 additions & 0 deletions versions/h-/hpx.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "48d153f2932b01257af5a799676268abdfb35fac",
"version-semver": "1.7.1",
"port-version": 5
},
{
"git-tree": "815641d6119376c546119a841f6c035e8f27b8da",
"version-semver": "1.7.1",
Expand Down

0 comments on commit af22873

Please sign in to comment.