hdf5: solve cmake findhdf5 issue with hl components (#44423)
* hdf5: solve cmake findhdf5 issue with hl components * Fix mistake. * Update var/spack/repos/builtin/packages/hdf5/package.py Co-authored-by: psakievich <psakiev@sandia.gov> * Style. * Style. --------- Co-authored-by: psakievich <psakiev@sandia.gov>
This commit is contained in:
parent
6e194c6ffe
commit
d9c5d91b6f
@ -621,6 +621,18 @@ def link_debug_libs(self):
|
||||
libname = os.path.split(lib)[1]
|
||||
os.symlink(libname, libname.replace("_debug", ""))
|
||||
|
||||
@run_after("install")
|
||||
def symlink_to_h5hl_wrappers(self):
|
||||
if self.spec.satisfies("+hl"):
|
||||
with working_dir(self.prefix.bin):
|
||||
# CMake's FindHDF5 relies only on h5cc so it doesn't find the HL
|
||||
# component unless it uses h5hlcc so we symlink h5cc to h5hlcc etc
|
||||
symlink_files = {"h5cc": "h5lcc", "h5c++": "h5lc++"}
|
||||
for old, new in symlink_files.items():
|
||||
if os.path.isfile(old):
|
||||
os.remove(old)
|
||||
symlink(new, old)
|
||||
|
||||
@property
|
||||
@llnl.util.lang.memoized
|
||||
def _output_version(self):
|
||||
|
Loading…
Reference in New Issue
Block a user