From fd6d3f6b8cd671b7b4cf637276fe9258ed12aee2 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Wed, 13 Mar 2019 01:58:44 +0100 Subject: openPMD-api: shared variant (#10847) Add a variant to control shared/static builds (one at a time) and make shared the default. --- var/spack/repos/builtin/packages/openpmd-api/package.py | 4 ++++ 1 file changed, 4 insertions(+) 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'), -- cgit v1.2.3-70-g09d2