vcpkg/ports/hpx/fix-cmakecache-paths.patch
Hartmut Kaiser af2287382b
[HPX] Don't remove HPXCacheVariables.cmake during install (#23042)
* Don't remove HPXCacheVariables.cmake during install

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

* Fixing versions
2022-03-11 15:19:27 -08:00

23 lines
699 B
Diff

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()