diff options
author | RĂ©mi Lacroix <remi.lacroix@idris.fr> | 2023-01-23 22:46:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-23 13:46:19 -0800 |
commit | aca4be1fff3c8b21cd328932f6cae3449d974858 (patch) | |
tree | 14334c082aedfa6a9df412a8e0b607737e89b046 /var | |
parent | beba33b2d8276272443b0b1b33a4f5ec157541bf (diff) | |
download | spack-aca4be1fff3c8b21cd328932f6cae3449d974858.tar.gz spack-aca4be1fff3c8b21cd328932f6cae3449d974858.tar.bz2 spack-aca4be1fff3c8b21cd328932f6cae3449d974858.tar.xz spack-aca4be1fff3c8b21cd328932f6cae3449d974858.zip |
n2p2: Allow building shared libraries (#35080)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/n2p2/package.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/n2p2/package.py b/var/spack/repos/builtin/packages/n2p2/package.py index d9e482ea31..203ca3293a 100644 --- a/var/spack/repos/builtin/packages/n2p2/package.py +++ b/var/spack/repos/builtin/packages/n2p2/package.py @@ -29,6 +29,7 @@ class N2p2(MakefilePackage): ) variant("doc", default=False, description="build documentation with Doxygen") + variant("shared", default=False, description="build shared libraries") patch("interface-makefile.patch", when="@2.1.0") patch("interface-makefile211.patch", when="@2.1.1:") @@ -61,6 +62,9 @@ class N2p2(MakefilePackage): test_requires_compiler = True def edit(self, spec, prefix): + makefile = FileFilter(join_path("src", "makefile")) + makefile.filter("MODE=.*", "MODE={0}".format("shared" if "+shared" in spec else "static")) + makefile = FileFilter(join_path("src", "makefile.gnu")) blas_libs = self.spec["blas"].libs makefile.filter("PROJECT_CC=.*", "PROJECT_CC={0}".format(spack_cxx)) |