n2p2: Allow building shared libraries (#35080)
This commit is contained in:
parent
beba33b2d8
commit
aca4be1fff
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user