summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMosè Giordano <giordano@users.noreply.github.com>2023-01-12 18:22:56 +0000
committerGitHub <noreply@github.com>2023-01-12 10:22:56 -0800
commit57e9e77475da0e030e66feefe1b37fa96e5952cc (patch)
tree7e4987e1e5d11353180d520279e249df709d76ec
parentd260fa59c9dc2ef8ac0e67004615a514b1556fad (diff)
downloadspack-57e9e77475da0e030e66feefe1b37fa96e5952cc.tar.gz
spack-57e9e77475da0e030e66feefe1b37fa96e5952cc.tar.bz2
spack-57e9e77475da0e030e66feefe1b37fa96e5952cc.tar.xz
spack-57e9e77475da0e030e66feefe1b37fa96e5952cc.zip
gmp: Add `cxx` variant, and require it in `libint` package (#34881)
-rw-r--r--var/spack/repos/builtin/packages/gmp/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libint/package.py2
2 files changed, 3 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/gmp/package.py b/var/spack/repos/builtin/packages/gmp/package.py
index 9ef7cc76ae..e46f03c87a 100644
--- a/var/spack/repos/builtin/packages/gmp/package.py
+++ b/var/spack/repos/builtin/packages/gmp/package.py
@@ -35,6 +35,7 @@ class Gmp(AutotoolsPackage, GNUMirrorPackage):
multi=True,
description="Build shared libs, static libs or both",
)
+ variant("cxx", default=True, description="Enable C++ support")
# gmp's configure script seems to be broken; it sometimes misdetects
# shared library support. Regenerating it fixes the issue.
@@ -51,7 +52,7 @@ class Gmp(AutotoolsPackage, GNUMirrorPackage):
return (flags, None, None)
def configure_args(self):
- args = ["--enable-cxx"]
+ args = self.enable_or_disable("cxx")
args += self.enable_or_disable("libs")
if "libs=static" in self.spec:
args.append("--with-pic")
diff --git a/var/spack/repos/builtin/packages/libint/package.py b/var/spack/repos/builtin/packages/libint/package.py
index 85c875f7bc..1b0494f906 100644
--- a/var/spack/repos/builtin/packages/libint/package.py
+++ b/var/spack/repos/builtin/packages/libint/package.py
@@ -66,7 +66,7 @@ class Libint(AutotoolsPackage):
# Libint 2 dependencies
# Fixme: Can maintainers please confirm that this is a required dependency
depends_on(Boost.with_default_variants, when="@2:")
- depends_on("gmp", when="@2:")
+ depends_on("gmp+cxx", when="@2:")
for tvariant in TUNE_VARIANTS[1:]:
conflicts(