Fixes for compiler wrappers and cmake config file dirs.#5361
Merged
lrknox merged 2 commits intoHDFGroup:developfrom Mar 12, 2025
Merged
Fixes for compiler wrappers and cmake config file dirs.#5361lrknox merged 2 commits intoHDFGroup:developfrom
lrknox merged 2 commits intoHDFGroup:developfrom
Conversation
added 2 commits
March 11, 2025 22:44
In h5cc and other compiler wrappers, drop hardcoded 'lib' as the dir for libhdf5.settings and pkgconfig scripts and use cmake computed values for HDF5_INSTALL_LIB_DIR. This fixes issues on systems where the libdir is 'lib64' for instance, as on 64-bit Linux OSes, and 'lib' in the wrappers point to incorrect locations of the settings and pkgconfig files.
When calling `h5cc -show FOO`, the output should not repeat the '-show' argument itself. This commit fixes the '-show' command invoked from a cmake built h5cc to be consistent with an (previously) autotools built one.
byrnHDF
reviewed
Mar 11, 2025
byrnHDF
requested changes
Mar 11, 2025
Contributor
There was a problem hiding this comment.
config/cmake/libh5cc.in looks good
The other file is not correct: see the 1.14 history file:
- Reworked corrected path searched by CMake find_package command
The install path for cmake find_package files had been changed to use
"share/cmake"
for all platforms. However setting the HDF5_ROOT variable failed to locate
the configuration files. The build variable HDF5_INSTALL_CMAKE_DIR is now
set to the <INSTALL_DIR>/cmake folder. The location of the configuration
files can still be specified by the "HDF5_DIR" variable.
(ADB - 2022/02/02)
byrnHDF
approved these changes
Mar 12, 2025
jhendersonHDF
approved these changes
Mar 12, 2025
mgorny
added a commit
to mgorny/hdf5
that referenced
this pull request
Apr 22, 2025
Replace the `${@:2}` construct that is specific to bash shell with
a more portable approach based on `shift`, in order to restore
compatibility with more strict POSIX shells. This fixes a regression
introduced in HDFGroup#5361.
This was referenced Apr 22, 2025
lrknox
pushed a commit
that referenced
this pull request
Apr 23, 2025
* h5cc: Fix bashism
Replace the `${@:2}` construct that is specific to bash shell with
a more portable approach based on `shift`, in order to restore
compatibility with more strict POSIX shells. This fixes a regression
introduced in #5361.
* h5cc: Fix passing arguments to compiler subprocesses
Pass arguments to subprocesses via quoted `"$@"` rather than plain `$@`,
in order to prevent the shell from applying word splitting, filename
expansion, etc., and therefore ensure that they are passed through
to the compiler process unchanged.
qkoziol
pushed a commit
to qkoziol/hdf5
that referenced
this pull request
Oct 11, 2025
* h5cc: Fix bashism
Replace the `${@:2}` construct that is specific to bash shell with
a more portable approach based on `shift`, in order to restore
compatibility with more strict POSIX shells. This fixes a regression
introduced in HDFGroup#5361.
* h5cc: Fix passing arguments to compiler subprocesses
Pass arguments to subprocesses via quoted `"$@"` rather than plain `$@`,
in order to prevent the shell from applying word splitting, filename
expansion, etc., and therefore ensure that they are passed through
to the compiler process unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5357.