summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com>2023-06-19 22:37:37 +0200
committerGitHub <noreply@github.com>2023-06-19 16:37:37 -0400
commita7e307bd815d0160200fe7647e199c2fc13ca27a (patch)
treebdcd9697ba5ccf77809b15b116a776bd0635b097
parent55152781cb5841384e279c7a03472f68b59b1a61 (diff)
downloadspack-a7e307bd815d0160200fe7647e199c2fc13ca27a.tar.gz
spack-a7e307bd815d0160200fe7647e199c2fc13ca27a.tar.bz2
spack-a7e307bd815d0160200fe7647e199c2fc13ca27a.tar.xz
spack-a7e307bd815d0160200fe7647e199c2fc13ca27a.zip
gsl: set GSL_ROOT_DIR (#38464)
Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com> Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
-rw-r--r--var/spack/repos/builtin/packages/gsl/package.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/gsl/package.py b/var/spack/repos/builtin/packages/gsl/package.py
index 21d7bd6371..dd5bad19cd 100644
--- a/var/spack/repos/builtin/packages/gsl/package.py
+++ b/var/spack/repos/builtin/packages/gsl/package.py
@@ -55,3 +55,8 @@ class Gsl(AutotoolsPackage, GNUMirrorPackage):
configure_args.append("CBLAS_LIBS=%s" % self.spec["blas"].libs.ld_flags)
return configure_args
+
+ def setup_run_environment(self, env):
+ # cmake looks for GSL_ROOT_DIR to find GSL so this helps pick the spack one
+ # when there are multiple installations (e.g. a system one and a spack one)
+ env.set("GSL_ROOT_DIR", self.prefix)