From 57e9e77475da0e030e66feefe1b37fa96e5952cc Mon Sep 17 00:00:00 2001 From: Mosè Giordano Date: Thu, 12 Jan 2023 18:22:56 +0000 Subject: gmp: Add `cxx` variant, and require it in `libint` package (#34881) --- var/spack/repos/builtin/packages/gmp/package.py | 3 ++- var/spack/repos/builtin/packages/libint/package.py | 2 +- 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( -- cgit v1.2.3-60-g2f50