summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAlex Richert <alexander.richert@noaa.gov>2024-04-04 02:47:46 -0700
committerGitHub <noreply@github.com>2024-04-04 03:47:46 -0600
commit2b3e7fd10a75adb73eeb8465af265da9ffddcfc7 (patch)
treea5b8018e775133df8938dd8e05c02c5c04ac895d /var
parentcb315e18f04b1e087500f1fcea8cde13b3a6e783 (diff)
downloadspack-2b3e7fd10a75adb73eeb8465af265da9ffddcfc7.tar.gz
spack-2b3e7fd10a75adb73eeb8465af265da9ffddcfc7.tar.bz2
spack-2b3e7fd10a75adb73eeb8465af265da9ffddcfc7.tar.xz
spack-2b3e7fd10a75adb73eeb8465af265da9ffddcfc7.zip
Add shared variant for fftw to allow static-only builds (#37897)
Co-authored-by: alexrichert <alexrichert@gmail.com>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/fftw/package.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/fftw/package.py b/var/spack/repos/builtin/packages/fftw/package.py
index 7a4ac28eb7..fa606cf3ce 100644
--- a/var/spack/repos/builtin/packages/fftw/package.py
+++ b/var/spack/repos/builtin/packages/fftw/package.py
@@ -25,6 +25,7 @@ class FftwBase(AutotoolsPackage):
)
variant("openmp", default=False, description="Enable OpenMP support.")
variant("mpi", default=True, description="Activate MPI support")
+ variant("shared", default=True, description="Build shared libraries")
depends_on("mpi", when="+mpi")
depends_on("llvm-openmp", when="%apple-clang +openmp")
@@ -104,7 +105,9 @@ class FftwBase(AutotoolsPackage):
def configure(self, spec, prefix):
# Base options
- options = ["--prefix={0}".format(prefix), "--enable-shared", "--enable-threads"]
+ options = ["--prefix={0}".format(prefix), "--enable-threads"]
+ options.extend(self.enable_or_disable("shared"))
+
if not self.compiler.f77 or not self.compiler.fc:
options.append("--disable-fortran")
if spec.satisfies("@:2"):