summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Simberg <mikael.simberg@iki.fi>2024-09-26 09:33:27 +0200
committerGitHub <noreply@github.com>2024-09-26 01:33:27 -0600
commitbadb3bcee7e07683bee952d775cf0e7c756fb2cd (patch)
tree47f3384b87f981efba7bb34eea5ae47bb1cdef28
parent4b05a2b78f6934b114c9bdea90aa1521e69e1883 (diff)
downloadspack-badb3bcee7e07683bee952d775cf0e7c756fb2cd.tar.gz
spack-badb3bcee7e07683bee952d775cf0e7c756fb2cd.tar.bz2
spack-badb3bcee7e07683bee952d775cf0e7c756fb2cd.tar.xz
spack-badb3bcee7e07683bee952d775cf0e7c756fb2cd.zip
dla-future: Adapt lapack/scalapack CMake variables for master branch and next version (#46570)
* dla-future: Add DLAF_ prefix to LAPACK_LIBRARY CMake variable in newer versions * dla-future: Use spec.satisfies to check version constraint for LAPACK_LIBRARY variable prefix Co-authored-by: Alberto Invernizzi <9337627+albestro@users.noreply.github.com> --------- Co-authored-by: Alberto Invernizzi <9337627+albestro@users.noreply.github.com>
-rw-r--r--var/spack/repos/builtin/packages/dla-future/package.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/dla-future/package.py b/var/spack/repos/builtin/packages/dla-future/package.py
index 078779411e..c831dd1f67 100644
--- a/var/spack/repos/builtin/packages/dla-future/package.py
+++ b/var/spack/repos/builtin/packages/dla-future/package.py
@@ -223,14 +223,19 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage):
)
else:
args.append(self.define("DLAF_WITH_MKL", spec["lapack"].name in INTEL_MATH_LIBRARIES))
+ add_dlaf_prefix = lambda x: x if spec.satisfies("@:0.6") else "DLAF_" + x
args.append(
self.define(
- "LAPACK_LIBRARY",
+ add_dlaf_prefix("LAPACK_LIBRARY"),
" ".join([spec[dep].libs.ld_flags for dep in ["blas", "lapack"]]),
)
)
if spec.satisfies("+scalapack"):
- args.append(self.define("SCALAPACK_LIBRARY", spec["scalapack"].libs.ld_flags))
+ args.append(
+ self.define(
+ add_dlaf_prefix("SCALAPACK_LIBRARY"), spec["scalapack"].libs.ld_flags
+ )
+ )
args.append(self.define_from_variant("DLAF_WITH_SCALAPACK", "scalapack"))