summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMark Grondona <mark.grondona@gmail.com>2017-10-23 04:32:51 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2017-10-23 13:32:51 +0200
commit328dc3d14029e576f38e920a4df116af89071dfe (patch)
treec28986deb963cefdf1ff47f521ab17132a9a8f25 /var
parent3e7680e24ad95e8fc30acb703c664e397375d135 (diff)
downloadspack-328dc3d14029e576f38e920a4df116af89071dfe.tar.gz
spack-328dc3d14029e576f38e920a4df116af89071dfe.tar.bz2
spack-328dc3d14029e576f38e920a4df116af89071dfe.tar.xz
spack-328dc3d14029e576f38e920a4df116af89071dfe.zip
jansson: enable shared library (#5857)
Jansson builds only a static library by default, which is probably not what most users want. Add Cmake args required to build a shared library and enable those via a default 'shared' variant of the package.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/jansson/package.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/jansson/package.py b/var/spack/repos/builtin/packages/jansson/package.py
index f29b17f4ba..2a5c77f4ad 100644
--- a/var/spack/repos/builtin/packages/jansson/package.py
+++ b/var/spack/repos/builtin/packages/jansson/package.py
@@ -33,3 +33,12 @@ class Jansson(CMakePackage):
url = "https://github.com/akheron/jansson/archive/v2.9.tar.gz"
version('2.9', 'd2db25c437b359fc5a065ed938962237')
+
+ variant('shared', default=True,
+ description='Enables the build of shared libraries')
+
+ def cmake_args(self):
+ return [
+ '-DJANSSON_BUILD_SHARED_LIBS:BOOL=%s' % (
+ 'ON' if '+shared' in self.spec else 'OFF'),
+ ]