summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorJon Rood <jon.rood@nrel.gov>2024-06-10 10:11:49 -0600
committerGitHub <noreply@github.com>2024-06-10 10:11:49 -0600
commitd9c5d91b6f633f1379f98f94da447e376c969ef0 (patch)
tree8afac35a4a89fbf5080ca981dcb5e46bb34d60f7 /var
parent6e194c6ffe0cdc30edeb9f1558cf259cb1a85754 (diff)
downloadspack-d9c5d91b6f633f1379f98f94da447e376c969ef0.tar.gz
spack-d9c5d91b6f633f1379f98f94da447e376c969ef0.tar.bz2
spack-d9c5d91b6f633f1379f98f94da447e376c969ef0.tar.xz
spack-d9c5d91b6f633f1379f98f94da447e376c969ef0.zip
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>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/hdf5/package.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py
index e235f8300f..fd08a2d9be 100644
--- a/var/spack/repos/builtin/packages/hdf5/package.py
+++ b/var/spack/repos/builtin/packages/hdf5/package.py
@@ -621,6 +621,18 @@ class Hdf5(CMakePackage):
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):