diff options
author | Axel Huebl <axel.huebl@plasma.ninja> | 2019-03-13 01:58:44 +0100 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2019-03-12 19:58:44 -0500 |
commit | fd6d3f6b8cd671b7b4cf637276fe9258ed12aee2 (patch) | |
tree | 0b0d687d68157f05a9fa8b830620bff467594800 | |
parent | 46fb6ed5b6f2ad105f2e9529e721404aaea72958 (diff) | |
download | spack-fd6d3f6b8cd671b7b4cf637276fe9258ed12aee2.tar.gz spack-fd6d3f6b8cd671b7b4cf637276fe9258ed12aee2.tar.bz2 spack-fd6d3f6b8cd671b7b4cf637276fe9258ed12aee2.tar.xz spack-fd6d3f6b8cd671b7b4cf637276fe9258ed12aee2.zip |
openPMD-api: shared variant (#10847)
Add a variant to control shared/static builds (one at a time) and
make shared the default.
-rw-r--r-- | var/spack/repos/builtin/packages/openpmd-api/package.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/openpmd-api/package.py b/var/spack/repos/builtin/packages/openpmd-api/package.py index 719dad7fb4..de62183f83 100644 --- a/var/spack/repos/builtin/packages/openpmd-api/package.py +++ b/var/spack/repos/builtin/packages/openpmd-api/package.py @@ -16,6 +16,8 @@ class OpenpmdApi(CMakePackage): version('develop', branch='dev') + variant('shared', default=True, + description='Build a shared version of the library') variant('mpi', default=True, description='Enable parallel I/O') variant('hdf5', default=True, @@ -55,6 +57,8 @@ class OpenpmdApi(CMakePackage): spec = self.spec args = [ + '-DBUILD_SHARED_LIBS:BOOL={0}'.format( + 'ON' if '+shared' in spec else 'OFF'), # variants '-DopenPMD_USE_MPI:BOOL={0}'.format( 'ON' if '+mpi' in spec else 'OFF'), |