Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hdf5] Fix single config builds. #27355

Merged
merged 4 commits into from
Oct 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 19 additions & 16 deletions ports/hdf5/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -102,37 +102,40 @@ string(REPLACE [[${HDF5_PACKAGE_NAME}_TOOLS_DIR "${PACKAGE_PREFIX_DIR}/bin"]]
)
file(WRITE "${CURRENT_PACKAGES_DIR}/share/hdf5/hdf5-config.cmake" ${contents})

set(HDF5_TOOLS "")
if("tools" IN_LIST FEATURES)
set(HDF5_TOOLS h5cc h5hlcc h5c++ h5hlc++ h5copy h5diff h5dump h5ls h5stat gif2h5 h52gif h5clear h5debug
h5format_convert h5jam h5unjam h5ls h5mkgrp h5repack h5repart h5watch ph5diff h5import
list(APPEND HDF5_TOOLS h5copy h5diff h5dump h5ls h5stat gif2h5 h52gif h5clear h5debug
h5format_convert h5jam h5unjam h5mkgrp h5repack h5repart h5watch h5import
)

if("parallel" IN_LIST FEATURES)
list(APPEND HDF5_TOOLS ph5diff)
endif()
Cheney-W marked this conversation as resolved.
Show resolved Hide resolved

Neumann-A marked this conversation as resolved.
Show resolved Hide resolved
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
list(TRANSFORM HDF5_TOOLS REPLACE "^(.+)$" "\\1-shared")
else()
endif()

foreach(HDF5_TOOL IN LISTS HDF5_TOOLS)
if (NOT EXISTS "${CURRENT_PACKAGES_DIR}/bin/${HDF5_TOOL}${VCPKG_TARGET_EXECUTABLE_SUFFIX}"
OR NOT EXISTS "${CURRENT_PACKAGES_DIR}/debug/bin/${HDF5_TOOL}${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
Comment on lines -116 to -117
Copy link
Contributor Author

@Neumann-A Neumann-A Oct 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this logic is/was a problem for release only builds since the second part will always be true.

list(REMOVE_ITEM HDF5_TOOLS "${HDF5_TOOL}")
endif()
endforeach()
if(NOT VCPKG_TARGET_IS_WINDOWS)
list(APPEND HDF5_TOOLS h5cc h5hlcc h5c++ h5hlc++)
endif()

if("parallel" IN_LIST FEATURES)
list(APPEND HDF5_TOOLS h5perf)
list(APPEND HDF5_TOOLS h5perf )
if(NOT VCPKG_TARGET_IS_WINDOWS)
list(APPEND HDF5_TOOLS h5pcc)
endif()
else()
list(APPEND HDF5_TOOLS h5perf_serial)
endif()

vcpkg_copy_tools(TOOL_NAMES ${HDF5_TOOLS} AUTO_CLEAN)
endif()

if ("utils" IN_LIST FEATURES)
vcpkg_copy_tools(
TOOL_NAMES mirror_server mirror_server_stop
AUTO_CLEAN
)
list(APPEND HDF5_TOOLS mirror_server mirror_server_stop)
endif()

if(HDF5_TOOLS)
vcpkg_copy_tools(TOOL_NAMES ${HDF5_TOOLS} AUTO_CLEAN)
endif()

if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
Expand Down
2 changes: 1 addition & 1 deletion ports/hdf5/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "hdf5",
"version": "1.12.2",
"port-version": 1,
"port-version": 2,
"description": "HDF5 is a data model, library, and file format for storing and managing data",
"homepage": "https://www.hdfgroup.org/downloads/hdf5/",
"license": "BSD-3-Clause",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2874,7 +2874,7 @@
},
"hdf5": {
"baseline": "1.12.2",
"port-version": 1
"port-version": 2
},
"healpix": {
"baseline": "1.12.10",
Expand Down
5 changes: 5 additions & 0 deletions versions/h-/hdf5.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "e780ea29b8b6a24227612b42673bc7f1d7a81766",
"version": "1.12.2",
"port-version": 2
},
{
"git-tree": "f6647d7591d9b5a588d92e0fb4266d2028132ff9",
"version": "1.12.2",
Expand Down